mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-26 23:23:01 +00:00
Use the proper blockAccess on the main thread (#1317)
This commit is contained in:
1 parent
9d5a02ed21
commit
b29240d6da
1 file changed
+3
-1
+3
-1
@@ -56,6 +56,7 @@ public class AngelicaChunkBuildContext extends ChunkBuildContext {
|
||||
private final VertexArrayQuadView quadView;
|
||||
private boolean lightPipelineReady = false;
|
||||
private int originX, originY, originZ;
|
||||
private IBlockAccess blockAccess;
|
||||
|
||||
public AngelicaChunkBuildContext(RenderPassConfiguration<?> renderPassConfiguration, WorldClient world) {
|
||||
super(renderPassConfiguration);
|
||||
@@ -71,6 +72,7 @@ public class AngelicaChunkBuildContext extends ChunkBuildContext {
|
||||
}
|
||||
|
||||
public void setupLightPipeline(IBlockAccess blockAccess, int minBlockX, int minBlockY, int minBlockZ) {
|
||||
this.blockAccess = blockAccess;
|
||||
this.originX = minBlockX;
|
||||
this.originY = minBlockY;
|
||||
this.originZ = minBlockZ;
|
||||
@@ -138,7 +140,7 @@ public class AngelicaChunkBuildContext extends ChunkBuildContext {
|
||||
final int worldX = originX + blockX;
|
||||
final int worldY = originY + blockY;
|
||||
final int worldZ = originZ + blockZ;
|
||||
final boolean isEmissive = useAoCalculation && QuadLightingHelper.isBlockEmissive(worldSlice, worldX, worldY, worldZ);
|
||||
final boolean isEmissive = useAoCalculation && QuadLightingHelper.isBlockEmissive(blockAccess, worldX, worldY, worldZ);
|
||||
|
||||
for (int quadIdx = 0; quadIdx < numQuads; quadIdx++) {
|
||||
float uSum = 0, vSum = 0;
|
||||
|
||||
Reference in new issue
Block a user