MineColonies

MineColonies

57M Downloads

BuildToolPlaceMesssage modifies world from a Netty thread

Aaron1011 opened this issue · 2 comments

commented

All Forge custom message handlers are run off of Netty threads. Consequently, any modifications to the world should be performed by scheduling a task on the main thread (e.g. MinecraftServer#addScheduledTask).

However, BuildToolPlaceMessage modifies the world in several different places, both directly and by delegating to WorkManager. To avoid the issues that come with modifying the non-thread server off of the main thread, all world modifications done by BuildToolPlaceMessage (and any other custom messages handlers) should be done from a scheduled task on the main thread.

commented
commented

Actually, it appears that MineColonies is indeed properly scheduling the task on the main thread, in AbstractMessage. Sorry for opening this issue without properly checking first.