Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,12 +1,15 @@
--- a/net/minecraft/world/entity/animal/EntityChicken.java
+++ b/net/minecraft/world/entity/animal/EntityChicken.java
@@ -98,7 +98,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);
+ this.forceDrops = true; // CraftBukkit
this.spawnAtLocation((IMaterial) Items.EGG);
+ this.forceDrops = false; // CraftBukkit
this.gameEvent(GameEvent.ENTITY_PLACE);
this.eggTime = this.random.nextInt(6000) + 6000;
}
@@ -99,10 +99,12 @@
if (world instanceof WorldServer worldserver) {
if (this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) {
+ this.forceDrops = true; // CraftBukkit
if (this.dropFromGiftLootTable(worldserver, LootTables.CHICKEN_LAY, this::spawnAtLocation)) {
this.playSound(SoundEffects.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
this.gameEvent(GameEvent.ENTITY_PLACE);
}
+ this.forceDrops = false; // CraftBukkit
this.eggTime = this.random.nextInt(6000) + 6000;
}