Fix alarm shape
This commit is contained in:
parent
e01e9398ea
commit
2794c813eb
1 changed files with 8 additions and 8 deletions
|
@ -66,19 +66,20 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
public BlockAlarm() {
|
||||
super(Block.Properties.create(Material.ROCK));
|
||||
this.setDefaultState(this.stateContainer.getBaseState().with(FACING, EnumFacing.NORTH).with(ACTIVE, false));
|
||||
this.shape = GenCuboidShapes(0.19, 0.81);
|
||||
this.shape = GenCuboidShapes(3, 10);
|
||||
RebornModelRegistry.registerModel(new ModelCompound(TechReborn.MOD_ID, this, "machines/lighting"));
|
||||
BlockWrenchEventHandler.wrenableBlocks.add(this);
|
||||
}
|
||||
|
||||
private VoxelShape[] GenCuboidShapes(double depth, double width) {
|
||||
double culling = (16.0D - width) / 2 ;
|
||||
VoxelShape[] shapes = {
|
||||
Block.makeCuboidShape(width, 1.0 - depth, width, 1.0 - width, 1.0D, 1.0 - width),
|
||||
Block.makeCuboidShape(width, 0.0D, width, 1.0 - width, depth, 1.0 - width),
|
||||
Block.makeCuboidShape(width, width, 1.0 - depth, 1.0 - width, 1.0 - width, 1.0D),
|
||||
Block.makeCuboidShape(width, width, 0.0D, 1.0 - width, 1.0 - width, depth),
|
||||
Block.makeCuboidShape(1.0 - depth, width, width, 1.0D, 1.0 - width, 1.0 - width),
|
||||
Block.makeCuboidShape(0.0D, width, width, depth, 1.0 - width, 1.0 - width),
|
||||
Block.makeCuboidShape(culling, 16.0 - depth, culling, 16.0 - culling, 16.0D, 16.0 - culling),
|
||||
Block.makeCuboidShape(culling, 0.0D, culling, 16.0D - culling, depth, 16.0 - culling),
|
||||
Block.makeCuboidShape(culling, culling, 16.0 - depth, 16.0 - culling, 16.0 - culling, 16.0D),
|
||||
Block.makeCuboidShape(culling, culling, 0.0D, 16.0 - culling, 16.0 - culling, depth),
|
||||
Block.makeCuboidShape(16.0 - depth, culling, culling, 16.0D, 16.0 - culling, 16.0 - culling),
|
||||
Block.makeCuboidShape(0.0D, culling, culling, depth, 16.0 - culling, 16.0 - culling),
|
||||
};
|
||||
return shapes;
|
||||
}
|
||||
|
@ -169,7 +170,6 @@ public class BlockAlarm extends BaseTileBlock {
|
|||
|
||||
@Override
|
||||
public VoxelShape getShape(IBlockState state, IBlockReader worldIn, BlockPos pos) {
|
||||
// TODO: Fix this
|
||||
return shape[getFacing(state).getIndex()];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue