use of net.minecraft.block.BlockRedstoneDiode in project Charset by CharsetMC.
the class RedstoneUtils method canConnectFace.
public static boolean canConnectFace(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side, EnumFacing face) {
Block block = state.getBlock();
if ((block instanceof BlockRedstoneDiode || block instanceof BlockRedstoneWire || block instanceof BlockDaylightDetector || block instanceof BlockBasePressurePlate) && face != EnumFacing.DOWN) {
return false;
}
if (block instanceof BlockLever && face != state.getValue(BlockLever.FACING).getFacing().getOpposite()) {
return false;
}
if (block instanceof BlockButton && face != state.getValue(BlockButton.FACING).getOpposite()) {
return false;
}
IMultipartContainer container = MultipartHelper.getPartContainer(world, pos);
if (container != null) {
return MultipartRedstoneHelper.canConnectRedstone(container, side, face);
} else {
return block.canConnectRedstone(world, pos, side);
}
}
Aggregations