From 7ee361b0bc3acd28f1073ed24110f8ad36cde6ac Mon Sep 17 00:00:00 2001 From: Dylan Sheehy Date: Mon, 1 Jan 2018 13:15:14 -0600 Subject: [PATCH] Inventory hardware: Now clearing a biomass gains 4000 kJ. --- .../main/java/net/simon987/cubotplugin/CubotInventory.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java b/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java index efd4342..cfd6ce8 100644 --- a/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java +++ b/Plugin Cubot/src/main/java/net/simon987/cubotplugin/CubotInventory.java @@ -38,7 +38,11 @@ public class CubotInventory extends CpuHardware { getCpu().getRegisterSet().getRegister("B").setValue(cubot.getHeldItem()); } else if (a == INV_CLEAR) { - if (cubot.spendEnergy(100)) { + if (cubot.getHeldItem() == 0x0001) { + cubot.storeEnergy(4000); + cubot.setHeldItem(0); + } + else if (cubot.spendEnergy(100)) { cubot.setHeldItem(0); } }