mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
parent
a3998c478d
commit
20f34ecc89
1 changed files with 6 additions and 6 deletions
|
@ -103,18 +103,18 @@ public class WorldGenLushCaves extends WorldGenerator{
|
|||
}
|
||||
|
||||
private boolean checkIndestructable(World world, BlockPos pos){
|
||||
//If this isn't checked, the game crashes because it tries to destroy a chest that doesn't have any loot yet :v
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof ILootContainer){
|
||||
return true;
|
||||
}
|
||||
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
if(state != null){
|
||||
Block block = state.getBlock();
|
||||
if(block != null && (block.isAir(state, world, pos) || block.getHarvestLevel(state) >= 0F)){
|
||||
return false;
|
||||
}
|
||||
|
||||
//If this isn't checked, the game crashes because it tries to destroy a chest that doesn't have any loot yet :v
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if(tile instanceof ILootContainer){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue