diff options
author | md_5 <git@md-5.net> | 2018-08-01 19:29:24 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-08-01 19:29:24 +1000 |
commit | 8e87d031457095700bf0426e70f216d534ee9c2d (patch) | |
tree | e64c8704104df22d1c63f51c3e5fd059142b99d1 | |
parent | a0c7bcf02a2fb8ca6fc64a76b33be9fab2c5c099 (diff) | |
download | craftbukkit-8e87d031457095700bf0426e70f216d534ee9c2d.tar craftbukkit-8e87d031457095700bf0426e70f216d534ee9c2d.tar.gz craftbukkit-8e87d031457095700bf0426e70f216d534ee9c2d.tar.lz craftbukkit-8e87d031457095700bf0426e70f216d534ee9c2d.tar.xz craftbukkit-8e87d031457095700bf0426e70f216d534ee9c2d.zip |
SPIGOT-4205: Cancelled damage should not anger pig zombie
-rw-r--r-- | nms-patches/EntityPigZombie.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nms-patches/EntityPigZombie.patch b/nms-patches/EntityPigZombie.patch new file mode 100644 index 00000000..96303f5c --- /dev/null +++ b/nms-patches/EntityPigZombie.patch @@ -0,0 +1,20 @@ +--- a/net/minecraft/server/EntityPigZombie.java ++++ b/net/minecraft/server/EntityPigZombie.java +@@ -113,11 +113,15 @@ + } else { + Entity entity = damagesource.getEntity(); + +- if (entity instanceof EntityHuman && !((EntityHuman) entity).u()) { ++ // CraftBukkit start ++ boolean result = super.damageEntity(damagesource, f); ++ ++ if (result && entity instanceof EntityHuman && !((EntityHuman) entity).u()) { + this.a(entity); + } + +- return super.damageEntity(damagesource, f); ++ return result; ++ // CraftBukkit end + } + } + |