AppliedEnergistics / Applied-Energistics-2

A Minecraft Mod about Matter, Energy and using them to conquer the world..
https://appliedenergistics.github.io/
Other
1.41k stars 648 forks source link

prominence 2 - electric macerator bug #8044

Closed gama2287 closed 1 month ago

gama2287 commented 2 months ago

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

Mari023 commented 2 months ago

can you post a screenshot of your setup?

gama2287 commented 2 months ago

2024-07-18_19 21 58

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

Mari023 commented 2 months ago

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

gama2287 commented 2 months ago

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

Mari023 commented 2 months ago

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: https://github.com/AppliedEnergistics/Applied-Energistics-2/blob/c718acc75ab7a52d03204f08178b4b0ecd8ce439/src/main/java/appeng/parts/automation/StorageImportStrategy.java#L101-L112

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

gama2287 commented 2 months ago

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

Mari023 commented 2 months ago

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

gama2287 commented 2 months ago

thank you! i'll try it

Technici4n commented 1 month ago

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