2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/PathfinderGoalTame.java
|
|
|
|
+++ b/net/minecraft/server/PathfinderGoalTame.java
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -57,7 +57,8 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
int i = this.entity.getTemper();
|
|
|
|
int j = this.entity.getMaxDomestication();
|
|
|
|
|
2016-02-29 22:32:46 +01:00
|
|
|
- if (j > 0 && this.entity.getRandom().nextInt(j) < i) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit - fire EntityTameEvent
|
2016-02-29 22:32:46 +01:00
|
|
|
+ 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()) {
|
2020-06-25 02:00:00 +02:00
|
|
|
this.entity.i((EntityHuman) entity);
|
2014-11-25 22:32:16 +01:00
|
|
|
return;
|
2016-11-17 02:41:03 +01:00
|
|
|
}
|