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 equipmentslot enum ordering + add saddle equipmentslot #1125

Open
wants to merge 1 commit into
base: 2.0
Choose a base branch
from

Conversation

spring-dependency-management
Copy link
Contributor

Fixes #1124
Fixes #1111

Copy link
Collaborator

@booky10 booky10 left a comment

Choose a reason for hiding this comment

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

This is not a proper fix and doesn't account for changes in versions and also doesn't account for different usecases of the EquipmentSlot enum in the minecraft protocol
This issue is more complicated to fix than just reordering enum constants

Minecraft has multiple ways of serializing equipment slots to network:

  • the equipment packet uses the enum ordinal
  • the equippable item component uses the "id" (exists since 1.21.2, named "filter flag" in versions before 1.21.2)

yes, this is pretty stupid, but thats just how mojang decided to do things
if you want to figure out a solution for this, go ahead

decompiled source of 1.21.2 EquipmentSlot: https://haste.pinofett.de/rk8whjwvz4.java
decompiled source of 1.21 EquipmentSlot: https://haste.pinofett.de/4tndktzx3w.java

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.

equippable component decodes wrongly slot mappings in the equippable component are wrong
2 participants