From 8e6d29272bf3dd6daf0690e6c7940727a933cac0 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 16 Dec 2018 18:27:56 +0100 Subject: [PATCH] allow the herbivorous absorber to also pick up flowers above and below it Closes #19 --- .../blocks/tiles/TileEntityFlowerGenerator.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java index 3c70e037..d0881e83 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityFlowerGenerator.java @@ -32,11 +32,13 @@ public class TileEntityFlowerGenerator extends TileEntityImpl implements ITickab List possible = new ArrayList<>(); int range = 3; for (int x = -range; x <= range; x++) { - for (int z = -range; z <= range; z++) { - BlockPos offset = this.pos.add(x, 0, z); - IBlockState state = this.world.getBlockState(offset); - if (NaturesAuraAPI.FLOWERS.contains(state)) { - possible.add(offset); + for (int y = -1; y <= 1; y++) { + for (int z = -range; z <= range; z++) { + BlockPos offset = this.pos.add(x, y, z); + IBlockState state = this.world.getBlockState(offset); + if (NaturesAuraAPI.FLOWERS.contains(state)) { + possible.add(offset); + } } } }