diff options
author | makamys <makamys@outlook.com> | 2022-06-22 06:44:39 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-22 06:44:39 +0200 |
commit | d7852470c3618466aa8105c97bd6786cafb45756 (patch) | |
tree | 0621f62a82ffdfc660adced8be87093978863069 /src/main/java/makamys/neodymium/mixin | |
parent | 6b5d4e876fe83691a9eb65d72fef3a62282afd33 (diff) | |
download | Neodymium-d7852470c3618466aa8105c97bd6786cafb45756.tar.gz Neodymium-d7852470c3618466aa8105c97bd6786cafb45756.tar.bz2 Neodymium-d7852470c3618466aa8105c97bd6786cafb45756.zip |
Reload NeoRenderer when the world renderers are reloaded
Diffstat (limited to 'src/main/java/makamys/neodymium/mixin')
-rw-r--r-- | src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java index 2316aa0..58331d2 100644 --- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java +++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java @@ -5,6 +5,7 @@ import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Redirect; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import makamys.neodymium.Neodymium; @@ -31,4 +32,11 @@ abstract class MixinRenderGlobal { Neodymium.renderer.preRenderSortedRenderers(renderPass, partialTickTime, sortedWorldRenderers); } } + + @Inject(method = "loadRenderers", at = @At(value = "HEAD")) + public void preLoadRenderers(CallbackInfo ci) { + if(Neodymium.isActive()) { + Neodymium.renderer = null; + } + } } |