GregTechCEu / GregTech-Modern

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

Chanced output cache can be exploited with parallel recipes #1909

Closed ineternet closed 1 month ago

ineternet commented 1 month ago

Checked for existing issues

Tested latest version

GregTech CEu Version

v1.4.0

Minecraft Version

1.20.1

Recipe Viewer Installed

None

Environment

Singleplayer

Cross-Mod Interaction

No

Other Installed Mods

Monifactory

Expected Behavior

A machine running in parallel should "run the recipe X times," and therefore make X separate rolls on chanced outputs. If I process a total of 1000 items on a 10% output chance, I expect to get 100 items.

Actual Behavior

The cache is incremented every time a recipe runs, which counts parallel recipes as a single recipe. The amount of items being processed in total/over time is not considered. You get more value out of your inputs by figuring out the initial RNG and then adding the chances of recipes in your head, using a parallelized recipe right before the counter resets.

Steps to Reproduce

https://github.com/user-attachments/assets/7749bd7b-c284-434e-9341-88960ed4a0ed

Additional Information

No response

YoungOnionMC commented 1 month ago

fixed in #1911