mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-11-03 21:14:27 +00:00
Cable modems can be placed against all blocks, including chests.
This commit is contained in:
1 parent
1348ee0588
commit
664df62d5d
1 file changed
+13
-11
@@ -181,17 +181,19 @@ public class BlockCable extends BlockGeneric implements Waterloggable {
|
||||
// : new ItemStack( ComputerCraftRegistry.ModItems.CABLE.get() );
|
||||
// }
|
||||
|
||||
@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());
|
||||
}
|
||||
// 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());
|
||||
// }
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user