Integrated Dynamics

Integrated Dynamics

63M Downloads

[1.12.2] Any powered lever adjacent to a Battery will add energy output over existing Energy Importers (Integrated Tunnels), exceeding the max output rate

Jack-McKalling opened this issue ยท 6 comments

commented

Issue type:

  • ๐Ÿ› Bug

Short description:

When actively extracting power from an Energy Battery with an Energy Importer, adding a powered lever adjacent to the battery will add energy extraction over the Importer regardless of whether it is already extracting itself (also ignoring its tick/operation setting), doubling the output and thus violating the Battery's max output rate.

Steps to reproduce the problem:

  1. Place a full 1M Battery
  2. Attach a logic cable to it, with an energy consuming machine on the other end
  3. Attach an Energy Interface to the machine
  4. Attach an Energy Importer to the Battery, and set its top slot's Transfer Rate Limit property to 2000 (max for this Battery)
  5. Place and power a lever adjacent to the Battery

    โœ”๏ธ No energy is transferred to the machine yet

  6. Insert a boolean variable card with value "false" into the Importer's top slot

    โŒ Energy transfers at a rate of 2000/t, ignoring the importer's disabled state

  7. Replace variable card with a blank variable card

    โŒ Energy now transfers at a rate of 4000/t, exceeding the max output rate

Expected behaviour:

A lever should not allow a Battery to extract power over any existing Energy Importers also attached to the Battery. They define their own settings (such as ticks/operation) and contain variable cards with specific instructions, that the lever is ignoring.

When an energy importer is available on a Battery, but it is not actively extracting power, adding an active redstone power source to the Battery could potentially be made to override the Importer's variable card and transfer regardless. However, all settings of the Importer should be taken into account when doing so.

But if the Importer is actively extracting, adding a lever should not add any energy transfer to it at all, as transfer is already taking place from that side of the Battery.


Versions:

  • This mod: 1.12.2-1.1.6
  • Integrated Tunnels: 1.12.2-1.6.11
  • Minecraft: 1.12.2
  • Forge: 14.23.5.2854

Log file:

commented

Thanks for reporting!

Step 6 is in fact a consequence of CyclopsMC/IntegratedTunnels#75, which I hope will be implemented soon.

Going from step 6 to 7 is intentional, as there are two actors that are performing an energy transfer action. Namely the battery and the importer. So having double the transfer rate is expected behaviour.

I'm going to follow up on this in CyclopsMC/IntegratedTunnels#75, feel free to add more comments there if needed.

commented

I know there are two actors involved at step 7, but it happens on the same side. So you're saying the max rate applies to each actor and not just the battery itself?

Also, thanks for linking the other issue, I wasn't aware of that one.

commented

So you're saying the max rate applies to each actor and not just the battery itself?

In every tick, the following happens:

  • Battery exports with its max rate (2000) into importer since lever is on.
  • Importer extracts from battery at max rate of battery (2000)

=> Every tick, 4000 is moved.

commented

Yes I understood that, but I meant, the concept of the battery's max rate. It is applied to each actor's action, as opposed to limiting what a battery can output (what I expected).

commented

Indeed, the battery's rate is applied to each action. Actually counting what is moved in each tick (while possible) would add too much overhead to the battery's logic, and make it less server-friendly.

commented

I understand. Thanks for explaining. I'll follow the other issue then, for this overal problem.