Update to Minecraft 1.21.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-12-04 03:20:00 +11:00
parent 267ae64dd6
commit 5381ea78f7
125 changed files with 1383 additions and 1093 deletions

View File

@@ -191,18 +191,16 @@
EntityExperienceOrb.award(worldserver, this.position(), MathHelper.floor((float) short0 * 0.08F));
}
@@ -577,8 +672,8 @@
if (this.dragonDeathTime == 200) {
world = this.level();
if (world instanceof WorldServer) {
- worldserver = (WorldServer) world;
- if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
+ WorldServer worldserver = (WorldServer) world; // CraftBukkit - decompile error
@@ -592,7 +687,7 @@
if (world1 instanceof WorldServer) {
WorldServer worldserver1 = (WorldServer) world1;
- if (worldserver1.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
+ if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
EntityExperienceOrb.award(worldserver, this.position(), MathHelper.floor((float) short0 * 0.2F));
EntityExperienceOrb.award(worldserver1, this.position(), MathHelper.floor((float) short0 * 0.2F));
}
@@ -586,7 +681,7 @@
@@ -600,7 +695,7 @@
this.dragonFight.setDragonKilled(this);
}
@@ -211,7 +209,7 @@
this.gameEvent(GameEvent.ENTITY_DIE);
}
}
@@ -800,6 +895,7 @@
@@ -814,6 +909,7 @@
super.addAdditionalSaveData(nbttagcompound);
nbttagcompound.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId());
nbttagcompound.putInt("DragonDeathTime", this.dragonDeathTime);
@@ -219,7 +217,7 @@
}
@Override
@@ -813,6 +909,11 @@
@@ -827,6 +923,11 @@
this.dragonDeathTime = nbttagcompound.getInt("DragonDeathTime");
}

View File

@@ -19,7 +19,7 @@
public class EntityWither extends EntityMonster implements IRangedEntity {
private static final DataWatcherObject<Integer> DATA_TARGET_A = DataWatcher.defineId(EntityWither.class, DataWatcherRegistry.INT);
@@ -253,15 +265,40 @@
@@ -252,15 +264,40 @@
i = this.getInvulnerableTicks() - 1;
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
if (i <= 0) {
@@ -63,7 +63,7 @@
}
} else {
@@ -306,6 +343,7 @@
@@ -305,6 +342,7 @@
if (!list.isEmpty()) {
EntityLiving entityliving1 = (EntityLiving) list.get(this.random.nextInt(list.size()));
@@ -71,7 +71,7 @@
this.setAlternativeTarget(i, entityliving1.getId());
}
}
@@ -332,6 +370,11 @@
@@ -331,6 +369,11 @@
IBlockData iblockdata = worldserver.getBlockState(blockposition);
if (canDestroy(iblockdata)) {
@@ -83,7 +83,7 @@
flag = worldserver.destroyBlock(blockposition, true, this) || flag;
}
}
@@ -343,7 +386,7 @@
@@ -342,7 +385,7 @@
}
if (this.tickCount % 20 == 0) {
@@ -92,7 +92,7 @@
}
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
@@ -500,7 +543,7 @@
@@ -499,7 +542,7 @@
@Override
public void checkDespawn() {
if (this.level().getDifficulty() == EnumDifficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {