Update starlight + read null light data (#7912)
This commit is contained in:
@@ -5048,7 +5048,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public static final String SKY_LIGHT_TAG = "SkyLight";
|
public static final String SKY_LIGHT_TAG = "SkyLight";
|
||||||
|
|
||||||
+ // Paper start - replace light engine impl
|
+ // Paper start - replace light engine impl
|
||||||
+ private static final int STARLIGHT_LIGHT_VERSION = 7;
|
+ private static final int STARLIGHT_LIGHT_VERSION = 8;
|
||||||
+
|
+
|
||||||
+ private static final String BLOCKLIGHT_STATE_TAG = "starlight.blocklight_state";
|
+ private static final String BLOCKLIGHT_STATE_TAG = "starlight.blocklight_state";
|
||||||
+ private static final String SKYLIGHT_STATE_TAG = "starlight.skylight_state";
|
+ private static final String SKYLIGHT_STATE_TAG = "starlight.skylight_state";
|
||||||
@@ -5131,6 +5131,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ // is forced to re-light them if it encounters our data. It's too much of a burden
|
+ // 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.
|
+ // 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
|
+ skyNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(sectionData.getByteArray("SkyLight").clone(), sectionData.getInt(SKYLIGHT_STATE_TAG)); // clone for data safety
|
||||||
|
+ } else {
|
||||||
|
+ blockNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(null, sectionData.getInt(BLOCKLIGHT_STATE_TAG));
|
||||||
}
|
}
|
||||||
+ // Paper end - rewrite light engine
|
+ // Paper end - rewrite light engine
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user