mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 18:03:55 +01:00
Fix deployer adding empty NBT tag to items ike food or bonemeal if they could not be used
This commit is contained in:
parent
fd457c1216
commit
a2e4ffbf86
1 changed files with 2 additions and 2 deletions
|
@ -281,8 +281,8 @@ public class DeployerHandler {
|
||||||
ActionResult<ItemStack> onItemRightClick = item.onItemRightClick(itemUseWorld, player, hand);
|
ActionResult<ItemStack> onItemRightClick = item.onItemRightClick(itemUseWorld, player, hand);
|
||||||
player.setHeldItem(hand, onItemRightClick.getResult());
|
player.setHeldItem(hand, onItemRightClick.getResult());
|
||||||
|
|
||||||
CompoundNBT tag = stack.getOrCreateTag();
|
CompoundNBT tag = stack.getTag();
|
||||||
if (stack.getItem() instanceof SandPaperItem && tag.contains("Polishing"))
|
if (tag != null && stack.getItem() instanceof SandPaperItem && tag.contains("Polishing"))
|
||||||
player.spawnedItemEffects = ItemStack.read(tag.getCompound("Polishing"));
|
player.spawnedItemEffects = ItemStack.read(tag.getCompound("Polishing"));
|
||||||
|
|
||||||
if (!player.getActiveItemStack()
|
if (!player.getActiveItemStack()
|
||||||
|
|
Loading…
Reference in a new issue