3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2025-01-11 23:50:54 +01:00
Paper/nms-patches/EntityChicken.patch

25 Zeilen
956 B
Diff

2015-05-25 20:37:24 +10:00
--- a/net/minecraft/server/EntityChicken.java
+++ b/net/minecraft/server/EntityChicken.java
2019-04-23 12:00:00 +10:00
@@ -43,6 +43,11 @@
2019-04-23 12:00:00 +10:00
@Override
2018-12-13 11:00:00 +11:00
public void movementTick() {
+ // CraftBukkit start
+ if (this.isChickenJockey()) {
2019-04-23 12:00:00 +10:00
+ this.persistent = !this.isTypeNotPersistent(0);
+ }
+ // CraftBukkit end
2018-12-13 11:00:00 +11:00
super.movementTick();
2019-12-11 09:00:00 +11:00
this.bz = this.bw;
this.by = this.bx;
2019-04-23 12:00:00 +10:00
@@ -62,7 +67,9 @@
2019-12-11 09:00:00 +11:00
this.bw += this.bA * 2.0F;
2019-04-23 12:00:00 +10:00
if (!this.world.isClientSide && this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggLayTime <= 0) {
2018-07-15 10:00:00 +10:00
this.a(SoundEffects.ENTITY_CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+ this.forceDrops = true; // CraftBukkit
2018-07-15 10:00:00 +10:00
this.a((IMaterial) Items.EGG);
+ this.forceDrops = false; // CraftBukkit
2019-04-23 12:00:00 +10:00
this.eggLayTime = this.random.nextInt(6000) + 6000;
}