/*
 * 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.minecraft.network.play.client.CPacketPlayer.Rotation;
import net.wurstclient.compatibility.WConnection;
import net.wurstclient.compatibility.WMinecraft;
import net.wurstclient.events.listeners.UpdateListener;

@Mod.Info(
	description = "While this is active, other people will think you are\n"
		+ "extremely tired and about to fall asleep!",
	name = "Tired",
	help = "Mods/Tired")
@Mod.Bypasses(ghostMode = false, latestNCP = false, olderNCP = false)
public final class TiredMod extends Mod implements UpdateListener
{
	@Override
	public void onEnable()
	{
		wurst.events.add(UpdateListener.class, this);
	}
	
	@Override
	public void onUpdate()
	{
		WConnection.sendPacket(new Rotation(WMinecraft.getPlayer().rotationYaw,
			WMinecraft.getPlayer().ticksExisted % 100,
			WMinecraft.getPlayer().onGround));
	}
	
	@Override
	public void onDisable()
	{
		wurst.events.remove(UpdateListener.class, this);
	}
}

@@ -369,17 +369,8 @@
 ayer
-.Rotation
 ;%0Aim
@@ -927,32 +927,127 @@
 %09%7D%0A%09%0A%09@Override%0A
+%09public void onDisable()%0A%09%7B%0A%09%09wurst.events.remove(UpdateListener.class, this);%0A%09%7D%0A%09%0A%09@Override%0A
 %09public void onU
@@ -1086,12 +1086,30 @@
 ket(
-new 
+%0A%09%09%09new CPacketPlayer.
 Rota
@@ -1149,16 +1149,17 @@
 ionYaw,%0A
+%09
 %09%09%09WMine
@@ -1199,16 +1199,17 @@
 100,%0A%09%09%09
+%09
 WMinecra
@@ -1242,101 +1242,6 @@
 %0A%09%7D%0A
-%09%0A%09@Override%0A%09public void onDisable()%0A%09%7B%0A%09%09wurst.events.remove(UpdateListener.class, this);%0A%09%7D%0A
 %7D%0A

Update TiredMod