diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index 5ece149e31..2d10c1c02b 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -45,6 +45,7 @@ import net.minecraft.nbt.NBTTagString; import net.minecraft.network.chat.IChatBaseComponent; import net.minecraft.world.entity.EnumItemSlot; import net.minecraft.world.item.ItemBlock; +import net.minecraft.world.level.block.state.IBlockData; import org.apache.commons.lang.Validate; import org.apache.commons.lang3.EnumUtils; import org.bukkit.Material; @@ -911,12 +912,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public boolean hasBlockData() { - return this.blockData != null; + return this.blockData != null; } @Override public BlockData getBlockData(Material material) { - return CraftBlockData.fromData(ItemBlock.getBlockState(CraftMagicNumbers.getBlock(material).defaultBlockState(), blockData)); + IBlockData defaultData = CraftMagicNumbers.getBlock(material).defaultBlockState(); + return CraftBlockData.fromData((hasBlockData()) ? ItemBlock.getBlockState(defaultData, blockData) : defaultData); } @Override