3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 07:10:10 +01:00
Paper/nms-patches/EntityChicken.patch
2019-06-21 20:00:00 +10:00

25 Zeilen
956 B
Diff

--- a/net/minecraft/server/EntityChicken.java
+++ b/net/minecraft/server/EntityChicken.java
@@ -43,6 +43,11 @@
@Override
public void movementTick() {
+ // CraftBukkit start
+ if (this.isChickenJockey()) {
+ this.persistent = !this.isTypeNotPersistent(0);
+ }
+ // CraftBukkit end
super.movementTick();
this.bC = this.bz;
this.bB = this.bA;
@@ -62,7 +67,9 @@
this.bz += this.bD * 2.0F;
if (!this.world.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggLayTime <= 0) {
this.a(SoundEffects.ENTITY_CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+ this.forceDrops = true; // CraftBukkit
this.a((IMaterial) Items.EGG);
+ this.forceDrops = false; // CraftBukkit
this.eggLayTime = this.random.nextInt(6000) + 6000;
}