Compatibility issue with I Like Wood
Yamahari opened this issue ยท 15 comments
Version: 0.10.730-ALPHA-universal
Expected behavior
The burn time of items in my mod is configurable, once configs are loaded accessing the burn time of an item should be no problem.
Actual behaviour
Your mod seems to access internals of my mod that should't be accessed before configs are created. ( See provided link provided to an issue filed on my github )
Steps to reproduce the problem
Start a world with minecolonies and ilikewood installed.
Logs:
See here Yamahari/ILikeWood#9
We execute this on the first client/server tick. The config should've been loaded by then already, no?
Honestly don't know, but that seems to be the only reasonable explanation I could come up with, have to investigate further when I get the time
hm, that might actually be it, the properties are stored in the server config, don't know how that works if client side tries to access them
Server config is synced before world start event or before player joins world, idk now
you might want to add some catch there then to avoid that calling this on the client side crashes it.
yea, it works fine on servers, it might just be that you access it too early ( if this is even the source of the null exception )
We access this in the first tick, so by then it should've loaded by long already (that was the reason for me to put this in there and not in any of the onStart events)
Then my guess is don't save those values in enums, even though it's a supplier
I really wonder how safe is constructing this in enum constructor https://github.com/Yamahari/ILikeWood-1.15/blob/master/src/main/java/yamahari/ilikewood/util/WoodType.java#L46-L50
yea, it works fine on servers, it might just be that you access it too early ( if this is even the source of the null exception )
do debugging then :D
seems like something is wrong on my side, don't know what yet but I got another similiar bug report. Something seems to break when the wood type enum get's loaded earlier than normal