diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java index 88d2ee50e..147605918 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelControllerTileEntity.java @@ -137,7 +137,7 @@ public class CrushingWheelControllerTileEntity extends SmartTileEntity { //Output Items if (facing.getAxis().isHorizontal() || facing == Direction.DOWN) { BlockPos nextPos = pos.add(facing.getAxis() == Axis.X ? 1f * offset : 0f - , (facing == Direction.DOWN || facing.getAxis().isHorizontal()) ? -1f : 0f + , (-1f) , facing.getAxis() == Axis.Z ? 1f * offset : 0f); DirectBeltInputBehaviour behaviour = TileEntityBehaviour.get(world, nextPos, DirectBeltInputBehaviour.TYPE); if (behaviour != null) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltCrusherInteractionHandler.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltCrusherInteractionHandler.java index c1c9fae10..61a6b1514 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltCrusherInteractionHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/transport/BeltCrusherInteractionHandler.java @@ -32,19 +32,18 @@ public class BeltCrusherInteractionHandler { continue; Direction crusherFacing = crusherState.get(CrushingWheelControllerBlock.FACING); Direction movementFacing = beltInventory.belt.getMovementFacing(); - boolean blocking = crusherFacing == movementFacing; if (crusherFacing != movementFacing) continue; float crusherEntry = segment + .5f; crusherEntry += .399f * (beltMovementPositive ? -1 : 1); + float postCrusherEntry = crusherEntry + .199f * (!beltMovementPositive ? -1 : 1); - boolean hasCrossed = nextOffset > crusherEntry && beltMovementPositive - || nextOffset < crusherEntry && !beltMovementPositive; + boolean hasCrossed = nextOffset > crusherEntry && nextOffset < postCrusherEntry && beltMovementPositive + || nextOffset < crusherEntry && nextOffset > postCrusherEntry && !beltMovementPositive; if (!hasCrossed) return false; - if (blocking) - currentItem.beltPosition = crusherEntry; + currentItem.beltPosition = crusherEntry; TileEntity te = world.getTileEntity(crusherPos); if (!(te instanceof CrushingWheelControllerTileEntity)) @@ -52,20 +51,11 @@ public class BeltCrusherInteractionHandler { CrushingWheelControllerTileEntity crusherTE = (CrushingWheelControllerTileEntity) te; - int amountToExtract = -1; ItemStack toInsert = currentItem.stack.copy(); - if (amountToExtract > toInsert.getCount()) - if (blocking) - return true; - else - continue; ItemStack remainder = ItemHandlerHelper.insertItemStacked(crusherTE.inventory, toInsert, false); if (toInsert.equals(remainder, false)) - if (blocking) - return true; - else - continue; + return true; int notFilled = currentItem.stack.getCount() - toInsert.getCount(); if (!remainder.isEmpty()) { @@ -75,8 +65,7 @@ public class BeltCrusherInteractionHandler { currentItem.stack = remainder; beltInventory.belt.sendData(); - if (blocking) - return true; + return true; } return false;