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); } }