Curios API (Forge/NeoForge)

Curios API (Forge/NeoForge)

204M Downloads

Nullpointer exception crashes the game instead of giving an error message

MightyFilipns opened this issue ยท 0 comments

commented

Version: 1.20.1
Mod pack ATM 9
I discovered this by giving a bee cage item invalid item data

The problem lies here: https://github.com/TheIllusiveC4/Curios/blob/1.20.x/src/main/java/top/theillusivec4/curios/client/ClientEventHandler.java

Line 127 causes the crash by trying to invoke startWith on contents1.getKey() which appeared to return null causing the game crash.
The game shouldn't crash but some kind of default or error value should be displayed and an error printed in the log.