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 3ae9587d..3f74b1ac 100644 --- a/nms-patches/PathfinderGoalBreed.patch +++ b/nms-patches/PathfinderGoalBreed.patch @@ -1,7 +1,7 @@ --- a/net/minecraft/server/PathfinderGoalBreed.java +++ b/net/minecraft/server/PathfinderGoalBreed.java -@@ -70,6 +70,11 @@ - EntityAgeable entityageable = this.d.createChild(this.e); +@@ -69,6 +69,11 @@ + EntityAgeable entityageable = this.animal.createChild(this.partner); if (entityageable != null) { + // CraftBukkit start - set persistence for tame animals @@ -9,15 +9,15 @@ + entityageable.persistent = true; + } + // CraftBukkit end - EntityHuman entityhuman = this.d.cq(); + EntityHuman entityhuman = this.animal.getBreedCause(); - if (entityhuman == null && this.e.cq() != null) { -@@ -89,7 +94,7 @@ - this.e.cs(); + if (entityhuman == null && this.partner.getBreedCause() != null) { +@@ -88,7 +93,7 @@ + this.partner.resetLove(); entityageable.setAgeRaw(-24000); - entityageable.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F); + entityageable.setPositionRotation(this.animal.locX, this.animal.locY, this.animal.locZ, 0.0F, 0.0F); - this.a.addEntity(entityageable); + this.a.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason - Random random = this.d.bc(); + Random random = this.animal.getRandom(); for (int i = 0; i < 7; ++i) { |