mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Update starlight + read null light data (#7912)
This commit is contained in:
parent
b953c4baa7
commit
797d43f5ef
1 changed files with 3 additions and 1 deletions
|
@ -5048,7 +5048,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public static final String SKY_LIGHT_TAG = "SkyLight";
|
||||
|
||||
+ // 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 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
|
||||
+ // 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 {
|
||||
+ blockNibbles[y - minSection] = new ca.spottedleaf.starlight.common.light.SWMRNibbleArray(null, sectionData.getInt(BLOCKLIGHT_STATE_TAG));
|
||||
}
|
||||
+ // Paper end - rewrite light engine
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue