mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-30 20:03:51 -07:00
Don't show particles when splash events are canceled (#8637)
This commit is contained in:
@@ -35,10 +35,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
Potion potionregistry = PotionUtils.getPotion(itemstack);
|
||||
@@ -0,0 +0,0 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
|
||||
if (this.isLingering()) {
|
||||
this.makeAreaOfEffectCloud(itemstack, potionregistry);
|
||||
showParticles = this.makeAreaOfEffectCloud(itemstack, potionregistry); // Paper
|
||||
} else {
|
||||
- this.applySplash(list, hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null);
|
||||
+ this.applySplash(list, hitResult != null && hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null); // Paper - nullable hitResult
|
||||
- showParticles = this.applySplash(list, hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null); // Paper
|
||||
+ showParticles = this.applySplash(list, hitResult != null && hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null); // Paper - nullable hitResult
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user