    001    package net.minecraft.network.packet;
    002
    003    import cpw.mods.fml.relauncher.Side;
    004    import cpw.mods.fml.relauncher.SideOnly;
    005    import java.io.DataInputStream;
    006    import java.io.DataOutputStream;
    007    import java.io.IOException;
    008
    009    public class Packet11PlayerPosition extends Packet10Flying
    010    {
    011        public Packet11PlayerPosition()
    012        {
    013            this.moving = true;
    014        }
    015
    016        @SideOnly(Side.CLIENT)
    017        public Packet11PlayerPosition(double par1, double par3, double par5, double par7, boolean par9)
    018        {
    019            this.xPosition = par1;
    020            this.yPosition = par3;
    021            this.stance = par5;
    022            this.zPosition = par7;
    023            this.onGround = par9;
    024            this.moving = true;
    025        }
    026
    027        /**
    028         * Abstract. Reads the raw packet data from the data stream.
    029         */
    030        public void readPacketData(DataInputStream par1DataInputStream) throws IOException
    031        {
    032            this.xPosition = par1DataInputStream.readDouble();
    033            this.yPosition = par1DataInputStream.readDouble();
    034            this.stance = par1DataInputStream.readDouble();
    035            this.zPosition = par1DataInputStream.readDouble();
    036            super.readPacketData(par1DataInputStream);
    037        }
    038
    039        /**
    040         * Abstract. Writes the raw packet data to the data stream.
    041         */
    042        public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
    043        {
    044            par1DataOutputStream.writeDouble(this.xPosition);
    045            par1DataOutputStream.writeDouble(this.yPosition);
    046            par1DataOutputStream.writeDouble(this.stance);
    047            par1DataOutputStream.writeDouble(this.zPosition);
    048            super.writePacketData(par1DataOutputStream);
    049        }
    050
    051        /**
    052         * Abstract. Return the size of the packet (not counting the header).
    053         */
    054        public int getPacketSize()
    055        {
    056            return 33;
    057        }
    058    }