/*
 * 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.compatibility.WMinecraft;
import net.wurstclient.events.listeners.UpdateListener;

@Mod.Info(
	description = "Automatically jumps whenever you walk.\n"
		+ "Tip: Jumping while sprinting is a faster way to move.",
	name = "BunnyHop",
	tags = "AutoJump, BHop, bunny hop, auto jump",
	help = "Mods/BunnyHop")
@Mod.Bypasses
public final class BunnyHopMod extends Mod implements UpdateListener
{
	@Override
	public void onEnable()
	{
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onUpdate()
	{
		if((WMinecraft.getPlayer().moveForward != 0
			|| WMinecraft.getPlayer().moveStrafing != 0)
			&& !WMinecraft.getPlayer().isSneaking()
			&& WMinecraft.getPlayer().onGround)
			WMinecraft.getPlayer().jump();
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
	}
}

@@ -415,16 +415,57 @@
 istener;
+%0Aimport net.wurstclient.features.Feature;
 %0A%0A@Mod.I
@@ -769,32 +769,183 @@
 er%0A%7B%0A%09@Override%0A
+%09public Feature%5B%5D getSeeAlso()%0A%09%7B%0A%09%09return new Feature%5B%5D%7Bwurst.mods.autoSprintMod, wurst.mods.highJumpMod,%0A%09%09%09wurst.commands.jumpCmd%7D;%0A%09%7D%0A%09%0A%09@Override%0A
 %09public void onE
@@ -1034,21 +1034,22 @@
  void on
-Updat
+Disabl
 e()%0A%09%7B%0A%09
@@ -1053,107 +1053,201 @@
 %7B%0A%09%09
-if((WMinecraft.getPlayer().moveForward != 0%0A%09%09%09%7C%7C WMinecraft.getPlayer().moveStrafing != 0)%0A%09%09%09&& !
+wurst.events.remove(UpdateListener.class, this);%0A%09%7D%0A%09%0A%09@Override%0A%09public void onUpdate()%0A%09%7B%0A%09%09// check onGround%0A%09%09if(!WMinecraft.getPlayer().onGround)%0A%09%09%09return;%0A%09%09%0A%09%09// check if sneaking%0A%09%09if(
 WMin
@@ -1281,15 +1281,50 @@
 ng()
+)
 %0A%09%09%09
-&& 
+return;%0A%09%09%0A%09%09// check if moving%0A%09%09if(
 WMin
@@ -1342,29 +1342,39 @@
 layer().
-onGround)
+moveForward == 0
 %0A%09%09%09
+&& 
 WMinecra
@@ -1392,108 +1392,81 @@
 r().
-jump();%0A%09%7D%0A%09%0A%09@Override%0A%09public void onDisable()%0A%09%7B%0A%09%09wurst.events.remove(UpdateListener.class, this
+moveStrafing == 0)%0A%09%09%09return;%0A%09%09%0A%09%09// jump%0A%09%09WMinecraft.getPlayer().jump(
 );%0A%09

Update BunnyHopMod