package tk.wurst_client.mods;

import tk.wurst_client.navigator.settings.CheckboxSetting;
import tk.wurst_client.navigator.settings.SliderSetting;
import tk.wurst_client.navigator.settings.SliderSetting.ValueDisplay;

@Mod.Info(
	description = "Allows you to alter the client-side weather, time and moon phase.",
	name = "NoWeather")
@Mod.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.setDisabled(true);
				else
					time.setDisabled(false);
			};
		};
	public SliderSetting time =
		new SliderSetting("Time", 6000, 0, 23900, 100, ValueDisplay.INTEGER);
	
	public CheckboxSetting changeMoonPhase =
		new CheckboxSetting("Change Moon Phase", false)
		{
			@Override
			public void update()
			{
				if(!isChecked())
					moonPhase.setDisabled(true);
				else
					moonPhase.setDisabled(false);
			};
		};
	public SliderSetting moonPhase =
		new SliderSetting("Moon Phase", 0, 0, 7, 1, ValueDisplay.INTEGER);
	
	@Override
	public void initSettings()
	{
		settings.add(disableRain);
		settings.add(changeTime);
		settings.add(time);
		settings.add(changeMoonPhase);
		settings.add(moonPhase);
	}
}

@@ -607,90 +607,37 @@
 %09%09%09%09
-if(!isChecked())%0A%09%09%09%09%09time.setDisabled(true);%0A%09%09%09%09else%0A%09%09%09%09%09time.setDisabled(false
+time.setDisabled(!isChecked()
 );%0A%09
@@ -895,100 +895,42 @@
 %09%09%09%09
-if(!isChecked())%0A%09%09%09%09%09moonPhase.setDisabled(true);%0A%09%09%09%09else%0A%09%09%09%09%09moonPhase.setDisabled(false
+moonPhase.setDisabled(!isChecked()
 );%0A%09

Clean up NoWeatherMod