From a9ae8ca68e7eea9d3fdbbef3a9b95d366ea1e51a Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 6 Aug 2021 12:55:56 -0700 Subject: [PATCH] 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;