#1045: Revert changes to persistence required checks

By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2022-05-03 23:13:03 +10:00
parent 465b2801f1
commit aba0972e9a
12 changed files with 58 additions and 176 deletions

View File

@@ -57,17 +57,7 @@
this.level.broadcastEntityEvent(this, (byte) 18);
}
@@ -220,11 +238,26 @@
EntityAgeable entityageable = this.getBreedOffspring(worldserver, entityanimal);
if (entityageable != null) {
+ // CraftBukkit start - set persistence for tame animals
+ if (entityageable instanceof EntityTameableAnimal && ((EntityTameableAnimal) entityageable).isTame()) {
+ entityageable.setPersistenceRequired(true);
+ }
+ // CraftBukkit end
EntityPlayer entityplayer = this.getLoveCause();
@@ -225,6 +243,16 @@
if (entityplayer == null && entityanimal.getLoveCause() != null) {
entityplayer = entityanimal.getLoveCause();
}
@@ -84,7 +74,7 @@
if (entityplayer != null) {
entityplayer.awardStat(StatisticList.ANIMALS_BRED);
@@ -235,12 +268,14 @@
@@ -235,12 +263,14 @@
entityanimal.setAge(6000);
this.resetLove();
entityanimal.resetLove();