BuildCraft|Core

BuildCraft|Core

7M Downloads

Kinesis Pipe interaction with AE Energy Acceptors

Opened this issue ยท 1 comments

commented

Description

Whenever an AE Energy Acceptor is hooked up to a source of energy via Kinesis Pipes, the extraction pipe instantly goes into overload mode (turns red) and drains the source at full power indefinitely, despite the Energy Acceptor not consuming any energy. This is reflected by the regular (non-extraction) Kinesis Pipe showing no (or very little) power passing through.

2014-12-01_21 50 53

Testing

The pipes interact as expected with many other blocks and mods: Lasers (BC), Energy Cells (TE), Rolling Machines (Railcraft) and Carpenters (Forestry) tested out just fine.
Also, Energy Acceptors behave as expected when powered by other means such as Rednet Energy Cables (MFR), IC2 cables or by touching a source of RF energy directly.

Analysis

I have further tested the Energy Acceptor with a debug tool that sends an amount of RF via IEnergyHandler.receiveEnergy twice, once with the 'simulate' flag set and once with the flag cleared and I have come up with a likely cause:

The Energy Acceptor always accepts any amount of energy when the simulate flag is set (methof call returns that amount). Only during the transaction (simulate=false) does the Acceptor return the actual amount of energy consumed (i.e. 0 if the internal buffer is full).

It appears that Kinesis Pipes rely on the value returned by the simulation rather than on how much was accepted during the actual transaction. This works just fine as long as the values are conistent both situations but breaks horribly in this corner case.

Possible solution

Kinesis Pipes should rely on the value returned by the transaction rather than on the value indicated by the simulation.

Affected versions

Tested with buildcraft-6.2.1 and appliedenergistics2-rv1-stable-1 as well as appliedenergistics2-rv2-alpha-26

commented

The value during simulation is used to tell the extraction pipes how much energy to extract. It is AE2 doing the wrong thing here, as they break the RF API contract by not accepting energy they declared they would accept.