diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/BeltDeployerCallbacks.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/BeltDeployerCallbacks.java index dfe84ba54..6499eaf02 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/BeltDeployerCallbacks.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/BeltDeployerCallbacks.java @@ -45,6 +45,11 @@ public class BeltDeployerCallbacks { if (deployerTileEntity.redstoneLocked) return ProcessingResult.PASS; + DeployerFakePlayer player = deployerTileEntity.getPlayer(); + ItemStack held = player == null ? ItemStack.EMPTY : player.getMainHandItem(); + + if (held.isEmpty()) + return ProcessingResult.HOLD; if (deployerTileEntity.getRecipe(s.stack) == null) return ProcessingResult.PASS; @@ -60,6 +65,12 @@ public class BeltDeployerCallbacks { BlockState blockState = deployerTileEntity.getBlockState(); if (!blockState.hasProperty(FACING) || blockState.getValue(FACING) != Direction.DOWN) return ProcessingResult.PASS; + + DeployerFakePlayer player = deployerTileEntity.getPlayer(); + ItemStack held = player == null ? ItemStack.EMPTY : player.getMainHandItem(); + if (held.isEmpty()) + return ProcessingResult.HOLD; + IRecipe recipe = deployerTileEntity.getRecipe(s.stack); if (recipe == null) return ProcessingResult.PASS; @@ -68,10 +79,10 @@ public class BeltDeployerCallbacks { activate(s, i, deployerTileEntity, recipe); return ProcessingResult.HOLD; } - + if (deployerTileEntity.state == State.WAITING) { if (deployerTileEntity.redstoneLocked) - return ProcessingResult.PASS; + return ProcessingResult.PASS; deployerTileEntity.start(); } @@ -92,6 +103,10 @@ public class BeltDeployerCallbacks { copy.angle = centered ? 180 : Create.RANDOM.nextInt(360); return copy; }) + .map(t -> { + t.locked = false; + return t; + }) .collect(Collectors.toList()); TransportedItemStack left = transported.copy();