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 5dfceef48..796400fc7 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 @@ -26,7 +26,6 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.fluid.Fluid; import net.minecraft.fluid.Fluids; import net.minecraft.inventory.EquipmentSlotType; @@ -294,7 +293,10 @@ public class DeployerHandler { itemUseWorld = new ItemUseWorld(world, face, pos); ActionResult onItemRightClick = item.onItemRightClick(itemUseWorld, player, hand); - player.setHeldItem(hand, onItemRightClick.getResult()); + ItemStack resultStack = onItemRightClick.getResult(); + if (resultStack != stack || resultStack.getCount() != stack.getCount() || resultStack.getUseDuration() > 0 || resultStack.getDamage() != stack.getDamage()) { + player.setHeldItem(hand, onItemRightClick.getResult()); + } CompoundNBT tag = stack.getTag(); if (tag != null && stack.getItem() instanceof SandPaperItem && tag.contains("Polishing")) @@ -349,7 +351,7 @@ public class DeployerHandler { interactionManager.world.updateComparatorOutputLevel(clickedPos, state.getBlock()); } - CriteriaTriggers.BEE_NEST_DESTROYED.test((ServerPlayerEntity) interactionManager.player, + CriteriaTriggers.BEE_NEST_DESTROYED.test(interactionManager.player, state.getBlock(), heldItem, beehivetileentity.getBeeCount()); } }