public static List readWatchableObjects(DataInputStream par0DataInputStream) throws IOException { ArrayList arraylist = null; for (byte byte0 = par0DataInputStream.readByte(); byte0 != 127; byte0 = par0DataInputStream.readByte()) { if (arraylist == null) { arraylist = new ArrayList(); } int i = (byte0 & 0xe0) >> 5; int j = byte0 & 0x1f; WatchableObject watchableobject = null; switch (i) { case 0: watchableobject = new WatchableObject(i, j, Byte.valueOf(par0DataInputStream.readByte())); break; case 1: watchableobject = new WatchableObject(i, j, Short.valueOf(par0DataInputStream.readShort())); break; case 2: watchableobject = new WatchableObject(i, j, Integer.valueOf(par0DataInputStream.readInt())); break; case 3: watchableobject = new WatchableObject(i, j, Float.valueOf(par0DataInputStream.readFloat())); break; case 4: watchableobject = new WatchableObject(i, j, Packet.readString(par0DataInputStream, 64)); break; case 5: short word0 = par0DataInputStream.readShort(); byte byte1 = par0DataInputStream.readByte(); short word1 = par0DataInputStream.readShort(); watchableobject = new WatchableObject(i, j, new ItemStack(word0, byte1, word1)); break; case 6: int k = par0DataInputStream.readInt(); int l = par0DataInputStream.readInt(); int i1 = par0DataInputStream.readInt(); watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k, l, i1)); break; } arraylist.add(watchableobject); } return arraylist; }
public static List readWatchableObjects(DataInputStream par0DataInputStream) throws IOException { ArrayList var1 = null; for (byte var2 = par0DataInputStream.readByte(); var2 != 127; var2 = par0DataInputStream.readByte()) { if (var1 == null) { var1 = new ArrayList(); } int var3 = (var2 & 224) >> 5; int var4 = var2 & 31; WatchableObject var5 = null; switch (var3) { case 0: var5 = new WatchableObject(var3, var4, Byte.valueOf(par0DataInputStream.readByte())); break; case 1: var5 = new WatchableObject(var3, var4, Short.valueOf(par0DataInputStream.readShort())); break; case 2: var5 = new WatchableObject(var3, var4, Integer.valueOf(par0DataInputStream.readInt())); break; case 3: var5 = new WatchableObject(var3, var4, Float.valueOf(par0DataInputStream.readFloat())); break; case 4: var5 = new WatchableObject(var3, var4, Packet.readString(par0DataInputStream, 64)); break; case 5: short var9 = par0DataInputStream.readShort(); byte var10 = par0DataInputStream.readByte(); short var11 = par0DataInputStream.readShort(); var5 = new WatchableObject(var3, var4, new ItemStack(var9, var10, var11)); break; case 6: int var6 = par0DataInputStream.readInt(); int var7 = par0DataInputStream.readInt(); int var8 = par0DataInputStream.readInt(); var5 = new WatchableObject(var3, var4, new ChunkCoordinates(var6, var7, var8)); } var1.add(var5); } return var1; }