/*
 * 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 net.minecraft.client.Minecraft;
import tk.wurst_client.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 class BunnyHopMod extends Mod implements UpdateListener
{
	@Override
	public void onEnable()
	{
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
	}
	
	@Override
	public void onUpdate()
	{
		if((mc.player.moveForward != 0
			|| Minecraft.getMinecraft().player.moveStrafing != 0)
			&& !mc.player.isSneaking() && mc.player.onGround)
			mc.player.jump();
	}
}

@@ -315,47 +315,8 @@
 s;%0A%0A
-import net.minecraft.client.Minecraft;%0A
 impo
@@ -366,16 +366,57 @@
 istener;
+%0Aimport tk.wurst_client.features.Feature;
 %0A%0A@Mod.I
@@ -714,32 +714,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
@@ -1090,14 +1090,34 @@
 %0A%09%7B%0A
+%09%09// check onGround%0A
 %09%09if(
-(
+!
 mc.p
@@ -1126,136 +1126,207 @@
 yer.
-moveForward != 0%0A%09%09%09%7C%7C Minecraft.getMinecraft().player.moveStrafing != 0)%0A%09%09%09&& !mc.player.isSneaking() && mc.player.onGround)%0A%09
+onGround)%0A%09%09%09return;%0A%09%09%0A%09%09// check if sneaking%0A%09%09if(mc.player.isSneaking())%0A%09%09%09return;%0A%09%09%0A%09%09// check if moving%0A%09%09if(mc.player.moveForward == 0 && mc.player.moveStrafing == 0)%0A%09%09%09return;%0A%09%09%0A%09%09// jump%0A
 %09%09mc

Update BunnyHop