Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 4deda9501f
commit 65bc2541a3
524 changed files with 7788 additions and 6181 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/boss/wither/EntityWither.java
+++ b/net/minecraft/world/entity/boss/wither/EntityWither.java
@@ -55,6 +55,18 @@
@@ -58,6 +58,18 @@
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.phys.Vec3D;
@@ -19,7 +19,7 @@
public class EntityWither extends EntityMonster implements PowerableMob, IRangedEntity {
private static final DataWatcherObject<Integer> DATA_TARGET_A = DataWatcher.defineId(EntityWither.class, DataWatcherRegistry.INT);
@@ -248,15 +260,40 @@
@@ -254,15 +266,40 @@
i = this.getInvulnerableTicks() - 1;
this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
if (i <= 0) {
@@ -63,7 +63,7 @@
}
} else {
@@ -301,6 +338,7 @@
@@ -307,6 +344,7 @@
if (!list.isEmpty()) {
EntityLiving entityliving1 = (EntityLiving) list.get(this.random.nextInt(list.size()));
@@ -71,18 +71,18 @@
this.setAlternativeTarget(i, entityliving1.getId());
}
}
@@ -331,6 +369,11 @@
IBlockData iblockdata = this.level().getBlockState(blockposition);
@@ -333,6 +371,11 @@
IBlockData iblockdata = this.level().getBlockState(blockposition);
if (canDestroy(iblockdata)) {
+ // CraftBukkit start
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState())) {
+ continue;
+ }
+ // CraftBukkit end
flag = this.level().destroyBlock(blockposition, true, this) || flag;
}
}
if (canDestroy(iblockdata)) {
+ // CraftBukkit start
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState())) {
+ continue;
+ }
+ // CraftBukkit end
flag = this.level().destroyBlock(blockposition, true, this) || flag;
}
}
@@ -344,7 +387,7 @@
}
@@ -92,7 +92,7 @@
}
this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
@@ -498,7 +541,7 @@
@@ -500,7 +543,7 @@
@Override
public void checkDespawn() {
if (this.level().getDifficulty() == EnumDifficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {