diff options
Diffstat (limited to 'nms-patches/PathfinderGoalBreed.patch')
-rw-r--r-- | nms-patches/PathfinderGoalBreed.patch | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/nms-patches/PathfinderGoalBreed.patch b/nms-patches/PathfinderGoalBreed.patch index 4b9f88cf..1497ba99 100644 --- a/nms-patches/PathfinderGoalBreed.patch +++ b/nms-patches/PathfinderGoalBreed.patch @@ -1,6 +1,6 @@ --- a/net/minecraft/server/PathfinderGoalBreed.java +++ b/net/minecraft/server/PathfinderGoalBreed.java -@@ -75,11 +75,23 @@ +@@ -75,11 +75,24 @@ EntityAgeable entityageable = this.animal.createChild(this.partner); if (entityageable != null) { @@ -20,11 +20,12 @@ + if (entityBreedEvent.isCancelled()) { + return; + } ++ experience = entityBreedEvent.getExperience(); + // CraftBukkit end if (entityhuman != null) { entityhuman.b(StatisticList.C); -@@ -94,7 +106,7 @@ +@@ -94,7 +107,7 @@ this.partner.resetLove(); entityageable.setAgeRaw(-24000); entityageable.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F); @@ -33,12 +34,16 @@ Random random = this.animal.getRandom(); for (int i = 0; i < 7; ++i) { -@@ -109,7 +121,7 @@ +@@ -109,7 +122,11 @@ } if (this.a.getGameRules().getBoolean("doMobLoot")) { - this.a.addEntity(new EntityExperienceOrb(this.a, this.animal.locX, this.animal.locY, this.animal.locZ, random.nextInt(7) + 1)); -+ this.a.addEntity(new EntityExperienceOrb(this.a, this.animal.locX, this.animal.locY, this.animal.locZ, entityBreedEvent.getExperience())); // CraftBukkit - use event experience ++ // CraftBukkit start - use event experience ++ if (experience > 0) { ++ this.a.addEntity(new EntityExperienceOrb(this.a, this.animal.locX, this.animal.locY, this.animal.locZ, experience)); ++ } ++ // CraftBukkit end } } |