From a2e4ffbf86b9d40892514ee54584abac318f4ada Mon Sep 17 00:00:00 2001 From: grimmauld Date: Sat, 5 Sep 2020 17:43:02 +0200 Subject: [PATCH] Fix deployer adding empty NBT tag to items ike food or bonemeal if they could not be used --- .../contraptions/components/deployer/DeployerHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java index cd80bce22..6ff7a447d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java @@ -281,8 +281,8 @@ public class DeployerHandler { ActionResult onItemRightClick = item.onItemRightClick(itemUseWorld, player, hand); player.setHeldItem(hand, onItemRightClick.getResult()); - CompoundNBT tag = stack.getOrCreateTag(); - if (stack.getItem() instanceof SandPaperItem && tag.contains("Polishing")) + CompoundNBT tag = stack.getTag(); + if (tag != null && stack.getItem() instanceof SandPaperItem && tag.contains("Polishing")) player.spawnedItemEffects = ItemStack.read(tag.getCompound("Polishing")); if (!player.getActiveItemStack()