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/animal/EntitySnowman.java
+++ b/net/minecraft/world/entity/animal/EntitySnowman.java
@@ -41,6 +41,10 @@
@@ -40,6 +40,10 @@
import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.phys.Vec3D;
@@ -11,7 +11,7 @@
public class EntitySnowman extends EntityGolem implements IShearable, IRangedEntity {
private static final DataWatcherObject<Byte> DATA_PUMPKIN_ID = DataWatcher.defineId(EntitySnowman.class, DataWatcherRegistry.BYTE);
@@ -97,7 +101,7 @@
@@ -95,7 +99,7 @@
super.aiStep();
if (!this.level().isClientSide) {
if (this.level().getBiome(this.blockPosition()).is(BiomeTags.SNOW_GOLEM_MELTS)) {
@@ -20,7 +20,7 @@
}
if (!this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
@@ -113,7 +117,11 @@
@@ -111,7 +115,11 @@
BlockPosition blockposition = new BlockPosition(j, k, l);
if (this.level().getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level(), blockposition)) {
@@ -30,10 +30,10 @@
+ continue;
+ }
+ // CraftBukkit end
this.level().gameEvent(GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(this, iblockdata));
this.level().gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(this, iblockdata));
}
}
@@ -145,6 +153,11 @@
@@ -138,6 +146,11 @@
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
@@ -45,12 +45,12 @@
this.shear(SoundCategory.PLAYERS);
this.gameEvent(GameEvent.SHEAR, entityhuman);
if (!this.level().isClientSide) {
@@ -164,7 +177,9 @@
@@ -155,7 +168,9 @@
this.level().playSound((EntityHuman) null, (Entity) this, SoundEffects.SNOW_GOLEM_SHEAR, soundcategory, 1.0F, 1.0F);
if (!this.level().isClientSide()) {
this.setPumpkin(false);
+ this.forceDrops = true; // CraftBukkit
this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), 1.7F);
this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), this.getEyeHeight());
+ this.forceDrops = false; // CraftBukkit
}