mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 20:50:41 +01:00
Properly set persistence flag for bred animals. Fixes BUKKIT-4751
This commit is contained in:
parent
c62375f95e
commit
8ae8957d15
1 changed files with 5 additions and 0 deletions
|
@ -69,6 +69,11 @@ public class PathfinderGoalBreed extends PathfinderGoal {
|
|||
EntityAgeable entityageable = this.d.createChild(this.e);
|
||||
|
||||
if (entityageable != null) {
|
||||
// CraftBukkit start - set persistence for tame animals
|
||||
if (entityageable instanceof EntityTameableAnimal && ((EntityTameableAnimal) entityageable).isTamed()) {
|
||||
entityageable.persistent = true;
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.d.setAge(6000);
|
||||
this.e.setAge(6000);
|
||||
this.d.bZ();
|
||||
|
|
Loading…
Reference in a new issue