GTNewHorizons / GT-New-Horizons-Modpack

A big progressive questing modpack for Minecraft 1.7.10 balanced around the mod GregTech.
https://www.gtnewhorizons.com/
Other
1.02k stars 311 forks source link

Subnet contents not visible through storage busses #17950

Open Kyramesh opened 2 weeks ago

Kyramesh commented 2 weeks ago

Your GTNH Discord Username

Kyramesh

Your Pack Version

2.7 Beta 3

Your Server

SP

Java Version

Java 21

Type of Server

None

Your Expectation

Making contents of an AE net available through Interface -> filtered Storage bus connections.

The Reality

Content of net A is inexplicably not visible in net B (in terminal and for autocrafting). Examples: https://discord.com/channels/181078474394566657/522098956491030558/1305298344259883159 Stocking Bus seems to be able to access contents even though a terminal can't.

https://discord.com/channels/181078474394566657/522098956491030558/1305901151102963743 Having storabge busses "importing" and "exporting" contents, especially if mutltiple nets are involed, seems to cause this, even if the storage busses are filtered in such a way that no recursive loop could form.

I think this issue then causes the following error when attempting to order crafts, which involve items from other nets: grafik

I can't consistently cause the issue to arise. The system works fine for a while and then stops, for yet to determine reasons.

Your Proposal

Identify the issue and fix it.

Final Checklist

Kyramesh commented 2 weeks ago

Examples of the filtered storage busses: grafik grafik (quicklime later added here to fix the problem)

hiroscho commented 2 weeks ago

Oh hell yeah, here comes the bug report where I get a headache trying to fix my mess.

The extract filtering has two slightly different behaviors:

  1. Get all available items
  2. Get a single item

The first case is a dumb implementation that just gets all available items from the connected network and then filters them, this one is the problem. The second one doesn't have this problem since it checks the filter first and only then checks the connected network.

The reason why the problem exists is that AE2 has recursion protection, meaning the same network will not be checked twice. In this case the first storage bus gets all available items and filters them, this is fine. However the second storage bus when trying to get all available items will notice that the network was already scanned once and skip the scan.