BuildToolPlaceMesssage modifies world from a Netty thread
Aaron1011 opened this issue · 2 comments
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.
Yeah I had the same thought these days. I'm running into some problems
because of that.
2017-02-25 15:40 GMT-03:00 Aaron Hill <[email protected]>:
… 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
<https://github.com/Minecolonies/minecolonies/blob/1399a542709c9c2f96395a2d65d4cc3022d977b6/src/main/java/com/minecolonies/coremod/network/messages/BuildToolPlaceMessage.java>
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#656>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AGI9y29Q_vyPSiAXrAVUpie0xu0Z-6W5ks5rgHWFgaJpZM4MMGLV>
.