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

[BUG] Shift clicking stack into machine doesn't start recipe #445

Closed
1 task done
Rover656 opened this issue Aug 10, 2023 · 2 comments · Fixed by #467
Closed
1 task done

[BUG] Shift clicking stack into machine doesn't start recipe #445

Rover656 opened this issue Aug 10, 2023 · 2 comments · Fixed by #467
Labels
MC-1.20.1 P-1-Medium Medium priority. Potentially deleting items or breaking functionality. Type-Bug There is a problem.

Comments

@Rover656
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

If you shift click items into a stack that doesn't quite reach the input requirements for a recipe in the alloy smelter, the updated stacks will not cause the smelting to start.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

@Rover656 Rover656 added Type-Bug There is a problem. Status-Triage A Triage Member should take a look at this MC-1.20.1 P-1-Medium Medium priority. Potentially deleting items or breaking functionality. and removed Status-Triage A Triage Member should take a look at this labels Aug 10, 2023
@jollycar
Copy link
Contributor

example: nethercotta

@ChikyuKido
Copy link
Contributor

Hello,
The error seems to be in the MachineMenu class in the moveItemStackTo method. The only thing I could quickly observe is that if an item is already inside, the item stack of the slot is increased, and then slot.setChanged(); is called. However, if there is no item inside, slot1.set(item); is called. The slot1.set() invokes the following method:

public void set(ItemStack stack) {
this.container.setItem(this.slot, stack);
this.setChanged();
}

It appears that "this.container.setItem(this.slot, stack)" updates the machine and then checks if there is an available recipe. That's why I made this commit here: c551606. Instead of using setChanged();, I simply use set(itemstack). This calls the update method and it works. Without delving further into the codebase to find a better solution, this is what I have for now. I hope this is suitable. If yes, the PR is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MC-1.20.1 P-1-Medium Medium priority. Potentially deleting items or breaking functionality. Type-Bug There is a problem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants