diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java index 01c87bdb7..b44652792 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/gen/WorldGenLushCaves.java @@ -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; }