From a677ccfe6744fb8a077b9f46bfbcd2c4cbe733af Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 13 Nov 2018 17:13:27 +0100 Subject: [PATCH] only make leaves convert if their chunks are loaded --- .../de/ellpeck/naturesaura/blocks/BlockGoldenLeaves.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldenLeaves.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldenLeaves.java index 2f886c8d..6dbaf6e9 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldenLeaves.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockGoldenLeaves.java @@ -158,8 +158,9 @@ public class BlockGoldenLeaves extends BlockLeaves implements } if (stage > 1) { - EnumFacing facing = EnumFacing.random(rand); - convert(worldIn, pos.offset(facing)); + BlockPos offset = pos.offset(EnumFacing.random(rand)); + if (worldIn.isBlockLoaded(offset)) + convert(worldIn, offset); } } }