readInt() public method

public readInt ( ) : int
return int
Esempio n. 1
0
        public static List readWatchableObjects(DataInputStream datainputstream)
        {
            ArrayList arraylist = null;
            for (byte byte0 = datainputstream.readByte(); byte0 != 127; byte0 = datainputstream.readByte())
            {
                if (arraylist == null)
                {
                    arraylist = new ArrayList();
                }
                int i = (byte0 & 0xe0) >> 5;
                int j = byte0 & 0x1f;
                WatchableObject watchableobject = null;
                switch (i)
                {
                    case 0: // '\0'
                        watchableobject = new WatchableObject(i, j, Byte.valueOf(datainputstream.readByte()));
                        break;

                    case 1: // '\001'
                        watchableobject = new WatchableObject(i, j, Short.valueOf(datainputstream.readShort()));
                        break;

                    case 2: // '\002'
                        watchableobject = new WatchableObject(i, j, Integer.valueOf(datainputstream.readInt()));
                        break;

                    case 3: // '\003'
                        watchableobject = new WatchableObject(i, j, Float.valueOf(datainputstream.readFloat()));
                        break;

                    case 4: // '\004'
                        watchableobject = new WatchableObject(i, j, datainputstream.readUTF());
                        break;

                    case 5: // '\005'
                        short word0 = datainputstream.readShort();
                        byte byte1 = datainputstream.readByte();
                        short word1 = datainputstream.readShort();
                        watchableobject = new WatchableObject(i, j, new ItemStack(word0, byte1, word1));

                        // fall through (not.. c#..)

                        int k2 = datainputstream.readInt();
                        int l2 = datainputstream.readInt();
                        int i12 = datainputstream.readInt();
                        watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k2, l2, i12));

                        break;
                    case 6: // '\006'
                        int k = datainputstream.readInt();
                        int l = datainputstream.readInt();
                        int i1 = datainputstream.readInt();
                        watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k, l, i1));
                        break;
                }
                arraylist.add(watchableobject);
            }

            return arraylist;
        }
Esempio n. 2
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     type = datainputstream.readByte();
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     zPosition = datainputstream.readInt();
 }
Esempio n. 3
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     xLocation = datainputstream.readInt();
     yLocation = datainputstream.readShort();
     zLocation = datainputstream.readInt();
     instrumentType = datainputstream.read();
     pitch = datainputstream.read();
 }
Esempio n. 4
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     field_22041_a = datainputstream.readInt();
     field_22042_e = datainputstream.readByte();
     field_22040_b = datainputstream.readInt();
     field_22044_c = datainputstream.readByte();
     field_22043_d = datainputstream.readInt();
 }
Esempio n. 5
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.read();
     zPosition = datainputstream.readInt();
     type = datainputstream.read();
     metadata = datainputstream.read();
 }
Esempio n. 6
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     zPosition = datainputstream.readInt();
     yaw = (byte) datainputstream.read();
     pitch = (byte) datainputstream.read();
 }
Esempio n. 7
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     type = datainputstream.readByte();
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     zPosition = datainputstream.readInt();
     yaw = datainputstream.readByte();
     pitch = datainputstream.readByte();
     receivedMetadata = DataWatcher.readWatchableObjects(datainputstream);
 }
Esempio n. 8
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     name = datainputstream.readUTF();
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     zPosition = datainputstream.readInt();
     rotation = datainputstream.readByte();
     pitch = datainputstream.readByte();
     currentItem = datainputstream.readShort();
 }
Esempio n. 9
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readShort();
     zPosition = datainputstream.readInt();
     signLines = new string[4];
     for (int i = 0; i < 4; i++)
     {
         signLines[i] = datainputstream.readUTF();
     }
 }
Esempio n. 10
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     itemID = datainputstream.readShort();
     count = datainputstream.readByte();
     itemDamage = datainputstream.readShort();
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     zPosition = datainputstream.readInt();
     rotation = datainputstream.readByte();
     pitch = datainputstream.readByte();
     roll = datainputstream.readByte();
 }
Esempio n. 11
0
        public override void readPacketData(DataInputStream datainputstream)
        {
            xPosition = datainputstream.readInt();
            zPosition = datainputstream.readInt();
            size = datainputstream.readShort() & 0xffff;
            coordinateArray = new short[size];
            typeArray = new byte[size];
            metadataArray = new byte[size];
            for (int i = 0; i < size; i++)
            {
                coordinateArray[i] = datainputstream.readShort();
            }

            datainputstream.readFully(typeArray);
            datainputstream.readFully(metadataArray);
        }
Esempio n. 12
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     motionX = datainputstream.readShort();
     motionY = datainputstream.readShort();
     motionZ = datainputstream.readShort();
 }
Esempio n. 13
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     protocolVersion = datainputstream.readInt();
     username = datainputstream.readUTF();
     password = datainputstream.readUTF();
     mapSeed = datainputstream.readLong();
     dimension = datainputstream.readByte();
 }
Esempio n. 14
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.read();
     zPosition = datainputstream.readInt();
     direction = datainputstream.read();
     short word0 = datainputstream.readShort();
     if (word0 >= 0)
     {
         byte byte0 = datainputstream.readByte();
         short word1 = datainputstream.readShort();
         itemStack = new ItemStack(word0, byte0, word1);
     }
     else
     {
         itemStack = null;
     }
 }
Esempio n. 15
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     explosionX = datainputstream.readDouble();
     explosionY = datainputstream.readDouble();
     explosionZ = datainputstream.readDouble();
     explosionSize = datainputstream.readFloat();
     int i = datainputstream.readInt();
     destroyedBlockPositions = new HashSet();
     var j = (int) explosionX;
     var k = (int) explosionY;
     var l = (int) explosionZ;
     for (int i1 = 0; i1 < i; i1++)
     {
         int j1 = datainputstream.readByte() + j;
         int k1 = datainputstream.readByte() + k;
         int l1 = datainputstream.readByte() + l;
         destroyedBlockPositions.add(new ChunkPosition(j1, k1, l1));
     }
 }
Esempio n. 16
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     field_21018_b = DataWatcher.readWatchableObjects(datainputstream);
 }
Esempio n. 17
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     xPosition = datainputstream.readInt();
     yPosition = datainputstream.readInt();
     mode = datainputstream.read() != 0;
 }
Esempio n. 18
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     entityId = datainputstream.readInt();
     entityStatus = datainputstream.readByte();
 }
Esempio n. 19
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     playerEntityId = datainputstream.readInt();
     targetEntity = datainputstream.readInt();
     isLeftClick = datainputstream.readByte();
 }
Esempio n. 20
0
 public override void readPacketData(DataInputStream datainputstream)
 {
     collectedEntityId = datainputstream.readInt();
     collectorEntityId = datainputstream.readInt();
 }