package nivia.modules.exploits;

import net.minecraft.network.play.server.S08PacketPlayerPosLook;
import nivia.events.EventTarget;
import nivia.events.events.EventPacketReceive;
import nivia.modules.Module;
import nivia.utils.Helper;

public class NoRotate extends Module {
	public NoRotate() {
		super("NoRotate", 0, 0xFFFFFF, Category.EXPLOITS, "Prevents anticheats setting your rotations.", new String[] { "norotation", "nrotate", "nr", "nor" }, true);
	}


	
	@EventTarget
	public void onRecievePacket(EventPacketReceive e){
		if (e.getPacket() instanceof S08PacketPlayerPosLook) {
            S08PacketPlayerPosLook packet = (S08PacketPlayerPosLook) e.getPacket();
            packet.field_148936_d = Helper.player().rotationYaw;
            packet.field_148937_e = Helper.player().rotationPitch;
        }
	}
}
