mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
536256d6ff
By: md_5 <git@md-5.net>
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
--- a/net/minecraft/world/entity/EntityCreature.java
|
|
+++ b/net/minecraft/world/entity/EntityCreature.java
|
|
@@ -7,6 +7,10 @@
|
|
import net.minecraft.world.level.World;
|
|
import net.minecraft.world.phys.Vec3D;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.event.entity.EntityUnleashEvent;
|
|
+// CraftBukkit end
|
|
+
|
|
public abstract class EntityCreature extends EntityInsentient {
|
|
|
|
protected EntityCreature(EntityTypes<? extends EntityCreature> entitytypes, World world) {
|
|
@@ -41,6 +45,7 @@
|
|
|
|
if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) {
|
|
if (f > 10.0F) {
|
|
+ this.level.getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit
|
|
this.unleash(true, true);
|
|
}
|
|
|
|
@@ -49,6 +54,7 @@
|
|
|
|
this.y(f);
|
|
if (f > 10.0F) {
|
|
+ this.level.getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit
|
|
this.unleash(true, true);
|
|
this.goalSelector.a(PathfinderGoal.Type.MOVE);
|
|
} else if (f > 6.0F) {
|