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

Fix crafting output not updating sometimes #4692

Merged
merged 2 commits into from
May 27, 2024

Conversation

valaphee
Copy link
Contributor

Crafting recipes are updated within a future, but this future is canceled on any ContainerSetSlotPacket, it should be enough to only cancel the future when the output slot is directly affected.

As on our server the input slots are sent after the output slot is updated which causes that the recipe is never sent. (non-registered/procedural custom recipe)

Copy link
Member

@Camotoy Camotoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. Thanks for the PR.

@Camotoy
Copy link
Member

Camotoy commented May 26, 2024

On second thought, maybe add a comment so people in the future know what the logic in the placement was.

@valaphee
Copy link
Contributor Author

Added some comments, so that it's easier infer-able why the future is canceled after it is ensured that its the crafting grid result slot and that the inventory contains a crafting grid.

@onebeastchris onebeastchris merged commit 3570caa into GeyserMC:master May 27, 2024
2 checks passed
XingLingQAQ pushed a commit to XingLingQAQ/Geyser that referenced this pull request Sep 25, 2024
* Only cancel crafting grid future if slot == 0

* Add some comments
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

Successfully merging this pull request may close these issues.

3 participants