summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityPufferFish.patch
blob: d010db2c1f7ddd0bb298115d886025d5b54eea6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/net/minecraft/server/EntityPufferFish.java
+++ b/net/minecraft/server/EntityPufferFish.java
@@ -47,7 +47,7 @@
         this.a(f);
     }
 
-    protected final void setSize(float f, float f1) {
+    public final void setSize(float f, float f1) { // CraftBukkit - decompile error
         boolean flag = this.bE > 0.0F;
 
         this.bE = f;
@@ -140,7 +140,7 @@
         int i = this.getPuffState();
 
         if (entityinsentient.damageEntity(DamageSource.mobAttack(this), (float) (1 + i))) {
-            entityinsentient.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0));
+            entityinsentient.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
             this.a(SoundEffects.ENTITY_PUFFER_FISH_STING, 1.0F, 1.0F);
         }
 
@@ -151,7 +151,7 @@
 
         if (entityhuman instanceof EntityPlayer && i > 0 && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) (1 + i))) {
             ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutGameStateChange(9, 0.0F));
-            entityhuman.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0));
+            entityhuman.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
         }
 
     }