[bug] NullPointerException if `Core.lastServerPlayerEntity` is null
LemmaEOF opened this issue ยท 1 comments
Version
Minecraft 1.15
Describe the bug
If Core.hasClientMod
is called before Core.lastServerPlayerEntity
is set, then an NPE will be thrown. Core.hasClientMod
can be called before the server's presence packet is received and processed, causing this crash.
To Reproduce
- Call
Core.hasClientMod
(called in NBT Crafting's hooks for caching matching stacks) - NPE is thrown
Expected behavior
A null-check should be done which returns false by default if NBT crafting isn't present
Log
https://gist.github.com/Boundarybreaker/d8eb042e76076464773d0ba3dd20053d
Additional context
Occurred when trying out a new compat method for LibCD and NBT Crafting
Good and helpful description. Will be fixed fast.
Still a duplicate to #33 (That title is really misleading - not your fault :) )