use of mekanism.common.block.attribute.AttributeStateFacing in project Mekanism by mekanism.
the class BlockBase method getShape.
@Nonnull
@Override
@Deprecated
public VoxelShape getShape(@Nonnull BlockState state, @Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nonnull ISelectionContext context) {
if (type.has(AttributeCustomShape.class)) {
AttributeStateFacing attr = type.get(AttributeStateFacing.class);
int index = attr == null ? 0 : (attr.getDirection(state).ordinal() - (attr.getFacingProperty() == BlockStateProperties.FACING ? 0 : 2));
return type.get(AttributeCustomShape.class).getBounds()[index];
}
return super.getShape(state, world, pos, context);
}
Aggregations