aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/PathfinderMob.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/PathfinderMob.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/PathfinderMob.java.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/PathfinderMob.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/PathfinderMob.java.patch
new file mode 100644
index 0000000000..444be03daa
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/entity/PathfinderMob.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/entity/PathfinderMob.java
++++ b/net/minecraft/world/entity/PathfinderMob.java
+@@ -9,6 +8,9 @@
+ import net.minecraft.world.level.LevelAccessor;
+ import net.minecraft.world.level.LevelReader;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityUnleashEvent;
++// CraftBukkit end
+
+ public abstract class PathfinderMob extends Mob {
+ protected static final float DEFAULT_WALK_TARGET_VALUE = 0.0F;
+@@ -49,6 +54,7 @@
+ float f = this.distanceTo(leashHolder);
+ if (this instanceof TamableAnimal && ((TamableAnimal)this).isInSittingPose()) {
+ if (f > 10.0F) {
++ this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit
+ this.dropLeash(true, true);
+ }
+
+@@ -57,6 +63,7 @@
+
+ this.onLeashDistance(f);
+ if (f > 10.0F) {
++ this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit
+ this.dropLeash(true, true);
+ this.goalSelector.disableControlFlag(Goal.Flag.MOVE);
+ } else if (f > 6.0F) {