/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package net.wurstclient.features.mods.fun;

import net.wurstclient.events.listeners.UpdateListener;
import net.wurstclient.features.HelpPage;
import net.wurstclient.features.Mod;
import net.wurstclient.features.SearchTags;

@SearchTags({"miley cyrus", "twerk"})
@HelpPage("Mods/MileyCyrus")
@Mod.Bypasses
public final class MileyCyrusMod extends Mod implements UpdateListener
{
	private int timer;
	
	public MileyCyrusMod()
	{
		super("MileyCyrus", "Makes you twerk like Miley Cyrus!");
	}
	
	@Override
	public void onEnable()
	{
		timer = 0;
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
		mc.gameSettings.keyBindSneak.pressed = false;
	}
	
	@Override
	public void onUpdate()
	{
		timer++;
		if(timer >= 6)
		{
			mc.gameSettings.keyBindSneak.pressed =
				!mc.gameSettings.keyBindSneak.pressed;
			timer = 0;
		}
	}
}

@@ -315,16 +315,67 @@
 s.fun;%0A%0A
+import net.minecraft.client.settings.GameSettings;%0A
 import n
@@ -454,24 +454,19 @@
 eatures.
-HelpPage
+Mod
 ;%0Aimport
@@ -483,35 +483,42 @@
 client.features.
-Mod
+SearchTags
 ;%0Aimport net.wur
@@ -526,35 +526,98 @@
 tclient.
-features.SearchTags
+settings.SliderSetting;%0Aimport net.wurstclient.settings.SliderSetting.ValueDisplay
 ;%0A%0A@Sear
@@ -653,37 +653,8 @@
 %22%7D)%0A
-@HelpPage(%22Mods/MileyCyrus%22)%0A
 @Mod
@@ -761,93 +761,264 @@
 r;%0A%09
-%0A%09public MileyCyrusMod()%0A%09%7B%0A%09%09super(%22MileyCyrus%22, %22Makes you twerk like Miley Cyrus!%22
+private final SliderSetting twerkSpeed =%0A%09%09new SliderSetting(%22Twerk speed%22, 5, 1, 10, 1, ValueDisplay.INTEGER);%0A%09%0A%09public MileyCyrusMod()%0A%09%7B%0A%09%09super(%22MileyCyrus%22, %22Makes you twerk.%22);%0A%09%7D%0A%09%0A%09@Override%0A%09public void initSettings()%0A%09%7B%0A%09%09settings.add(twerkSpeed
 );%0A%09
@@ -1259,14 +1259,64 @@
 ed =
- false
+%0A%09%09%09GameSettings.isKeyDown(mc.gameSettings.keyBindSneak)
 ;%0A%09%7D
@@ -1382,19 +1382,53 @@
 mer 
-%3E= 6)%0A%09%09%7B%0A%09
+%3C 10 - twerkSpeed.getValueI())%0A%09%09%09return;%0A%09%09%0A
 %09%09mc
@@ -1467,17 +1467,16 @@
 ed =%0A%09%09%09
-%09
 !mc.game
@@ -1508,25 +1508,24 @@
 ssed;%0A%09%09
-%09
 timer = 
 0;%0A%09%09%7D%0A%09
@@ -1520,14 +1520,11 @@
 r = 
-0;%0A%09%09%7D
+-1;
 %0A%09%7D%0A

Update MileyCyrusMod