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

PatternHelper are changed by lock crafting. #520

Open
Forever-178 opened this issue Dec 16, 2024 · 2 comments
Open

PatternHelper are changed by lock crafting. #520

Forever-178 opened this issue Dec 16, 2024 · 2 comments

Comments

@Forever-178
Copy link

Describe the bug

PatternHelper will be changed when crafting results return network in lock crafting mode.

unlockStack.setStackSize(remainingAmount);

Because method getPrimaryOutput return the reference but copy. I recommend use unlockStack = pattern.getPrimaryOutput().copy(); in line 1164.
@zeng-github01

unlockStack = pattern.getPrimaryOutput();

To Reproduce

  1. Build a simple me network and create a pattern with output item greater than 1.
  2. Submit this craft job and return result items one by one.
  3. Submit the craft job again. Crafting plan provides wrong statistic and me interface's unlockStack has wrong item count.

Additional context
ME network
2024-12-17_00 43 27

Pattern and me interface
2024-12-17_00 43 33

Wrong crafting plan
2024-12-17_00 44 38

Other things
At first craft job, craft complete notice are show when first item insert to interface. It should be show after all item returns.

@zeng-github01
Copy link

zeng-github01 commented Dec 17, 2024

I see,i will fix it ASAP

I first learned C#, and I forgot that the two handle references differently. sorry

zeng-github01 added a commit to zeng-github01/Applied-Energistics-2 that referenced this issue Dec 29, 2024
@zeng-github01
Copy link

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants