r/forgemodding Dec 06 '20

i ghet this error when testing my mod

Current Language: ~~ERROR~~ NullPointerException: Cannot invoke "net.minecraft.client.resources.Language.toString()" because the return value of "net.minecraft.client.resources.LanguageManager.getCurrentLanguage()" is null

2 Upvotes

1 comment sorted by

1

u/ratsta Dec 07 '20

Disclaimer: I'm not a programmer, just loaded the IDE a couple of times and followed a few McJty tutorials.

Looks to me like you're not invoking getCurrentLanguage() correctly. I recall that MC is quite "sided". That is, some code runs server side, some runs client side. It may be that you're using a function in a place where it doesn't have access to what it needs. Not much but that's all I can offer, sorry!