aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormakamys <makamys@outlook.com>2022-09-21 15:27:21 +0200
committermakamys <makamys@outlook.com>2022-09-21 15:32:01 +0200
commit175f7c740382663a3bfd164be30d0736f9d6e292 (patch)
tree81bf4e74928d278bff09c7f0a00956d62118cd98
parent5ef3b7aa81b3a2faca6b1e39a1464ba908679ea7 (diff)
downloadNeodymium-175f7c740382663a3bfd164be30d0736f9d6e292.tar.gz
Neodymium-175f7c740382663a3bfd164be30d0736f9d6e292.tar.bz2
Neodymium-175f7c740382663a3bfd164be30d0736f9d6e292.zip
Fix a hook in MixinRenderGlobal being incompatible with DragonAPI
cc #9
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
index 51cc52a..3eed7b2 100644
--- a/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
+++ b/src/main/java/makamys/neodymium/mixin/MixinRenderGlobal.java
@@ -23,10 +23,10 @@ abstract class MixinRenderGlobal {
private boolean nd$isInsideUpdateRenderers;
- @Redirect(method = "renderSortedRenderers", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/RenderGlobal;renderAllRenderLists(ID)V"))
- private void redirectRenderAllRenderLists(RenderGlobal thiz, int p1, double p2) {
- if(Neodymium.shouldRenderVanillaWorld()) {
- thiz.renderAllRenderLists(p1, p2);
+ @Inject(method = "renderAllRenderLists", at = @At(value = "HEAD"), cancellable = true)
+ private void preRenderAllRenderLists(int p1, double p2, CallbackInfo ci) {
+ if(!Neodymium.shouldRenderVanillaWorld()) {
+ ci.cancel();
}
}