Closed herbix closed 9 years ago
Hi Herbix Hmmm you could be right. I had assumed it was single-threaded but I'm not certain. I'll do a few tests and see.
Cheers TGG
Hi Herbix I did a few tests and rummaged through the vanilla code a bit, and it looks like 1.8 is single threaded for world rendering. But for sure that might change in future, so I'll add a comment about that to the example and a related tutorial I wrote a while back.
Cheers TGG
Hi TGG
I'm pretty sure it's rendered multi-threaded.
I print current thread in handleBlockState
. There's 3 different thread instance.
Then I trace the call hierarchy and find ChunkRenderWorker.processTask
, which controls rendering a chunk. This method is called in main client thread as well as two other threads, which start at ChunkRenderDispatcher.<init>
.
Maybe more blocks in different chunks are needed to find out this issue. I thought super flat may help.
Ah! You are right. Mine is single-threaded only for some reason, perhaps my computer is not powerful enough! :)
I will change it. Thanks!
-TGG
As far as I know there are more than one threads rendering the world. But in MBE05, there's only one
CompositeModel
instance. SincehandleBlockState
always returnsthis
, different blocks affect each other when rendered in different threads. For example:handleBlockState
.handleBlockState
.getGeneralQuads
. Here, states of block at B position is saved, but rendered at A position.Solution: Although it costs more space, a new
IBakedModel
should be returned byhandleBlockState
, I suppose.