Update to Minecraft 1.18-pre8

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-25 08:00:00 +11:00
parent 0d839e926c
commit 799bfc92e2
30 changed files with 206 additions and 758 deletions

View File

@@ -14,7 +14,7 @@
public class ItemBlock extends Item {
private static final String BLOCK_ENTITY_TAG = "BlockEntityTag";
@@ -68,6 +75,12 @@
@@ -69,6 +76,12 @@
return EnumInteractionResult.FAIL;
} else {
IBlockData iblockdata = this.getPlacementState(blockactioncontext1);
@@ -27,7 +27,7 @@
if (iblockdata == null) {
return EnumInteractionResult.FAIL;
@@ -84,6 +97,19 @@
@@ -85,6 +98,19 @@
iblockdata1 = this.updateBlockStateFromTag(blockposition, world, itemstack, iblockdata1);
this.updateCustomBlockEntityTag(blockposition, world, entityhuman, itemstack, iblockdata1);
iblockdata1.getBlock().setPlacedBy(world, blockposition, iblockdata1, entityhuman, itemstack);
@@ -47,7 +47,7 @@
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.PLACED_BLOCK.trigger((EntityPlayer) entityhuman, blockposition, itemstack);
}
@@ -91,9 +117,9 @@
@@ -92,9 +118,9 @@
SoundEffectType soundeffecttype = iblockdata1.getSoundType();
@@ -59,7 +59,7 @@
itemstack.shrink(1);
}
@@ -129,6 +155,21 @@
@@ -130,6 +156,21 @@
if (nbttagcompound != null) {
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("BlockStateTag");
@@ -81,7 +81,7 @@
BlockStateList<Block, IBlockData> blockstatelist = iblockdata.getBlock().getStateDefinition();
Iterator iterator = nbttagcompound1.getAllKeys().iterator();
@@ -143,11 +184,6 @@
@@ -144,11 +185,6 @@
}
}
}
@@ -93,7 +93,7 @@
return iblockdata1;
}
@@ -160,8 +196,15 @@
@@ -161,8 +197,15 @@
protected boolean canPlace(BlockActionContext blockactioncontext, IBlockData iblockdata) {
EntityHuman entityhuman = blockactioncontext.getPlayer();
VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.empty() : VoxelShapeCollision.of(entityhuman);
@@ -110,7 +110,7 @@
}
protected boolean mustSurvive() {
@@ -244,7 +287,7 @@
@@ -245,7 +288,7 @@
if (nbttagcompound != null && nbttagcompound.contains("Items", 9)) {
NBTTagList nbttaglist = nbttagcompound.getList("Items", 10);