PaperMC/paper-server/nms-patches/net/minecraft/world/entity/IEntityAngerable.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

20 lines
825 B
Diff

--- a/net/minecraft/world/entity/IEntityAngerable.java
+++ b/net/minecraft/world/entity/IEntityAngerable.java
@@ -108,7 +108,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);
}
@@ -121,6 +121,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