diff --git a/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java b/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java index 30a33e3f..e7610217 100644 --- a/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java +++ b/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java @@ -120,15 +120,12 @@ public class CarvingUtils { public static @Nonnull ItemStack applyInputToChiselTarget(@Nonnull ItemStack input, @Nonnull ItemStack target) { ItemStack result = new ItemStack(target.getItem(), input.stackSize, target.getItemDamage()); - // Copy NBT from input to target to both avoid dupes and prevent loss of stored information - // (such as when chiseling drawers with items inside) - NBTTagCompound inputNBT = input.getTagCompound(); - if (inputNBT != null) { - inputNBT = (NBTTagCompound) inputNBT.copy(); + if (input.hasTagCompound()) { + result.setTagCompound( + (NBTTagCompound) input.getTagCompound() + .copy()); } - result.setTagCompound(inputNBT); - return result; }