Leaving off `name` in a BookEntry will NPE in random places, should probably be validated somewhere
quat1024 opened this issue ยท 2 comments
Mod loader
Fabric
Minecraft version
1.18.1
Patchouli version
1.18.1-64-FABRIC
Modloader version
Fabric Loader 0.12.11 / fabric 0.44.0+1.18
Modpack info
Incorporeal dev instance
The latest.log file
Issue description
If you leave off name
in an entry's json, the game will unceremoniously NPE in random places when operating on it.
In the linked paste.ee, I crashed the game by opening the Entry Index while there were two entries with the same sortnum
with one missing a name
:
If it doesn't happen there, it'll probably NPE here when trying to draw a button to the screen:
Steps to reproduce
- Write an entry json that doesn't include "name"
- Game explodes much later than it should
Other information
I would prefer if this failed-fast, possibly by failing to load the entry, or warning in the console while replacing the name with "unnamed" or something.
Workspace where i ran in to this: quat1024/incorporeal-3@428dcc2
Related: #291