mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-19 11:59:40 +00:00
Use client world for main thread renders
This commit is contained in:
1 parent
1a1ca32721
commit
d810eaf876
2 files changed
+6
-2
No files matched your search
+2
-2
@@ -229,7 +229,7 @@ public class ChunkRenderRebuildTask<T extends ChunkGraphicsState> extends ChunkR
|
||||
int baseY = this.render.getOriginY();
|
||||
int baseZ = this.render.getOriginZ();
|
||||
BlockPos renderOffset = this.offset;
|
||||
RenderBlocks rb = new RenderBlocks(slice);
|
||||
RenderBlocks rb = new RenderBlocks(slice.getWorld());
|
||||
for (int relY = 0; relY < 16; relY++) {
|
||||
if (cancellationSource.isCancelled()) {
|
||||
return;
|
||||
@@ -258,7 +258,7 @@ public class ChunkRenderRebuildTask<T extends ChunkGraphicsState> extends ChunkR
|
||||
long seed = MathUtil.hashPos(pos.x, pos.y, pos.z);
|
||||
if(AngelicaConfig.enableIris) buffers.iris$setMaterialId(block, ExtendedDataHelper.BLOCK_RENDER_TYPE);
|
||||
|
||||
if (cache.getBlockRenderer().renderModel(cache.getWorldSlice(), Tessellator.instance, rb, block, meta, pos, buffers.get(pass), true, seed)) {
|
||||
if (cache.getBlockRenderer().renderModel(slice.getWorld(), Tessellator.instance, rb, block, meta, pos, buffers.get(pass), true, seed)) {
|
||||
bounds.addBlock(relX, relY, relZ);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,4 +355,8 @@ public class WorldSlice implements IBlockAccess {
|
||||
case UNKNOWN -> 1.0f;
|
||||
};
|
||||
}
|
||||
|
||||
public World getWorld() {
|
||||
return this.world;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user