aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-06-22 11:50:05 +0200
committermakamys <makamys@outlook.com>2022-06-22 11:50:05 +0200
commit388d49110799bd4f41547e852dc8f285d642700f (patch)
treeb6e28d8d8b0b43b3401bead871f9cad359fb3eda /src/main/java
parent676caee4d37d6de8e0f170f3fd22c578b595e2fa (diff)
downloadNeodymium-388d49110799bd4f41547e852dc8f285d642700f.tar.gz
Neodymium-388d49110799bd4f41547e852dc8f285d642700f.tar.bz2
Neodymium-388d49110799bd4f41547e852dc8f285d642700f.zip
Fix renderer not getting destroyed properly
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java1
-rw-r--r--src/main/java/makamys/neodymium/renderer/NeoRenderer.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
index 58331d2..d38f491 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
@@ -36,6 +36,7 @@ abstract class MixinRenderGlobal {
@Inject(method = "loadRenderers", at = @At(value = "HEAD"))
public void preLoadRenderers(CallbackInfo ci) {
if(Neodymium.isActive()) {
+ Neodymium.renderer.destroy();
Neodymium.renderer = null;
}
}
diff --git a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
index 53fc687..fed8a48 100644
--- a/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
+++ b/src/main/java/makamys/neodymium/renderer/NeoRenderer.java
@@ -167,6 +167,7 @@ public class NeoRenderer {
public void onRenderTickEnd() {
if(destroyPending) {
+ destroy();
Neodymium.renderer = null;
return;
}