aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Pufferfish.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Pufferfish.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Pufferfish.java.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Pufferfish.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Pufferfish.java.patch
new file mode 100644
index 0000000000..2a6bd1c25f
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/animal/Pufferfish.java.patch
@@ -0,0 +1,25 @@
+--- a/net/minecraft/world/entity/animal/Pufferfish.java
++++ b/net/minecraft/world/entity/animal/Pufferfish.java
+@@ -133,9 +141,10 @@
+ }
+
+ private void touch(Mob mob) {
+- int puffState = this.getPuffState();
+- if (mob.hurt(this.damageSources().mobAttack(this), (float)(1 + puffState))) {
+- mob.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * puffState, 0), this);
++ int i = this.getPuffState();
++
++ if (mob.hurt(this.damageSources().mobAttack(this), (float) (1 + i))) {
++ mob.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+ this.playSound(SoundEvents.PUFFER_FISH_STING, 1.0F, 1.0F);
+ }
+ }
+@@ -148,7 +159,7 @@
+ ((ServerPlayer)entity).connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.PUFFER_FISH_STING, 0.0F));
+ }
+
+- entity.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * puffState, 0), this);
++ entity.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+ }
+ }
+