From 797d43f5efb1e5a08e0d78e023a057a463b973af Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Thu, 9 Jun 2022 19:49:23 -0400 Subject: [PATCH] Update starlight + read null light data (#7912) --- patches/server/Rewrite-the-light-engine.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/patches/server/Rewrite-the-light-engine.patch b/patches/server/Rewrite-the-light-engine.patch index 9869ddf447..4a7d6b3376 100644 --- a/patches/server/Rewrite-the-light-engine.patch +++ b/patches/server/Rewrite-the-light-engine.patch @@ -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 }