From 9e67ab5725db23f20862dece194bb1c9d850592b Mon Sep 17 00:00:00 2001 From: Kato Date: Sun, 26 Jan 2020 19:18:25 +0100 Subject: [PATCH] Check rubber logs for sap from the ground level. (#2015) Rubber logs can be put down manually, and it's not a given that the most bottom log is at the greenhouse's level. In practice, with the ground made up out of rubber logs, there will be sap on logs at y == 0. --- .../machine/tier1/GreenhouseControllerBlockEntity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/techreborn/blockentity/machine/tier1/GreenhouseControllerBlockEntity.java b/src/main/java/techreborn/blockentity/machine/tier1/GreenhouseControllerBlockEntity.java index edc28487b..1c55551ef 100644 --- a/src/main/java/techreborn/blockentity/machine/tier1/GreenhouseControllerBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/tier1/GreenhouseControllerBlockEntity.java @@ -150,7 +150,7 @@ public class GreenhouseControllerBlockEntity extends PowerAcceptorBlockEntity if (breakBlocks) world.breakBlock(blockPos.up(y), false); } } else if (block instanceof BlockRubberLog) { - for (int y = 1; (blockState = world.getBlockState(blockPos.up(y))).getBlock() == block && y < 10; y++) { + for (int y = 0; (blockState = world.getBlockState(blockPos.up(y))).getBlock() == block && y < 10; y++) { if (blockState.get(BlockRubberLog.HAS_SAP) && canUseEnergy(TechRebornConfig.greenhouseControllerEnergyPerHarvest) && insertIntoInv(Collections.singletonList(TRContent.Parts.SAP.getStack()))