Don't explode on light data in the nether

It shouldn't be there but whatever
This commit is contained in:
Spottedleaf 2022-06-11 07:28:18 -07:00
parent 55201f00e8
commit 46954ee75b

View File

@ -5040,7 +5040,7 @@ index 5ce6a2b83546f4dbc3183a386f51b4bacc173744..a7231ceda4f3e96c0e0c11eee953f129
this.fluidTicks = fluidTickScheduler;
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index be9c15fe141ede1132dbe07ba4bfcf22036ab194..b479c4a617becd3f31080ade0388c50727a56ba0 100644
index be9c15fe141ede1132dbe07ba4bfcf22036ab194..4df5853781a2ac89dd391374d34d9096643a2ab8 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -94,6 +94,14 @@ public class ChunkSerializer {
@ -5136,7 +5136,7 @@ index be9c15fe141ede1132dbe07ba4bfcf22036ab194..b479c4a617becd3f31080ade0388c507
+ // is forced to re-light them if it encounters our data. It's too much of a burden
+ // to try and maintain compatibility with a broken and inferior skylight management system.
+ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(sectionData.getByteArray("SkyLight").clone(), sectionData.getInt(SKYLIGHT_STATE_TAG)); // clone for data safety
+ } else {
+ } else if (flag1) {
+ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(null, sectionData.getInt(SKYLIGHT_STATE_TAG));
}
+ // Paper end - rewrite the light engine