/*
 * 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;

import net.wurstclient.events.listeners.UpdateListener;

@Mod.Info(description = "Automatically walks all the time.",
	name = "AutoWalk",
	tags = "auto walk",
	help = "Mods/AutoWalk")
@Mod.Bypasses
public final class AutoWalkMod extends Mod implements UpdateListener
{
	@Override
	public void onEnable()
	{
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onUpdate()
	{
		if(!mc.gameSettings.keyBindForward.pressed)
			mc.gameSettings.keyBindForward.pressed = true;
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
		mc.gameSettings.keyBindForward.pressed = false;
	}
}

@@ -311,16 +311,50 @@
 .mods;%0A%0A
+import org.lwjgl.input.Keyboard;%0A%0A
 import n
@@ -735,26 +735,100 @@
 d on
-Update()%0A%09%7B%0A%09%09if(!
+Disable()%0A%09%7B%0A%09%09wurst.events.remove(UpdateListener.class, this);%0A%09%09%0A%09%09// reset forward key%0A%09%09
 mc.g
@@ -865,13 +865,33 @@
 ssed
-)
+ =
 %0A%09%09%09
+Keyboard.isKeyDown(
 mc.g
@@ -921,22 +921,21 @@
 ard.
-pressed = true
+getKeyCode())
 ;%0A%09%7D
@@ -955,38 +955,37 @@
 %0A%09public void on
-Disabl
+Updat
 e()%0A%09%7B%0A%09%09wurst.e
@@ -981,56 +981,34 @@
 %7B%0A%09%09
-wurst.events.remove(UpdateListener.class, this);
+// force-press forward key
 %0A%09%09m
@@ -1051,12 +1051,11 @@
 d = 
-fals
+tru
 e;%0A%09

Update AutoWalkMod