diff options
Diffstat (limited to 'nms-patches/PathfinderGoalBreed.patch')
-rw-r--r-- | nms-patches/PathfinderGoalBreed.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/PathfinderGoalBreed.patch b/nms-patches/PathfinderGoalBreed.patch index 1497ba99..2c169110 100644 --- a/nms-patches/PathfinderGoalBreed.patch +++ b/nms-patches/PathfinderGoalBreed.patch @@ -9,23 +9,23 @@ + entityageable.persistent = true; + } + // CraftBukkit end - EntityHuman entityhuman = this.animal.getBreedCause(); + EntityPlayer entityplayer = this.animal.getBreedCause(); - if (entityhuman == null && this.partner.getBreedCause() != null) { - entityhuman = this.partner.getBreedCause(); + if (entityplayer == null && this.partner.getBreedCause() != null) { + entityplayer = this.partner.getBreedCause(); } + // CraftBukkit start - call EntityBreedEvent + int experience = this.animal.getRandom().nextInt(7) + 1; -+ org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, animal, partner, entityhuman, this.animal.breedItem, experience); ++ org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, animal, partner, entityplayer, this.animal.breedItem, experience); + if (entityBreedEvent.isCancelled()) { + return; + } + experience = entityBreedEvent.getExperience(); + // CraftBukkit end - if (entityhuman != null) { - entityhuman.b(StatisticList.C); -@@ -94,7 +107,7 @@ + if (entityplayer != null) { + entityplayer.b(StatisticList.C); +@@ -92,7 +105,7 @@ this.partner.resetLove(); entityageable.setAgeRaw(-24000); entityageable.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F); @@ -34,7 +34,7 @@ Random random = this.animal.getRandom(); for (int i = 0; i < 7; ++i) { -@@ -109,7 +122,11 @@ +@@ -107,7 +120,11 @@ } if (this.a.getGameRules().getBoolean("doMobLoot")) { |