Update to BCLib 0.5.0 and new Fabric API
This commit is contained in:
parent
1d333071dc
commit
a9d1082ed2
72 changed files with 167 additions and 306 deletions
|
@ -35,12 +35,14 @@ public class MossyObsidian extends BaseBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
if (random.nextInt(16) == 0 && !canSurvive(state, world, pos)) {
|
||||
world.setBlockAndUpdate(pos, Blocks.OBSIDIAN.defaultBlockState());
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean canSurvive(BlockState state, LevelReader worldView, BlockPos pos) {
|
||||
BlockPos blockPos = pos.above();
|
||||
BlockState blockState = worldView.getBlockState(blockPos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue