diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch index 908813f231..5989e4cd04 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch @@ -1,14 +1,12 @@ --- a/net/minecraft/world/entity/monster/EnderMan.java +++ b/net/minecraft/world/entity/monster/EnderMan.java -@@ -116,10 +_,26 @@ - } +@@ -117,7 +_,23 @@ @Override -- public void setTarget(@Nullable LivingEntity livingEntity) { + public void setTarget(@Nullable LivingEntity livingEntity) { - super.setTarget(livingEntity); -+ public void setTarget(@Nullable LivingEntity target) { + // CraftBukkit start - fire event -+ this.setTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true); ++ this.setTarget(livingEntity, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true); + } + + // Paper start - EndermanEscapeEvent @@ -18,18 +16,15 @@ + // Paper end - EndermanEscapeEvent + + @Override -+ public boolean setTarget(LivingEntity target, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { -+ if (!super.setTarget(target, reason, fireEvent)) { ++ public boolean setTarget(LivingEntity livingEntity, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { ++ if (!super.setTarget(livingEntity, reason, fireEvent)) { + return false; + } -+ target = this.getTarget(); ++ livingEntity = this.getTarget(); + // CraftBukkit end AttributeInstance attribute = this.getAttribute(Attributes.MOVEMENT_SPEED); -- if (livingEntity == null) { -+ if (target == null) { + if (livingEntity == null) { this.targetChangeTime = 0; - this.entityData.set(DATA_CREEPY, false); - this.entityData.set(DATA_STARED_AT, false); @@ -131,6 +_,7 @@ attribute.addTransientModifier(SPEED_MODIFIER_ATTACKING); }