[1.16.5] Quantum Entangloporters are drained of all their energy when a harvester from Spatial Harvesters is placed
KirikaAetheria opened this issue ยท 3 comments
Issue description
Using a Quantum Entangloporter to power a harvester block from (Spatial Harvesters will cause the Entangloporter to lose all of its power when the harvester is first placed on it.
I also did some simple tests before submitting this issue. Placing the harvester on Universal Cables or on an output port of the Induction Matrix multiblock will not cause this behaviour to occur. Similarly, if you place the harvester on a Quantum Entangloporter that is not set to eject energy, and then set it to eject energy, there won't be complete power drain either. It happens solely the moment a harvester is placed on an energy output side of the Quantum Entangloporter which is set to eject energy.
Steps to reproduce
- Spawn in a Quantum Entangloporter
- Charge its energy to full
- Set its top side to output energy
- Switch the energy eject setting to On
- Spawn in a level 1 ore harvester from Spatial Harvesters, which can only take in 40,000 energy
- Place it on top of the Quantum Entangloporter so it connects to its top side
- The Quantum Entangloporter's remaining energy will now be zero
Minecraft version
1.16.x or earlier (No longer being developed)
Forge version
36.2.34
Mekanism version
Older
Other relevant versions
No response
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
No response
Seems like the Spatial Harvester defaults the capacity to Integer.MAX_VALUE
when thisBlock == null
.
The thisBlock
field is set on the first tick.
So probably what's going on is, between placement and the first time the Spatial Harvester block entity is ticked, the energy is being injected up to Integer.MAX_VALUE
, then the capacity is set to a lower value when it ticks for the first time, resulting in the energy loss.
That makes sense. I imagine this is pretty unusual behaviour on that mod's part, as I had never seen this happen with any other mod's blocks. However, since other energy sources in Mekanism don't seem to trigger this bug, I thought I'd report it anyway since it could be a sign that the Quantum Entangloporter is handling energy ejection in a way that might not be foolproof.
In light of what you found, do you think it's worth keeping this report open? If you feel this issue is too insignificant, or a rare enough edge-case that it'd be troublesome to try and patch it, or otherwise not worth the trouble of looking into for whatever other reason, let me know and I'll close it.