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,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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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