mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:51:32 +01:00
Fix Bug #1125526694531432469
This commit is contained in:
parent
11e6ff9506
commit
c578cdec51
@ -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,8 +39,12 @@ public class ColorSaturationMod extends Mod {
|
||||
}
|
||||
|
||||
public boolean isFastRenderEnabled() {
|
||||
try {
|
||||
return this.cachedFastRender.getBoolean(this.mc.gameSettings);
|
||||
} catch (Exception exception) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChangeSettingValue(Setting setting) {
|
||||
@ -107,7 +112,13 @@ public class ColorSaturationMod extends Mod {
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user