diff options
author | makamys <makamys@outlook.com> | 2022-06-07 21:59:12 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-07 21:59:12 +0200 |
commit | 7d6ee74f2c6b591bd64532a21d3170889fa5483d (patch) | |
tree | 5cbefbeb67cb1e6694a4ea1004ddecf4e07b99e5 /src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java | |
parent | fd1ad07f7e9759c43c3dae0affcaa910b06d2fb1 (diff) | |
download | Neodymium-7d6ee74f2c6b591bd64532a21d3170889fa5483d.tar.gz Neodymium-7d6ee74f2c6b591bd64532a21d3170889fa5483d.tar.bz2 Neodymium-7d6ee74f2c6b591bd64532a21d3170889fa5483d.zip |
Fix meshes not getting deleted when their world renderers are deleted
Diffstat (limited to 'src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java')
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinWorldRenderer.java | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |