    001    package net.minecraft.src;
    002
    003    import java.io.DataInputStream;
    004    import java.io.DataOutputStream;
    005    import java.io.IOException;
    006
    007    public class Packet101CloseWindow extends Packet
    008    {
    009        public int windowId;
    010
    011        public Packet101CloseWindow() {}
    012
    013        public Packet101CloseWindow(int par1)
    014        {
    015            this.windowId = par1;
    016        }
    017
    018        /**
    019         * Passes this Packet on to the NetHandler for processing.
    020         */
    021        public void processPacket(NetHandler par1NetHandler)
    022        {
    023            par1NetHandler.handleCloseWindow(this);
    024        }
    025
    026        /**
    027         * Abstract. Reads the raw packet data from the data stream.
    028         */
    029        public void readPacketData(DataInputStream par1DataInputStream) throws IOException
    030        {
    031            this.windowId = par1DataInputStream.readByte();
    032        }
    033
    034        /**
    035         * Abstract. Writes the raw packet data to the data stream.
    036         */
    037        public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
    038        {
    039            par1DataOutputStream.writeByte(this.windowId);
    040        }
    041
    042        /**
    043         * Abstract. Return the size of the packet (not counting the header).
    044         */
    045        public int getPacketSize()
    046        {
    047            return 1;
    048        }
    049    }