#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

@@ -1,18 +1,6 @@
--- a/net/minecraft/world/entity/animal/EntityChicken.java
+++ b/net/minecraft/world/entity/animal/EntityChicken.java
@@ -75,6 +75,11 @@
@Override
public void aiStep() {
+ // CraftBukkit start
+ if (this.isChickenJockey()) {
+ this.setPersistenceRequired(!this.removeWhenFarAway(0));
+ }
+ // CraftBukkit end
super.aiStep();
this.oFlap = this.flap;
this.oFlapSpeed = this.flapSpeed;
@@ -94,7 +99,9 @@
@@ -94,7 +94,9 @@
this.flap += this.flapping * 2.0F;
if (!this.level.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) {
this.playSound(SoundEffects.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);