Fixed model
This commit is contained in:
@@ -52,13 +52,18 @@ public class CableBlock extends Block {
|
||||
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
||||
VoxelShape shape = Block.createCuboidShape(6, 6, 6, 10, 10, 10);
|
||||
|
||||
if (state.get(NORTH))
|
||||
boolean north = state.get(NORTH);
|
||||
boolean south = state.get(SOUTH);
|
||||
boolean east = state.get(EAST);
|
||||
boolean west = state.get(WEST);
|
||||
|
||||
if (north)
|
||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 0, 10, 10, 6));
|
||||
if (state.get(SOUTH))
|
||||
if (south)
|
||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 10, 10, 10, 16));
|
||||
if (state.get(EAST))
|
||||
if (east)
|
||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(10, 6, 6, 16, 10, 10));
|
||||
if (state.get(WEST))
|
||||
if (west)
|
||||
shape = VoxelShapes.union(shape, Block.createCuboidShape(0, 6, 6, 6, 10, 10));
|
||||
|
||||
return shape;
|
||||
|
||||
Reference in New Issue
Block a user