Skip to content

Conversation

@kennytv
Copy link
Member

@kennytv kennytv commented Feb 27, 2025

Adds support for:

  • completely random underscores within the numbers 💩,
  • hexadecimal and binary numbers,
  • the new signed/unsigned suffix.

This makes -0xabsL or 2____2_____________________________________________________________________________________________________________________________________________________________________________________________________2 valid numbers. In more cases, it may be more lenient than vanilla where it would error, but it should accept what needs to be accepted. I opted to change the existing code with Java number parsing instead of implementing a full blown grammar around scientific notation like Minecraft does 🐥

Does not include changes for number array mixing ([L; 1l, 2i, 3b, 4]) or the escape changes, though I might try to do the first later in a separate PR

@kennytv kennytv force-pushed the feature/snbt-1.21.5 branch from 375a135 to 4186ee1 Compare February 27, 2025 20:58
@kezz kezz added this to the 4.20.0 milestone Feb 27, 2025
@zml2008 zml2008 removed this from the 4.20.0 milestone Mar 7, 2025
@zml2008 zml2008 added this to the 4.21.0 milestone Mar 14, 2025
@kezz kezz added this pull request to the merge queue Apr 24, 2025
Merged via the queue into PaperMC:main/4 with commit afdacd2 Apr 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants