Applied Energistics 2

Applied Energistics 2

156M Downloads

prominence 2 - electric macerator bug

gama2287 opened this issue ยท 9 comments

commented

Describe the bug

when inserting redstone ore into 2 electric macerators connected with ae2 buses sometimes it fills its input slot from output slots

How to reproduce the bug

connect 2 electric macerators (1 will make redstone crushed dust then send it into the second macerator to make redstone dust) with ae2 subnet and fill the first macerator with redstone ore

Expected behavior

first macerator makes redstone crushed dust and sends it into the second to make redstone dust

Additional details

it happens when the first macerator has some redstone crushed dust in all 4 output slots and runs out of redstone ore so its overclock decreases and it fills its input slot with redstone crushed dust (it has no inserting pipes or redstone crushed dust filtered export buses connected to it)

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Fabric

Crash log

https://gist.github.com/gama2287/72a7225345d56d4a6d0293ad93a4ba77

commented

can you post a screenshot of your setup?

commented

this is indeed an ae2 bug:

  1. ae2 extracts 96 items at once
  2. it can only insert 64 items
  3. it tries to give the remaining 32 items back
  4. inserting into the macerator will put items into the input slots

conceptually, what ae2 is supposed to be doing here is either check first how many items it can even store, and/or abort the transaction and retry while only extracting 64 items

relevant code:

var inserted = inv.getInventory().insert(extractable, extractableAmount, Actionable.MODULATE,
context.getActionSource());
if (inserted < extractableAmount) {
// Be nice and try to give the overflow back
long leftover = extractableAmount - inserted;
leftover -= adjacentStorage.insert(conversion.getVariant(extractable), leftover, tx);
if (leftover > 0) {
AELog.warn("Extracted %dx%s from adjacent storage and voided it because network refused insert",
leftover, extractable);
}
}

I am not sure how likely a fix for 1.20.1 fabric is at this point

commented

2024-07-18_19 21 58

i just figured out that it happens only when import bus has acceleration cards in it

commented

my guess is this happens if the import bus tries extracting more items than can be inserted in the storage bus, and undoing the extraction went wrong
this is something that shouldn't be possible on fabric, but it might happen anyways if ae2 or mi have made a mistake when implementing their transfer handlers
it is weird tho for such a bug to appear now, given that both ae2 and mi version have been released since quite some time...

you might be able to work around this by locking the input slot, tho that could also result in some items being voided instead

commented

thanks for your help
i guess i will just chose another ore processing setup for now and wait for fix

commented

I think you're right about the fix, but I'll hope that a miracle happens
i dont really like other ore processing options in this modpack

commented

for your specific setup: you can use auto eject on the MI machines, and either push in the next machine directly, or into and interface.
both options shouldn't have this issue

commented

thank you! i'll try it

commented

Sorry, we are focused on 1.21+ NeoForge development, and don't have time to go fix this Fabric-specific issue.