package common.packet;

import java.io.IOException;

import common.network.PacketBuffer;

public class SPacketEntityLook extends SPacketEntity
{
    public SPacketEntityLook()
    {
        this.rotation = true;
    }

    public SPacketEntityLook(int entityIdIn, byte yawIn, byte pitchIn, boolean onGroundIn)
    {
        super(entityIdIn);
        this.yaw = yawIn;
        this.pitch = pitchIn;
        this.rotation = true;
        this.onGround = onGroundIn;
    }

    public void readPacketData(PacketBuffer buf) throws IOException
    {
        super.readPacketData(buf);
        this.yaw = buf.readByte();
        this.pitch = buf.readByte();
        this.onGround = buf.readBoolean();
    }

    public void writePacketData(PacketBuffer buf) throws IOException
    {
        super.writePacketData(buf);
        buf.writeByte(this.yaw);
        buf.writeByte(this.pitch);
        buf.writeBoolean(this.onGround);
    }
}