From e1f0bf63c317ae074ac065e5e1573848db9d8681 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 23 Nov 2018 17:15:42 +0100 Subject: [PATCH] fixed the tree ritual not working right with acacia closes #13 --- .../blocks/tiles/TileEntityWoodStand.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java index c20ee189..726dc07d 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityWoodStand.java @@ -129,14 +129,18 @@ public class TileEntityWoodStand extends TileEntityImpl implements ITickable { return; } - for (EnumFacing facing : EnumFacing.VALUES) { - BlockPos offset = pos.offset(facing); - IBlockState state = this.world.getBlockState(offset); - if (state.getBlock() instanceof BlockLog || state.getBlock() instanceof BlockLeaves) { - this.world.setBlockToAir(offset); - PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(offset.getX(), offset.getY(), offset.getZ(), 2)); + for (int x = -1; x <= 1; x++) { + for (int y = -1; y <= 1; y++) { + for (int z = -1; z <= 1; z++) { + BlockPos offset = pos.add(x, y, z); + IBlockState state = this.world.getBlockState(offset); + if (state.getBlock() instanceof BlockLog || state.getBlock() instanceof BlockLeaves) { + this.world.setBlockToAir(offset); + PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(offset.getX(), offset.getY(), offset.getZ(), 2)); - this.recurseTreeDestruction(offset, start); + this.recurseTreeDestruction(offset, start); + } + } } } }