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

GuiItem - do not mutate given ItemStack #96

Merged
merged 2 commits into from
Nov 2, 2023
Merged

GuiItem - do not mutate given ItemStack #96

merged 2 commits into from
Nov 2, 2023

Conversation

Wruczek
Copy link
Contributor

@Wruczek Wruczek commented Jun 14, 2023

Using GuiItem constructor with an ItemStack, or using GuiItem.setItemStack method adds NBT data to the provided ItemStack, which is an unexpected and undocumented behaviour.
This pull request updates the GuiItem constructor and GuiItem.setItemStack method, so that the ItemStacks are cloned before being mutated.

@LichtHund LichtHund merged commit f80965c into TriumphTeam:master Nov 2, 2023
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