private static void writeWatchableObject(DataOutputStream var0, WatchableObject var1) throws IOException {
      int var2 = (var1.getObjectType() << 5 | var1.getDataValueId() & 31) & 255;
      var0.writeByte(var2);
      switch(var1.getObjectType()) {
      case 0:
         var0.writeByte(((Byte)var1.getObject()).byteValue());
         break;
      case 1:
         var0.writeShort(((Short)var1.getObject()).shortValue());
         break;
      case 2:
         var0.writeInt(((Integer)var1.getObject()).intValue());
         break;
      case 3:
         var0.writeFloat(((Float)var1.getObject()).floatValue());
         break;
      case 4:
         Packet.writeString((String)var1.getObject(), var0);
         break;
      case 5:
         ItemStack var4 = (ItemStack)var1.getObject();
         var0.writeShort(var4.getItem().shiftedIndex);
         var0.writeByte(var4.stackSize);
         var0.writeShort(var4.getItemDamage());
         break;
      case 6:
         ChunkCoordinates var3 = (ChunkCoordinates)var1.getObject();
         var0.writeInt(var3.posX);
         var0.writeInt(var3.posY);
         var0.writeInt(var3.posZ);
      }

   }