PaperMC/paper-server/nms-patches/net/minecraft/world/entity/IEntityAngerable.patch
CraftBukkit/Spigot 65bc2541a3 Update to Minecraft 1.20.5
By: md_5 <git@md-5.net>
2024-04-24 01:15:00 +10:00

20 lines
825 B
Diff

--- a/net/minecraft/world/entity/IEntityAngerable.java
+++ b/net/minecraft/world/entity/IEntityAngerable.java
@@ -114,7 +114,7 @@
default void stopBeingAngry() {
this.setLastHurtByMob((EntityLiving) null);
this.setPersistentAngerTarget((UUID) null);
- this.setTarget((EntityLiving) null);
+ this.setTarget((EntityLiving) null, org.bukkit.event.entity.EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
this.setRemainingPersistentAngerTime(0);
}
@@ -127,6 +127,8 @@
void setTarget(@Nullable EntityLiving entityliving);
+ boolean setTarget(@Nullable EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent); // CraftBukkit
+
boolean canAttack(EntityLiving entityliving);
@Nullable