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

25 Zeilen
964 B
Diff

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