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 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;