Update to BCLib 0.5.0 and new Fabric API

This commit is contained in:
paulevsGitch 2021-11-06 16:45:43 +03:00
parent 1d333071dc
commit a9d1082ed2
72 changed files with 167 additions and 306 deletions

View file

@ -47,6 +47,7 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
}
@Override
@SuppressWarnings("deprecation")
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
return state.getValue(LEAF) ? SHAPES.get(Axis.Y) : SHAPES.get(state.getValue(FACING).getAxis());
}
@ -57,6 +58,7 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
}
@Override
@SuppressWarnings("deprecation")
public FluidState getFluidState(BlockState state) {
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
}
@ -71,16 +73,19 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
}
@Override
@SuppressWarnings("deprecation")
public BlockState rotate(BlockState state, Rotation rotation) {
return BlocksHelper.rotateHorizontal(state, rotation, FACING);
}
@Override
@SuppressWarnings("deprecation")
public BlockState mirror(BlockState state, Mirror mirror) {
return BlocksHelper.mirrorHorizontal(state, mirror, FACING);
}
@Override
@SuppressWarnings("deprecation")
public BlockState updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom) {
if (state.getValue(WATERLOGGED)) {
world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));