From f8ac5166c8f4adcb8ed96d0efea6ff343b687722 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 6 Aug 2021 12:55:56 -0700 Subject: [PATCH 1/2] More LightVolume guards - Should fix odd crash --- src/main/java/com/jozufozu/flywheel/light/LightVolume.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/jozufozu/flywheel/light/LightVolume.java b/src/main/java/com/jozufozu/flywheel/light/LightVolume.java index 4f7bbe130..41607a164 100644 --- a/src/main/java/com/jozufozu/flywheel/light/LightVolume.java +++ b/src/main/java/com/jozufozu/flywheel/light/LightVolume.java @@ -121,6 +121,8 @@ public class LightVolume { } public void move(IBlockDisplayReader world, GridAlignedBB newSampleVolume) { + if (removed) return; + if (textureVolume.contains(newSampleVolume)) { if (newSampleVolume.intersects(sampleVolume)) { GridAlignedBB newArea = newSampleVolume.intersect(sampleVolume); @@ -166,6 +168,8 @@ public class LightVolume { * This is expensive and should be avoided. */ public void initialize(IBlockDisplayReader world) { + if (removed) return; + BlockPos.Mutable pos = new BlockPos.Mutable(); int shiftX = textureVolume.minX; From 3c52a2cc5303da58d9cfaa18d68308f8a78d1106 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Sun, 8 Aug 2021 17:06:50 -0700 Subject: [PATCH 2/2] Missed changelog line --- changelog.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index aded75a21..958eaca7f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,6 @@ 0.2.3: +Fixes + - Fix crash moving a deleted LightVolume Technical/API: - Alter BeginFrameEvent to enable compatibility with optifine shadows