Language Reload

Language Reload

1M Downloads

Cannot read field "multilingualItemSearch" because the return value of "jerozgen.languagereload.config.Config.getInstance()" is null

liangmoe opened this issue ยท 1 comments

commented

after updating paladin's furniture mod from 1.1.1 to 1.2 (1.19.2 fabric) and the crash hapenned
crash-2023-11-13_11.58.27-client.txt
latest.log

commented

to the dev: i would suggest loading if INSTANCE is null in the getInstance method here: https://github.com/Jerozgen/LanguageReload/blob/9348fb3fa51af2d9b4ef0409208ce2a3d8f4e683/src/main/java/jerozgen/languagereload/config/Config.java#L59C25-L59C25

As it is right now, if a mod loads the language class and attempts a translation during init but your mod has not yet loaded, INSTANCE will be null, and your mod will crash. always best to check for null if you dont initialize a static field that is used in a mixin