Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The pattern provider's round-robin algorithm does not always distribute ingredients evenly. #8392

Open
plapik opened this issue Feb 23, 2025 · 0 comments
Labels
bug Self explanatory?

Comments

@plapik
Copy link

plapik commented Feb 23, 2025

Describe the bug

The round-robin algorithm for pattern providers does not distribute ingredients equally when a provider is placed next to inventories that do not accept ingredients. Any batches that cannot be pushed into certain inventories are unevenly distributed among machines that can accept input, depending on the order in which adjacent inventories are checked.

How to reproduce the bug

  1. Setup ME network like this:
    Image
  • Ensure that the Pattern Provider is touching an inventory that cannot accept ingredients (e.g., the ME Drive in the setup above, it could be any full inventory, or clogged machine).
  1. Encode a pattern (e.g., 1x Cobblestone → 1x Stone) and place it into the Pattern Provider.

  2. Insert the required ingredients into storage.

  3. Start a crafting job that requires multiple ingredient batches but less than the total target machines capacity (e.g., request 100x Stone).

  4. Check the inventories connected to the Pattern Provider, after system finishes distributing items:

  • The chest in front contains 40x Cobblestone.
  • The remaining inventories each contain 20x Cobblestone.

It appears that the chest in front receives items that cannot be inserted into the ME Drive.

Expected behavior

Ingredients should have been split evenly between all available inventories.

Additional details

Tested on forge 47.3.0 and AE2 ver. 15.3.3
Blocking mode somewhat alleviates this problem, but it is not a perfect solution when dealing with long and expensive jobs for machines that can process multiple recipes in parallel.

Which minecraft version are you using?

1.20

On which mod loaders does it happen?

Forge

Crash log

https://pastebin.com/G4tfbFHa

@plapik plapik added the bug Self explanatory? label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Self explanatory?
Projects
None yet
Development

No branches or pull requests

1 participant