GregTechCEu / GregTech-Modern

GregTech CE Unofficial for modern versions
GNU Lesser General Public License v3.0
266 stars 157 forks source link

ZPM components only work ordered, and the order in which they need to go in is random #431

Closed screret closed 10 months ago

screret commented 11 months ago

GregTech CEu Version

1.0.12.f

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

No

Expected Behavior

All assembly line recipes to work in any input order, as that feature isn't implemented.

Actual Behavior

(some?) ZPM components require ordered inputs, and the order is nondeterministic & changes on reload.

Steps to Reproduce

1) build assembly line, ZPM or above 2) try to craft ZPM emitter 3) no worky 4) change inputs to be in the order that the controller GUI has the input buses in 5) it works, somehow

Additional Information

No response

Yefancy commented 10 months ago

~I cant reproduce it?~

Yefancy commented 10 months ago

cause: recipe requires 32 foil + 64 foil instead of 96 foil

regarding the case that the hatch A has 64 foil and the hatch B has 32 foil during recipe searching, hactch A supply 32 foil (so it left 32 foil), and be marked as used, meanwhile, the left recipe requirments are (0 foil) + 64 foil. howerver, hatch B can only supply 32 foil and the hatch A is marked as used which could not be extracted anymore.

Yefancy commented 10 months ago

solution:

  1. make recipe using 96 foil instead. (easiest)
  2. merge available ingredients before each searching (time-comsuming, terrible performance)
  3. make assembly to work in order. (increased the difficulty)
  4. introduce a new mechanism, ingredient needs to be an exact matching. (increased the difficulty)
Yefancy commented 10 months ago

I prefer 1 and 3.

mikerooni commented 10 months ago

I prefer 1 and 3 as well.

I think option 3 could be quite nice in terms of gameplay, even if it does require a bit more planning for the setup.

For option 1, you'd have to make sure it's summed while building the recipe, so that we don't end up with undefined behavior in modpacks adding their own recipes.

Yefancy commented 10 months ago

yeah, nvm. I found out another way to just fix it and without force input order. well, input order can be considered in the future I think (as an optional feature, maybe?)

mikerooni commented 10 months ago

Yeah that would be nice indeed.

Maybe just forcing it for certain recipes could be a nice addition ^^

ghzdude commented 10 months ago

In 1.12 GT, there's a config for ordered inputs for the assembly line; the options are (iirc) unordered, ordered items, and ordered items/fluids.