13 lines
769 B
Diff
13 lines
769 B
Diff
--- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java
|
|
+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java
|
|
@@ -62,7 +62,8 @@
|
|
int i = this.horse.getTemper();
|
|
int j = this.horse.getMaxTemper();
|
|
|
|
- if (j > 0 && this.horse.getRandom().nextInt(j) < i) {
|
|
+ // CraftBukkit - fire EntityTameEvent
|
|
+ if (j > 0 && this.horse.getRandom().nextInt(j) < i && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this.horse, ((org.bukkit.craftbukkit.entity.CraftHumanEntity) this.horse.getBukkitEntity().getPassenger()).getHandle()).isCancelled()) {
|
|
this.horse.tameWithName((EntityHuman) entity);
|
|
return;
|
|
}
|