13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/EntityPigZombie.patch
CraftBukkit/Spigot 3319c6dd5b SPIGOT-4205: Cancelled damage should not anger pig zombie
By: md_5 <git@md-5.net>
2018-08-01 19:29:24 +10:00

21 Zeilen
655 B
Diff

--- 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
}
}