1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-08 13:25:58 +00:00

Cable modems can be placed against all blocks, including chests.

This commit is contained in:
David Queneau
2021-01-30 17:12:09 -08:00
parent 1348ee0588
commit 664df62d5d

View File

@@ -181,17 +181,19 @@ public class BlockCable extends BlockGeneric implements Waterloggable {
// : new ItemStack( ComputerCraftRegistry.ModItems.CABLE.get() ); // : new ItemStack( ComputerCraftRegistry.ModItems.CABLE.get() );
// } // }
@Override // Commenting override to allow cable modems to be placed on chests, so that chests can be generic inventory peripherals.
@Deprecated // TODO Perhaps there is a more selective way to achieve this?
public boolean canPlaceAt(BlockState state, @Nonnull WorldView world, @Nonnull BlockPos pos) { // @Override
Direction facing = state.get(MODEM) // @Deprecated
.getFacing(); // public boolean canPlaceAt(BlockState state, @Nonnull WorldView world, @Nonnull BlockPos pos) {
if (facing == null) { // Direction facing = state.get(MODEM)
return true; // .getFacing();
} // if (facing == null) {
// return true;
return sideCoversSmallSquare(world, pos.offset(facing), facing.getOpposite()); // }
} //
// return sideCoversSmallSquare(world, pos.offset(facing), facing.getOpposite());
// }
@Nonnull @Nonnull
@Override @Override