View Issue Details

IDProjectCategoryView StatusLast Update
0000171Industrial-Craft²E-Net, cabling, storage/transformer blockspublic2013-09-22 10:20
Reportertwothe Assigned ToThunderdark  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Summary0000171: Energy-net fails on self-linking
DescriptionThe apparently energy-net does strange things when storage blocks (Batbox) are linked to themselves. In my setup I had a reactor power a batbox, which powered my machines and then a third dead-end batbox after these, the last batbox was linked to the net with both the input and output. At first all boxed filled up properly while the machines were working fine, but when the generator stopped working, strange things happened. Energy was not transmitted even if the last batbox was full, then after reloading the last batbox was transmitting but the first one was no longer. Could not find a work-around for this yet.
Steps To ReproduceIn my setup I had a reactor power a batbox, which powered my machines and then a third dead-end batbox after these, the last batbox was linked to the net with both the input and output.
TagsNo tags attached.
Minecraft Version

Activities

bobcat64

2012-12-15 17:17

reporter   ~0000480

Not to sound like an ass, but don't hook up storage blocks (batbox, MFE, MFSU) to themselves. It may work at first and as long as you pump energy into it and/or keep it filled.

Essentially when the storage block isn't full it tries to take in energy on its input (non-dot) sides. When its connected to itself it sends energy through the cables and back to itself, at which point its still not full and does it again. You can sort of see this effect if you have nothing else taking EU and watch the storageblock, you can see its EU fluctuate.

twothe

2012-12-15 17:37

reporter   ~0000483

The ENet behaved unpredictable and fluctuated, that is a bug.
Whether or not the steps to reproduce it make sense from a wiring perspective is irrelevant.

bobcat64

2012-12-15 18:07

reporter   ~0000484

"The ENet behaved unpredictable and fluctuated, that is a bug.
Whether or not the steps to reproduce it make sense from a wiring perspective is irrelevant."

True, from your post it didn't do what I think it should and behaved differently on reload which shouldn't happen.

However, you did say "Could not find a work-around for this yet." My workaround = don't do it (link storage blocks to themselves) :D

Not saying this isn't a bug, it should be noted, though maybe not marked as 'major'. Probably a quirk with the E-Net model they use.

Some guesswork/rambling from my programming experience: (Note I have no idea of the inner workings of IC2, nor have I made a mod, though I've perused the API some)
Could possibly be partially resolved if the energy emitter knows what block is needing the energy and just check to not emit energy to themselves. (This could possibly be handled in a global ENet manager). The additional overhead of adding the block information may not be worth it (would probably require another API change). If handled in the global ENet manager (I'm assuming there's one) I think it already knows what blocks need energy and which ones can send energy so no overhead there just a simple if statement.

The problem isn't entirely solved by just checking that a block isn't emitting energy to itself. You could make a ring/chain of storage blocks linked back on themselves which would still exhibit this behavior as none of them are emitting to themselves (they're emitting to the next one in the chain). Fixing this would require detecting loops which isn't the easiest or quickest especially if the network is very large, though it would only need to be done/calculated on ENet changes and not every tick.

Finally, I'm not sure how IC2 handles cables and machines in unloaded chunks. My guess is they are ignored and no energy is sent/received. If not then detecting loops would need to also include these cables and machines.

Thunderdark

2013-09-22 10:20

viewer   ~0001499

clean up Manits Bug Tracker..close automatic all Bug report > 6 months if the error still exists in the current version > IC2 2.0.217 please report new Thx.

Issue History

Date Modified Username Field Change
2012-12-14 11:38 twothe New Issue
2012-12-15 17:17 bobcat64 Note Added: 0000480
2012-12-15 17:37 twothe Note Added: 0000483
2012-12-15 18:07 bobcat64 Note Added: 0000484
2013-09-22 10:20 Thunderdark Note Added: 0001499
2013-09-22 10:20 Thunderdark Status new => closed
2013-09-22 10:20 Thunderdark Assigned To => Thunderdark
2013-09-22 10:20 Thunderdark Resolution open => no change required