MineColonies

MineColonies

57M Downloads

Compatibility issue with I Like Wood

Yamahari opened this issue ยท 15 comments

commented

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

commented

We execute this on the first client/server tick. The config should've been loaded by then already, no?

commented

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

commented

Might the problem be the client side call?

commented

What do you mean by that?

commented

We execute this on the client and on the server side.

commented

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

commented

Server config is synced before world start event or before player joins world, idk now

commented

you might want to add some catch there then to avoid that calling this on the client side crashes it.

commented

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 )

commented

image
Try this logging marker but it's in login handshake and that should be definitely before first tick events.

commented

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)

commented

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

commented

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

commented

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

commented

Good luck with that then. If anything could be still wrong on our side, please reopen