SpyglassMC / vanilla-mcdoc

The vanilla definition files using the schema format, mcdoc, for describing data structures used by Minecraft, including its CODECs, JSONs, and NBTs
MIT License
15 stars 5 forks source link

Ensure mojang's cursed/edge-case JSON codec inlining in NBT is supported #14

Open MulverineX opened 1 month ago

MulverineX commented 1 month ago
### Tasks
- [ ] Painting entity data
- [ ] Trims (yes, in 1.20.5 too)
- [ ] Goat Horns (yes, in 1.20.5 too)
- [ ] Find more :concern:
MulverineX commented 1 month ago

Honorable mention: jukebox song sound events. It appears that mojang hardcodes range for these, because custom sound events require an object to wrap the sound event id.

https://github.com/SpyglassMC/vanilla-mcdoc/blob/9ac13a62e49c3f79e1784815708ef0fe1e19d457/java/data/variants/jukebox_song.mcdoc#L8-L12

https://github.com/SpyglassMC/vanilla-mcdoc/blob/9ac13a62e49c3f79e1784815708ef0fe1e19d457/java/data/variants/jukebox_song.mcdoc#L15-L20

Nico314159 commented 1 month ago

Hmm, it might be helpful to have a not in the type syntax. So you could do float not 0 instead of using a really small number for the range minimum. (Just food for thought)

MulverineX commented 1 month ago

I mean they're also not negative, so it may be more realistic to have built-in literal variables.

float @ %MIN_POS_FLOAT..

misode commented 1 month ago

mcdoc supports exclusive ranges: float @ 0<.. https://spyglassmc.com/user/mcdoc/#number-range