When auto-input is enabled, the machine will void all energy from the neighbor energy storage.
Cause
Currently, ForgeEnergyHandler extracts everything the neighbor energy storage can provide, instead of extracting precisely the amount a machine can except.
We know how much energy a machine can accept according to maxInserted, so we should extract exactly that amount instead of maxAmount, which is Integer.MAX_VALUE and makes neighbor energy storage extract virtually everything into the void.
Description
When auto-input is enabled, the machine will void all energy from the neighbor energy storage.
Cause
Currently,
ForgeEnergyHandler
extracts everything the neighbor energy storage can provide, instead of extracting precisely the amount a machine can except. We know how much energy a machine can accept according tomaxInserted
, so we should extract exactly that amount instead ofmaxAmount
, which isInteger.MAX_VALUE
and makes neighbor energy storage extract virtually everything into the void.