Fixed hitbox

This commit is contained in:
2025-11-12 20:27:50 +01:00
parent 8d81724bd4
commit 1306558045
@@ -50,16 +50,16 @@ public class CableBlock extends Block {
@Override @Override
protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { protected VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
VoxelShape shape = Block.createCuboidShape(6, 0, 6, 10, 1, 10); // center post VoxelShape shape = Block.createCuboidShape(6, 6, 6, 10, 10, 10);
if (state.get(NORTH)) if (state.get(NORTH))
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 0, 0, 10, 1, 6)); shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 0, 10, 10, 6));
if (state.get(SOUTH)) if (state.get(SOUTH))
shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 0, 10, 10, 1, 16)); shape = VoxelShapes.union(shape, Block.createCuboidShape(6, 6, 10, 10, 10, 16));
if (state.get(EAST)) if (state.get(EAST))
shape = VoxelShapes.union(shape, Block.createCuboidShape(10, 0, 6, 16, 1, 10)); shape = VoxelShapes.union(shape, Block.createCuboidShape(10, 6, 6, 16, 10, 10));
if (state.get(WEST)) if (state.get(WEST))
shape = VoxelShapes.union(shape, Block.createCuboidShape(0, 0, 6, 6, 1, 10)); shape = VoxelShapes.union(shape, Block.createCuboidShape(0, 6, 6, 6, 10, 10));
return shape; return shape;
} }