From d2a96575b8d4631fd8441197bab5c300027b90d0 Mon Sep 17 00:00:00 2001 From: kirillsaint Date: Thu, 31 Aug 2023 15:03:11 +0600 Subject: [PATCH] Fix --- .../client/mixin/mixins/EntityRendererMixin.java | 4 ++++ .../client/mods/render/NewMotionBlurMod.java | 9 --------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/java/net/silentclient/client/mixin/mixins/EntityRendererMixin.java b/src/main/java/net/silentclient/client/mixin/mixins/EntityRendererMixin.java index 33330c6..13e681b 100644 --- a/src/main/java/net/silentclient/client/mixin/mixins/EntityRendererMixin.java +++ b/src/main/java/net/silentclient/client/mixin/mixins/EntityRendererMixin.java @@ -25,6 +25,7 @@ import net.silentclient.client.mods.render.NewMotionBlurMod; import net.silentclient.client.mods.settings.RenderMod; import net.silentclient.client.utils.CloudRenderer; import net.silentclient.client.utils.HUDCaching; +import net.silentclient.client.utils.OptifinePatch; import net.silentclient.client.utils.culling.EntityCulling; import net.silentclient.client.utils.shader.MotionBlurUtils; import org.spongepowered.asm.mixin.Mixin; @@ -205,6 +206,9 @@ public abstract class EntityRendererMixin implements EntityRendererExt { if(Client.getInstance().getModInstances().getModByClass(NewMotionBlurMod.class).isEnabled() && !Client.getInstance().getModInstances().getModByClass(NewMotionBlurMod.class).isForceDisabled()) { if (motionBlur != null){ + if(OptifinePatch.needPatch()) { + OptifinePatch.patch(); + } shaders.add(motionBlur); } diff --git a/src/main/java/net/silentclient/client/mods/render/NewMotionBlurMod.java b/src/main/java/net/silentclient/client/mods/render/NewMotionBlurMod.java index 5471894..0d6bbc1 100644 --- a/src/main/java/net/silentclient/client/mods/render/NewMotionBlurMod.java +++ b/src/main/java/net/silentclient/client/mods/render/NewMotionBlurMod.java @@ -3,7 +3,6 @@ package net.silentclient.client.mods.render; import net.minecraft.client.settings.GameSettings; import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.ModCategory; -import net.silentclient.client.utils.OptifinePatch; import java.lang.reflect.Field; @@ -36,12 +35,4 @@ public class NewMotionBlurMod extends Mod { public boolean isForceDisabled() { return isFastRenderEnabled(); } - - @Override - public void onEnable() { - super.onEnable(); - if(!isFastRenderEnabled() && OptifinePatch.needPatch()) { - OptifinePatch.patch(); - } - } }