diff --git a/src/main/java/net/silentclient/client/mods/render/ColorSaturationMod.java b/src/main/java/net/silentclient/client/mods/render/ColorSaturationMod.java index 511f392..988ea82 100644 --- a/src/main/java/net/silentclient/client/mods/render/ColorSaturationMod.java +++ b/src/main/java/net/silentclient/client/mods/render/ColorSaturationMod.java @@ -13,6 +13,7 @@ import net.silentclient.client.mixin.accessors.SimpleReloadableResourceManagerAc import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.ModCategory; import net.silentclient.client.mods.Setting; +import net.silentclient.client.utils.NotificationUtils; import net.silentclient.client.utils.resource.SaturationResourceManager; import java.io.IOException; @@ -38,7 +39,11 @@ public class ColorSaturationMod extends Mod { } public boolean isFastRenderEnabled() { - return false; + try { + return this.cachedFastRender.getBoolean(this.mc.gameSettings); + } catch (Exception exception) { + return false; + } } @Override @@ -105,9 +110,15 @@ public class ColorSaturationMod extends Mod { return null; } } - + @Override - public boolean isForceDisabled() { - return isFastRenderEnabled(); + public void onEnable() { + super.onEnable(); + if(isFastRenderEnabled()) { + this.toggle(); + if(mc.thePlayer != null) { + NotificationUtils.showNotification("error", "Disable Fast Render"); + } + } } } 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 69e1330..efa736b 100644 --- a/src/main/java/net/silentclient/client/mods/render/NewMotionBlurMod.java +++ b/src/main/java/net/silentclient/client/mods/render/NewMotionBlurMod.java @@ -6,14 +6,41 @@ import net.minecraft.client.settings.GameSettings; import net.silentclient.client.Client; import net.silentclient.client.mods.Mod; import net.silentclient.client.mods.ModCategory; +import net.silentclient.client.utils.NotificationUtils; public class NewMotionBlurMod extends Mod { + private Field cachedFastRender; + public NewMotionBlurMod() { super("Motion Blur", ModCategory.MODS, "silentclient/icons/mods/motionblur.png"); + try { + this.cachedFastRender = GameSettings.class.getDeclaredField("ofFastRender"); + } catch (Exception exception) { + + } } @Override public void setup() { this.addSliderSetting("Amount", this, 0.5, 0.1, 0.85, false); } + + public boolean isFastRenderEnabled() { + try { + return this.cachedFastRender.getBoolean(this.mc.gameSettings); + } catch (Exception exception) { + return false; + } + } + + @Override + public void onEnable() { + super.onEnable(); + if(isFastRenderEnabled()) { + this.toggle(); + if(mc.thePlayer != null) { + NotificationUtils.showNotification("error", "Disable Fast Render"); + } + } + } }