mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 19:34:09 +01:00
SPIGOT-4205: Cancelled damage should not anger pig zombie
By: md_5 <git@md-5.net>
This commit is contained in:
parent
51e1d686e1
commit
3319c6dd5b
1 changed files with 20 additions and 0 deletions
20
paper-server/nms-patches/EntityPigZombie.patch
Normal file
20
paper-server/nms-patches/EntityPigZombie.patch
Normal file
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue