Utils ported

This commit is contained in:
Sebastian Hartte
2020-06-28 15:47:44 +02:00
parent 46955643b9
commit f5412152a4
132 changed files with 488 additions and 528 deletions
@@ -36,11 +36,11 @@ public class QuantumRingBlock extends QuantumBaseBlock {
private static final VoxelShape SHAPE_FORMED = createShape(1.0 / 16.0);
public QuantumRingBlock() {
super(defaultProps(Material.IRON));
super(defaultProps(Material.METAL));
}
@Override
public VoxelShape getShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
public VoxelShape getOutlineShape(BlockState state, BlockView w, BlockPos pos, ShapeContext context) {
final QuantumBridgeBlockEntity bridge = this.getBlockEntity(w, pos);
if (bridge != null && bridge.isCorner()) {
return SHAPE_CORNER;
@@ -51,7 +51,7 @@ public class QuantumRingBlock extends QuantumBaseBlock {
}
private static VoxelShape createShape(double onePixel) {
return VoxelShapes.create(
return VoxelShapes.cuboid(
new Box(onePixel, onePixel, onePixel, 1.0 - onePixel, 1.0 - onePixel, 1.0 - onePixel));
}
}