2015-05-25 18:37:24 +08:00
|
|
|
--- a/net/minecraft/server/PathfinderGoalTame.java
|
|
|
|
+++ b/net/minecraft/server/PathfinderGoalTame.java
|
2016-03-01 05:32:46 +08:00
|
|
|
@@ -51,7 +51,8 @@
|
2014-11-26 05:32:16 +08:00
|
|
|
int i = this.entity.getTemper();
|
|
|
|
int j = this.entity.getMaxDomestication();
|
|
|
|
|
2016-03-01 05:32:46 +08:00
|
|
|
- if (j > 0 && this.entity.getRandom().nextInt(j) < i) {
|
2014-11-26 05:32:16 +08:00
|
|
|
+ // CraftBukkit - fire EntityTameEvent
|
2016-03-01 05:32:46 +08: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()) {
|
2016-11-17 09:41:03 +08:00
|
|
|
this.entity.h((EntityHuman) entity);
|
2014-11-26 05:32:16 +08:00
|
|
|
return;
|
2016-11-17 09:41:03 +08:00
|
|
|
}
|