Skip to content

Rewrite "no face" in digging packet to a valid 1.8 value#673

Merged
florianreuth merged 1 commit intoViaVersion:masterfrom
Beaness:diggingfix
Apr 22, 2026
Merged

Rewrite "no face" in digging packet to a valid 1.8 value#673
florianreuth merged 1 commit intoViaVersion:masterfrom
Beaness:diggingfix

Conversation

@Beaness
Copy link
Copy Markdown
Contributor

@Beaness Beaness commented Apr 22, 2026

A correct fix for the issue that was being experienced in #629
This pr ensures the facing value is never an invalid value and always in the range 1.8 servers accept (0-5)
image

MC 1.7.10: (uses 255)
image

MC 1.8.9: (uses EnumFacing.DOWN equivalent with 0)
image

Copy link
Copy Markdown
Member

@florianreuth florianreuth left a comment

Choose a reason for hiding this comment

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

Ahh this makes sense

@florianreuth
Copy link
Copy Markdown
Member

Or well, you should check for == 255 then instead of > 0, no?

@Beaness
Copy link
Copy Markdown
Contributor Author

Beaness commented Apr 22, 2026

Or well, you should check for == 255 then instead of > 0, no?

Thought it was safer to just completely rewrite everything above > 5 as MC 1.8.9 only really knows 0-5.

The mc server itself does a mod operator on reading the enum which prevented crashes on normal spigot servers (as it wrapped around to a valid enumfacing) but on minestom this probably doesn't exist which caused the crash of that pr.

@florianreuth florianreuth merged commit e7b0606 into ViaVersion:master Apr 22, 2026
1 check passed
@Beaness
Copy link
Copy Markdown
Contributor Author

Beaness commented Apr 22, 2026

(Another technical note for anyone reading: 1.7.10 uses -1 as "no face" too but since the byte is read as an unsigned byte this goes back to 255)

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