I have some values in my config which are relevant for my items. Now I would like to pass those settings as an argument at item registration.
Like this:
event.getRegistry().register(itemFoo = new ItemFoo(Config.testvalue.get()));
But using the get() method to get the config value will result in a crash:
java.lang.NullPointerException: Cannot get config value without assigned Config object present
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787)
When should I register my config to make sure, that all config values are set (not null) when the item registration triggers?
I tried the FMLCommonSetupEvent at first, but it seems like that one actually fires after item registration.
(By the way is there some kind of info graphic to see the event order?)