Skip to content

Save original int map ID if conversion is lossy - #1341

Open
roccodev wants to merge 1 commit into
ViaVersion:masterfrom
roccodev:feature/int-map-id
Open

roccodev wants to merge 1 commit into
ViaVersion:masterfrom
roccodev:feature/int-map-id

Conversation

@roccodev

Copy link
Copy Markdown
Contributor

In 1.13+, map IDs are no longer encoded in the item damage, so their maximum value was bumped to the 32 bit limit.

This PR makes it so, when going 1.13->1.12 and if the original map has an ID too large:

  • The original ID is still kept in the map nbt tag
  • The damage value wraps around 32767. Previously, the short cast would make it so every map ID mapped to a negative short value would use a damage value of 0, which would make the client cache them under the same key. Note that maps with an ID distance of >32767 might still conflict, but this is better than before.

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.

1 participant