Industrial Revolution

Industrial Revolution

5M Downloads

[BUG] Pump uses significantly more energy than needed; continues to use the energy when idle upon reconnecting with a power source or server/world restart.

SplendidAlakey opened this issue ยท 2 comments

commented

Description:

When a Pump is initially placed above water and powered, it draws way too much power (roughly 100k). Then, if you destroy the connection (cable) that connects it to a power source and connect it again, it will draw more energy, despite not needing any (roughly 15k). And if you leave and rejoin the single player world or restart the server, the pump will draw roughly 100k units of power, the same way as it does when you initially connect it to a power source.

Steps to Reproduce:

  1. Create a world. Get 1 Pump, 1 Lazuli flux container creative, 1 Lazuli flux container mk3 (the issue is reproducible with any container, but is the easiest to spot with mk3), any amount of cables mk4 necessary.
  2. Place the Pump above a water source.
  3. Place Lazuli flux container creative and Lazuli flux container mk3 next to each other and wait until the mk3 one gets full.
  4. Remove the creative container.
  5. Connect the Pump and Lazuli flux container mk3 with cables mk4, use as many as you need.
  6. Right-click on the Lazuli flux container mk3 to observe that the Pump drained about 100k of power.
  7. Disconnect/break a cable.
  8. Reconnect/place the cable.
  9. Right-click on the Lazuli flux container mk3 to observe that the Pump drained about 15k of power.
  10. Repeat steps 7-9 as many times as you want, each time observing a power drain of approximately 15k points.
  11. Leave more than 100k energy in the container for the next test and keep Lazuli flux container mk3 and the Pump connected.
  12. Save and quit the world.
  13. Join the world again.
  14. Right-click the Lazuli flux container mk3 to observe that the Pump drained about 100k of power.
  15. Repeat steps 11-14 as many times as you want, each time observing a power drain of approximately 100k points.

The same issue can be replicated on a server, but you will have to restart the server, rather than simply rejoin. Happens on both newly created worlds and already existing ones. That means if you have a bunch of pumps on your server, each time you restart it, you will lose large amounts of energy.

Technical Information:

Minecraft: 1.17.1
Fabric API: 0.37.2
Industrial Revolution: indrev-1.10.0-alpha.12
Modpack: none, I removed all my mods to test this issue
Fabric language kotlin: fabric-language-kotlin-1.6.3+kotlin.1.5.21

Logs:

Let me know if there are any logs I can provide.

Details:

Here's a screenshot of the setup I made when testing this issue:

2021-08-12_20 43 21

On the right side is the Lazuli flux container creative. In the middle is the Lazuli flux container mk3. The Pump is on the left. After filling up the mk3 container, it had 1mil energy. Connecting it to the Pump made it drop to 901.4k. Disconnecting and reconnecting the pump by breaking and placing a cable 3 times, checking the energy each time it went: 901.4k --> 885.1k --> 868.7k --> 852.3k. I left the Pump and the mk3 container connected, then I saved & quit the world, rejoined and the energy was at 754.0k.

commented

Thanks for the report, turns out it's actually another issue.,

The part of breaking cables losing energy is because the network now stores energy and it's capacity is based on the amount of cables connected, so when you break one you lose a little energy. This is intended behavior.

The part of restarting the world losing energy is because the network energy is not being saved at all, which will be fixed soon

commented

Ahhhh thank you very much for this! I've been losing 10mil energy units every time I updated my mods on the server ๐Ÿ˜