Skip to content

Commit 3e5b844

Browse files
committed
Don't allow inserting items into bins from the back
1 parent 433bf8a commit 3e5b844

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/mekanism/common/block/basic/BlockBin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,10 @@ protected ItemInteractionResult useItemOn(@NotNull ItemStack stack, @NotNull Blo
8282
ItemInteractionResult wrenchResult = bin.tryWrench(state, player, stack).getInteractionResult();
8383
if (wrenchResult.result() != InteractionResult.PASS) {
8484
return wrenchResult;
85+
} else if (hit.getDirection() != bin.getDirection()) {
86+
return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION;
8587
}
86-
if (stack.isEmpty() && player.isShiftKeyDown() && hit.getDirection() == bin.getDirection()) {
88+
if (stack.isEmpty() && player.isShiftKeyDown()) {
8789
return bin.toggleLock() ? ItemInteractionResult.sidedSuccess(world.isClientSide) : ItemInteractionResult.FAIL;
8890
} else if (!world.isClientSide) {
8991
BinInventorySlot binSlot = bin.getBinSlot();

0 commit comments

Comments
 (0)