Closed vladmarica closed 4 years ago
i could swear I've fixed this bug in the past >_> Thank you for your contribution.
Ah, I see, you had previously fixed a similar issue with the MJ Consumer. I guess this solves the problem on the Producer side. Thanks for accepting my PR!
I was testing out my Energy Meters mod using this mod to generate MJ and I noticed that the MJ Producer draws far too much power from the Energy Bridge.
The Problem
If the Energy Bridge is full and the MJ Producer is connected to an
IMjReceiver
that requests 2 MJ, it will supply the 2 MJ and use up all of the energy in the bridge in a single tick. This problem is caused by this segment: https://github.com/Xalcon/EnergyConverters/blob/696bcf8fb9c1c2ced487fcd3bd78172ce3d1b7a7/src/main/java/net/xalcon/energyconverters/common/tiles/TileEntityProducerMj.java#L51-L53available - taken
is an MJ value, it needs to be scaled down to Energy Bridge units before callingretrieveEnergyFromBridge
.