From 0dae10eed4f37bb4c5fc2f3f4b82e3d1134dcf88 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 29 Jan 2021 18:06:54 +0100 Subject: [PATCH] Fixed an Oak Generator crash with some modded world gen Closes #176 --- .../java/de/ellpeck/naturesaura/blocks/BlockOakGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockOakGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockOakGenerator.java index 2e55bc2a..5d650bf4 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockOakGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockOakGenerator.java @@ -34,7 +34,7 @@ public class BlockOakGenerator extends BlockContainerImpl implements IVisualizab public void onTreeGrow(SaplingGrowTreeEvent event) { IWorld world = event.getWorld(); BlockPos pos = event.getPos(); - if (!world.isRemote() && IAuraType.forWorld(world).isSimilar(NaturesAuraAPI.TYPE_OVERWORLD) + if (world instanceof World && !world.isRemote() && IAuraType.forWorld(world).isSimilar(NaturesAuraAPI.TYPE_OVERWORLD) && world.getBlockState(pos).getBlock() instanceof SaplingBlock) { Helper.getTileEntitiesInArea(world, pos, 10, tile -> { if (!(tile instanceof TileEntityOakGenerator))