Shadows-of-Fire / Shadows-of-Greg

An addon for GregTech Community Edition with the goal of making it much more complicated and realistic through the use of GregTech 5 Unofficial and GregTech 6 features.
GNU General Public License v3.0
16 stars 30 forks source link

Processing Arrays with Distinct Buses don't react to fluid input updates #165

Closed NotMyWing closed 3 years ago

NotMyWing commented 3 years ago

Pouring new fluids into a Processing Array with Distinct Buses enabled causes no recipe update, resulting in the multiblock getting stuck until next item input bus update.

Steps to reproduce

  1. Build a Processing Array
  2. Enable Distinct Buses
  3. Insert 1 machine of any kind
  4. Fill the input bus with ingredients
  5. Fill the fluid input hatch with fluid
  6. ???
  7. No reaction
  8. Take items out and re-insert
  9. ???
  10. Yes reaction
Exaxxion commented 3 years ago

This is occurring because both implementations of checkRecipeInputsDirty mutate the lastFluidInputs field from AbstractRecipeLogic, and the Distinct Mode logic calls the superclass implementation before calling a custom implementation once per input bus.

Each check mutates the value of lastFluidInputs so the next call is comparing against the prior call's side effect rather than the value before any checks were performed.