mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
Update CraftBukkit to Minecraft 1.4.7
This commit is contained in:
@@ -27,7 +27,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
|
||||
}
|
||||
|
||||
public boolean b() {
|
||||
EntityLiving entityliving = this.d.aG();
|
||||
EntityLiving entityliving = this.d.getGoalTarget();
|
||||
|
||||
if (entityliving == null) {
|
||||
return false;
|
||||
@@ -55,7 +55,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
|
||||
}
|
||||
|
||||
public void d() {
|
||||
this.d.b((EntityLiving) null);
|
||||
this.d.setGoalTarget((EntityLiving) null);
|
||||
}
|
||||
|
||||
protected boolean a(EntityLiving entityliving, boolean flag) {
|
||||
@@ -118,12 +118,10 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
|
||||
|
||||
org.bukkit.event.entity.EntityTargetLivingEntityEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetLivingEvent(this.d, entityliving, reason);
|
||||
if (event.isCancelled() || event.getTarget() == null) {
|
||||
if (this.d instanceof EntityCreature) {
|
||||
((EntityCreature) this.d).target = null;
|
||||
}
|
||||
this.d.setGoalTarget(null);
|
||||
return false;
|
||||
} else if (entityliving.getBukkitEntity() != event.getTarget()) {
|
||||
this.d.b((EntityLiving) ((org.bukkit.craftbukkit.entity.CraftEntity) event.getTarget()).getHandle());
|
||||
this.d.setGoalTarget((EntityLiving) ((org.bukkit.craftbukkit.entity.CraftEntity) event.getTarget()).getHandle());
|
||||
}
|
||||
if (this.d instanceof EntityCreature) {
|
||||
((EntityCreature) this.d).target = ((org.bukkit.craftbukkit.entity.CraftEntity) event.getTarget()).getHandle();
|
||||
|
Reference in New Issue
Block a user