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

@@ -14,7 +14,7 @@
public class ItemBlock extends Item {
/** @deprecated */
@@ -68,6 +75,12 @@
@@ -62,6 +69,12 @@
return EnumInteractionResult.FAIL;
} else {
IBlockData iblockdata = this.getPlacementState(blockactioncontext1);
@@ -27,7 +27,7 @@
if (iblockdata == null) {
return EnumInteractionResult.FAIL;
@@ -85,6 +98,19 @@
@@ -79,6 +92,19 @@
this.updateCustomBlockEntityTag(blockposition, world, entityhuman, itemstack, iblockdata1);
updateBlockEntityComponents(world, blockposition, itemstack);
iblockdata1.getBlock().setPlacedBy(world, blockposition, iblockdata1, entityhuman, itemstack);
@@ -47,7 +47,7 @@
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.PLACED_BLOCK.trigger((EntityPlayer) entityhuman, blockposition, itemstack);
}
@@ -92,7 +118,7 @@
@@ -86,7 +112,7 @@
SoundEffectType soundeffecttype = iblockdata1.getSoundType();
@@ -55,8 +55,8 @@
+ // world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(entityhuman, iblockdata1));
itemstack.consume(1, entityhuman);
return EnumInteractionResult.sidedSuccess(world.isClientSide);
@@ -150,8 +176,15 @@
return EnumInteractionResult.SUCCESS;
@@ -144,8 +170,15 @@
protected boolean canPlace(BlockActionContext blockactioncontext, IBlockData iblockdata) {
EntityHuman entityhuman = blockactioncontext.getPlayer();
VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.empty() : VoxelShapeCollision.of(entityhuman);