Mekanism Tools

Mekanism Tools

77M Downloads

[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

commented

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.

Before

After

Steps to reproduce

  1. Spawn in a Quantum Entangloporter
  2. Charge its energy to full
  3. Set its top side to output energy
  4. Switch the energy eject setting to On
  5. Spawn in a level 1 ore harvester from Spatial Harvesters, which can only take in 40,000 energy
  6. Place it on top of the Quantum Entangloporter so it connects to its top side
  7. 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

commented

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.

commented

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.

commented

Yeah looks like it is due to weirdness on their end, and given in 1.18 the blockstate is known from the beginning shouldn't be an issue there