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 discarding of custom trim patterns/materials #4642

Merged
merged 2 commits into from
May 7, 2024

Conversation

eclipseisoffline
Copy link
Contributor

This PR fixes discarding of custom trim patterns/materials by checking for the namespace of the trim pattern/material and discarding it if the namespace is not minecraft.

Previously, the Holder#isCustom method was used, but this doesn't work since the Minecraft server sends the trim patterns and materials registries to the client and then sends holders with int IDs instead of direct objects.

Note: I added a getNamespace(String identifier) method to the ArmorItem class. I'm not sure if there's already a similar method available, or if there's a better class it should go in, please do let me know.

@onebeastchris onebeastchris merged commit cda7a19 into GeyserMC:master May 7, 2024
2 checks passed
XingLingQAQ pushed a commit to XingLingQAQ/Geyser that referenced this pull request Sep 25, 2024
* Fix discarding of custom trim patterns/materials

* Rename `stripNamespace` method to reflect its behaviour
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.

2 participants