From 00b458c39a93050aea156e334400ef566a2b87e1 Mon Sep 17 00:00:00 2001 From: David Queneau <748280+davidqueneau@users.noreply.github.com> Date: Sun, 7 Feb 2021 10:47:50 -0800 Subject: [PATCH] Revert "Cable modems can be placed against all blocks, including chests." This reverts commit 664df62d --- .../peripheral/modem/wired/BlockCable.java | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java b/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java index 5f020ee57..f94b8023a 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/modem/wired/BlockCable.java @@ -181,19 +181,17 @@ public class BlockCable extends BlockGeneric implements Waterloggable { // : new ItemStack( ComputerCraftRegistry.ModItems.CABLE.get() ); // } - // Commenting override to allow cable modems to be placed on chests, so that chests can be generic inventory peripherals. - // TODO Perhaps there is a more selective way to achieve this? - // @Override - // @Deprecated - // public boolean canPlaceAt(BlockState state, @Nonnull WorldView world, @Nonnull BlockPos pos) { - // Direction facing = state.get(MODEM) - // .getFacing(); - // if (facing == null) { - // return true; - // } - // - // return sideCoversSmallSquare(world, pos.offset(facing), facing.getOpposite()); - // } + @Override + @Deprecated + public boolean canPlaceAt(BlockState state, @Nonnull WorldView world, @Nonnull BlockPos pos) { + Direction facing = state.get(MODEM) + .getFacing(); + if (facing == null) { + return true; + } + + return sideCoversSmallSquare(world, pos.offset(facing), facing.getOpposite()); + } @Nonnull @Override