Skip to content

Commit b3e52c5

Browse files
authored
Merge pull request #6 from Minecraft-Java-Edition-Speedrunning/RedLime-patch-1
Fix NPE in LightDataAccess
2 parents 04db9a3 + 3bf2a33 commit b3e52c5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
File renamed without changes.

src/main/java/me/jellysquid/mods/sodium/client/model/light/data/LightDataAccess.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ protected long compute(int x, int y, int z) {
6363

6464
float ao;
6565

66+
if (state == null) return packAO(1) | packLM(0) | packOP(true) | packFO(true) | (1L << 60);
67+
6668
if (state.getLuminance() == 0) {
6769
ao = state.getAmbientOcclusionLightLevel(world, pos);
6870
} else {
@@ -119,4 +121,4 @@ public static float unpackAO(long word) {
119121
public BlockRenderView getWorld() {
120122
return this.world;
121123
}
122-
}
124+
}

0 commit comments

Comments
 (0)