mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
fixed the staff of shadows crashing on magma blocks
This commit is contained in:
parent
081ffb365c
commit
d854be3e34
1 changed files with 5 additions and 1 deletions
|
@ -35,8 +35,12 @@ public class ItemCaveFinder extends ItemImpl {
|
|||
for (int z = -range; z <= range; z++) {
|
||||
BlockPos offset = pos.add(x, y, z);
|
||||
BlockState state = worldIn.getBlockState(offset);
|
||||
try {
|
||||
if (!state.getBlock().canCreatureSpawn(state, worldIn, offset, EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, null))
|
||||
continue;
|
||||
} catch (Exception e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
BlockPos offUp = offset.up();
|
||||
BlockState stateUp = worldIn.getBlockState(offUp);
|
||||
|
|
Loading…
Reference in a new issue