@@ -11,24 +11,24 @@
|
||||
+
|
||||
public class PathfinderGoalFollowOwner extends PathfinderGoal {
|
||||
|
||||
private final EntityTameableAnimal d;
|
||||
private final EntityTameableAnimal b;
|
||||
@@ -73,7 +79,18 @@
|
||||
for (int l = 0; l <= 4; ++l) {
|
||||
for (int i1 = 0; i1 <= 4; ++i1) {
|
||||
if ((l < 1 || i1 < 1 || l > 3 || i1 > 3) && this.a(i, j, k, l, i1)) {
|
||||
- this.d.setPositionRotation((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.d.yaw, this.d.pitch);
|
||||
- this.b.setPositionRotation((double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.b.yaw, this.b.pitch);
|
||||
+ // CraftBukkit start
|
||||
+ CraftEntity entity = this.d.getBukkitEntity();
|
||||
+ Location to = new Location(entity.getWorld(), (double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.d.yaw, this.d.pitch);
|
||||
+ CraftEntity entity = this.b.getBukkitEntity();
|
||||
+ Location to = new Location(entity.getWorld(), (double) ((float) (i + l) + 0.5F), (double) k, (double) ((float) (j + i1) + 0.5F), this.b.yaw, this.b.pitch);
|
||||
+ EntityTeleportEvent event = new EntityTeleportEvent(entity, entity.getLocation(), to);
|
||||
+ this.d.world.getServer().getPluginManager().callEvent(event);
|
||||
+ this.b.world.getServer().getPluginManager().callEvent(event);
|
||||
+ if (event.isCancelled()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ to = event.getTo();
|
||||
+
|
||||
+ this.d.setPositionRotation(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch());
|
||||
+ this.b.setPositionRotation(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch());
|
||||
+ // CraftBukkit end
|
||||
this.g.p();
|
||||
this.e.r();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user