/*
 * 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 tk.wurst_client.features.mods;

import tk.wurst_client.events.listeners.UpdateListener;

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

@@ -311,16 +311,50 @@
 .mods;%0A%0A
+import org.lwjgl.input.Keyboard;%0A%0A
 import t
@@ -789,16 +789,42 @@
  this);%0A
+%09%09%0A%09%09// reset forward key%0A
 %09%09mc.gam
@@ -861,14 +861,75 @@
 ed =
- false
+%0A%09%09%09Keyboard.isKeyDown(mc.gameSettings.keyBindForward.getKeyCode())
 ;%0A%09%7D
@@ -975,53 +975,35 @@
 %7B%0A%09%09
-if(!mc.gameSettings.keyBindForward.pressed)%0A%09
+// force-press forward key%0A
 %09%09mc

Clean up AutoWalk