diff --git a/src/main/java/com/direwolf20/charginggadgets/blocks/chargingstation/ChargingStationTile.java b/src/main/java/com/direwolf20/charginggadgets/blocks/chargingstation/ChargingStationTile.java index e258f0a..f400c10 100644 --- a/src/main/java/com/direwolf20/charginggadgets/blocks/chargingstation/ChargingStationTile.java +++ b/src/main/java/com/direwolf20/charginggadgets/blocks/chargingstation/ChargingStationTile.java @@ -106,6 +106,10 @@ private void chargeItem(ItemStack stack) { } public boolean isChargingItem(IEnergyStorage energy) { + // Fix https://github.com/Direwolf20-MC/ChargingGadgets/issues/17 and https://github.com/Direwolf20-MC/MiningGadgets/issues/254 by + // simply setting the value to 0 for the mining gadget. Also fixes it for any other Energy based device that suffers from this bug + // in a single bug fix. + if (energy.getEnergyStored() < 0) energy.setEnergy(0); return energy.getEnergyStored() >= 0 && energy.receiveEnergy(energy.getEnergyStored(), true) >= 0; }