mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-24 03:25:15 +01:00
13 lines
810 B
Diff
13 lines
810 B
Diff
--- a/net/minecraft/server/PathfinderGoalTame.java
|
|
+++ b/net/minecraft/server/PathfinderGoalTame.java
|
|
@@ -51,7 +51,8 @@
|
|
int i = this.entity.getTemper();
|
|
int j = this.entity.getMaxDomestication();
|
|
|
|
- if (j > 0 && this.entity.getRandom().nextInt(j) < i) {
|
|
+ // CraftBukkit - fire EntityTameEvent
|
|
+ if (j > 0 && this.entity.getRandom().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.entity, ((org.bukkit.craftbukkit.entity.CraftHumanEntity) this.entity.getBukkitEntity().getPassenger()).getHandle()).isCancelled()) {
|
|
this.entity.g((EntityHuman) entity);
|
|
this.entity.world.broadcastEntityEffect(this.entity, (byte) 7);
|
|
return;
|