#BlockEntity ON_LOAD event causes world to not load

4 messages · Page 1 of 1 (latest)

analog tree
#

What the title says. The specific line causing the game to hang is Block block = world.getBlockState(pos).getBlock(); Does anybody know how to fix this?

dense seal
#

You are trying to get a chunk when that chunk is still in the middle of getting loaded
And you deadlock
The BE always know the BlockState of it's block
It has a "get cached state" method or whatever yarn calls it
Use that

analog tree
#

gotcha, thanks

analog tree
#

how can i differentiate a block entity loading due to being placed or due to world load?