    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import java.io.DataInputStream;
    006    import java.io.DataOutputStream;
    007    import java.io.IOException;
    008
    009    public class Packet61DoorChange extends Packet
    010    {
    011        public int sfxID;
    012        public int auxData;
    013        public int posX;
    014        public int posY;
    015        public int posZ;
    016        private boolean field_82561_f;
    017
    018        public Packet61DoorChange() {}
    019
    020        public Packet61DoorChange(int par1, int par2, int par3, int par4, int par5, boolean par6)
    021        {
    022            this.sfxID = par1;
    023            this.posX = par2;
    024            this.posY = par3;
    025            this.posZ = par4;
    026            this.auxData = par5;
    027            this.field_82561_f = par6;
    028        }
    029
    030        /**
    031         * Abstract. Reads the raw packet data from the data stream.
    032         */
    033        public void readPacketData(DataInputStream par1DataInputStream) throws IOException
    034        {
    035            this.sfxID = par1DataInputStream.readInt();
    036            this.posX = par1DataInputStream.readInt();
    037            this.posY = par1DataInputStream.readByte() & 255;
    038            this.posZ = par1DataInputStream.readInt();
    039            this.auxData = par1DataInputStream.readInt();
    040            this.field_82561_f = par1DataInputStream.readBoolean();
    041        }
    042
    043        /**
    044         * Abstract. Writes the raw packet data to the data stream.
    045         */
    046        public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
    047        {
    048            par1DataOutputStream.writeInt(this.sfxID);
    049            par1DataOutputStream.writeInt(this.posX);
    050            par1DataOutputStream.writeByte(this.posY & 255);
    051            par1DataOutputStream.writeInt(this.posZ);
    052            par1DataOutputStream.writeInt(this.auxData);
    053            par1DataOutputStream.writeBoolean(this.field_82561_f);
    054        }
    055
    056        /**
    057         * Passes this Packet on to the NetHandler for processing.
    058         */
    059        public void processPacket(NetHandler par1NetHandler)
    060        {
    061            par1NetHandler.handleDoorChange(this);
    062        }
    063
    064        /**
    065         * Abstract. Return the size of the packet (not counting the header).
    066         */
    067        public int getPacketSize()
    068        {
    069            return 21;
    070        }
    071
    072        @SideOnly(Side.CLIENT)
    073        public boolean func_82560_d()
    074        {
    075            return this.field_82561_f;
    076        }
    077    }