Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/PathfinderGoalTarget.patch

29 Zeilen
1.0 KiB
Diff

2016-02-29 22:32:46 +01:00
--- a/net/minecraft/server/PathfinderGoalTarget.java
+++ b/net/minecraft/server/PathfinderGoalTarget.java
@@ -1,5 +1,7 @@
package net.minecraft.server;
+import org.bukkit.event.entity.EntityTargetEvent;
+
public abstract class PathfinderGoalTarget extends PathfinderGoal {
protected final EntityCreature e;
@@ -56,7 +58,7 @@
if (entityliving instanceof EntityHuman && ((EntityHuman) entityliving).abilities.isInvulnerable) {
return false;
} else {
- this.e.setGoalTarget(entityliving);
+ this.e.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // CraftBukkit
return true;
}
}
@@ -77,7 +79,7 @@
}
public void d() {
- this.e.setGoalTarget((EntityLiving) null);
+ this.e.setGoalTarget((EntityLiving) null, EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
this.g = null;
}