package tk.wurst_client.mods;

import tk.wurst_client.mods.Mod.Bypasses;
import tk.wurst_client.mods.Mod.Category;
import tk.wurst_client.mods.Mod.Info;
import tk.wurst_client.navigator.settings.CheckboxSetting;
import tk.wurst_client.navigator.settings.SliderSetting;
import tk.wurst_client.navigator.settings.SliderSetting.ValueDisplay;

@Info(category = Category.RENDER,
	description = "Allows you to alter the client-side weather, time and moon phase.",
	name = "NoWeather")
@Bypasses
public class NoWeatherMod extends Mod
{
	public CheckboxSetting disableRain =
		new CheckboxSetting("Disable Rain", true);
	
	public CheckboxSetting changeTime =
		new CheckboxSetting("Change World Time", false)
		{
			@Override
			public void update()
			{
				if(!isChecked())
					time.lockToValue(time.getValue());
				else
					time.unlock();
			};
		};
	public SliderSetting time =
		new SliderSetting("Time", 6000, 0, 24000, 100, ValueDisplay.INTEGER);
	
	public CheckboxSetting changeMoonPhase =
		new CheckboxSetting("Change Moon Phase", false)
		{
			@Override
			public void update()
			{
				if(!isChecked())
					moonPhase.lockToValue(moonPhase.getValue());
				else
					moonPhase.unlock();
			};
		};
	public SliderSetting moonPhase =
		new SliderSetting("Moon Phase", 0, 0, 8, 1, ValueDisplay.INTEGER);
	
	@Override
	public void initSettings()
	{
		settings.add(disableRain);
		settings.add(changeTime);
		settings.add(time);
		settings.add(changeMoonPhase);
		settings.add(moonPhase);
	}
}

@@ -775,35 +775,24 @@
 ime.
-lockToValue(time.getValue()
+setDisabled(true
 );%0A%09
@@ -809,23 +809,33 @@
 %09%09%09time.
-unlock(
+setDisabled(false
 );%0A%09%09%09%7D;
@@ -1121,40 +1121,24 @@
 ase.
-lockToValue(moonPhase.getValue()
+setDisabled(true
 );%0A%09
@@ -1164,15 +1164,25 @@
 ase.
-unlock(
+setDisabled(false
 );%0A%09

Disable sliders instead of locking them