From 7d6ee74f2c6b591bd64532a21d3170889fa5483d Mon Sep 17 00:00:00 2001 From: makamys Date: Tue, 7 Jun 2022 21:59:12 +0200 Subject: Fix meshes not getting deleted when their world renderers are deleted --- src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java') diff --git a/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java b/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java index 791f24d..02b130f 100644 --- a/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java +++ b/src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java @@ -144,7 +144,7 @@ abstract class MixinWorldRenderer implements IWorldRenderer { @Inject(method = "setDontDraw", at = @At(value = "HEAD")) private void preSetDontDraw(CallbackInfo ci) { if(LODMod.isActive()) { - LODMod.renderer.onWorldRendererChanged(WorldRenderer.class.cast(this), false); + LODMod.renderer.onWorldRendererChanged(WorldRenderer.class.cast(this), LODRenderer.WorldRendererChange.DELETED); } } @@ -170,7 +170,7 @@ abstract class MixinWorldRenderer implements IWorldRenderer { private void notifyIfDrawnStatusChanged() { boolean drawn = isDrawn(); if(LODMod.isActive() && drawn != savedDrawnStatus) { - LODMod.renderer.onWorldRendererChanged(WorldRenderer.class.cast(this), drawn); + LODMod.renderer.onWorldRendererChanged(WorldRenderer.class.cast(this), drawn ? LODRenderer.WorldRendererChange.VISIBLE : LODRenderer.WorldRendererChange.INVISIBLE); } } -- cgit