Examples of IntTag


Examples of net.lightstone.util.nbt.IntTag

    levelTags.put("HeightMap", new ByteArrayTag("HeightMap", heightMapData));
    levelTags.put("Entities", chunkEntitiesToTag(chunk));
    levelTags.put("TileEntities", chunkTileEntitiesToTag(chunk));
    levelTags.put("LastUpdate", new LongTag("LastUpdate", 0));

    levelTags.put("xPos", new IntTag("xPos", chunk.getX()));
    levelTags.put("zPos", new IntTag("zPos", chunk.getZ()));
    // TODO: terrainpopulated
    levelTags.put("TerrainPopulated", new ByteTag("TerrainPopulated", (byte) 0));
    return new CompoundTag("Level", levelTags);
  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

      return "";
    }
  }

  void setSoftLimit(int softLimit) {
    Tag tag = new IntTag(SL_SOFTFILES, softLimit);
    tagList.removeTag(SL_SOFTFILES);
    tagList.addTag(tag);

  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

      return 0;
    }
  }

  void setHardLimit(int hardLimit) {
    Tag tag = new IntTag(SL_HARDFILES, hardLimit);
    tagList.removeTag(SL_HARDFILES);
    tagList.addTag(tag);
  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

      return 0;
    }
  }
 
  void setPing(int receivedChallenge)  {
    Tag tag = new IntTag(SL_PING, Convert.longToInt(System.currentTimeMillis() - last_udp_response));
    tagList.removeTag(SL_PING);
    tagList.addTag(tag);
    last_udp_response = System.currentTimeMillis();
    sended_challenge = 0;
  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

    }
  }

  void setNumUsers(long numUsers) {
    last_udp_response = System.currentTimeMillis();
    Tag tag = new IntTag(SL_USERS, Convert.longToInt(numUsers));
    tagList.removeTag(SL_USERS);
    tagList.addTag(tag);
  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

    tagList.addTag(tag);
  }

  void setNumFiles(long numFiles) {
    last_udp_response = System.currentTimeMillis();
    Tag tag = new IntTag(SL_FILES, Convert.longToInt(numFiles));
    tagList.removeTag(SL_FILES);
    tagList.addTag(tag);

  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

      if (indexer == null) indexer = new Index(targetID);
      SharedFile file = SharingManagerSingleton.getInstance().getSharedFile(fileHash);
      InternalJKadManager _jkad_manager = (InternalJKadManager) JKadManagerSingleton.getInstance();
      ConfigurationManager config_manager = ConfigurationManagerSingleton.getInstance();
      TagList tagList = new TagList();
      tagList.addTag(new IntTag(JKadConstants.TAG_SOURCEIP, Convert.byteToInt(_jkad_manager.getIPAddress().getAddress())));
      try {
        tagList.addTag(new ShortTag(JKadConstants.TAG_SOURCEPORT, Convert.intToShort(config_manager.getTCP())));
      } catch (ConfigurationManagerException e) {
        e.printStackTrace();
        _jkad_manager.disconnect();
      }
      try {
        tagList.addTag(new ShortTag(JKadConstants.TAG_SOURCEUPORT, Convert.intToShort(config_manager.getUDP())));
      } catch (ConfigurationManagerException e) {
        e.printStackTrace();
        _jkad_manager.disconnect();
      }
      tagList.addTag(new IntTag(JKadConstants.TAG_FILESIZE, Convert.longToInt(file.length())));
      Source my_source = new Source(_jkad_manager.getClientID(), tagList);
     
      indexer.addSource(my_source);
    }
   
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

 
  public Source(ClientID clientID, IPAddress address, int udpPort, int tcpPort) {
    creationTime = System.currentTimeMillis();
    this.clientID = clientID;
    tagList = new TagList();
    tagList.addTag(new IntTag(JKadConstants.TAG_SOURCEIP,Convert.byteToInt(address.getAddress())));
    tagList.addTag(new ShortTag(JKadConstants.TAG_SOURCEPORT,Convert.intToShort(tcpPort)));
    tagList.addTag(new ShortTag(JKadConstants.TAG_SOURCEUPORT,Convert.intToShort(udpPort)));
  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

    return new IPAddress(Convert.intToByteArray(value));
  }

  public void setAddress(IPAddress address) {
    tagList.removeTag(JKadConstants.TAG_SOURCEIP);
    tagList.addTag(new IntTag(JKadConstants.TAG_SOURCEIP,Convert.byteToInt(address.getAddress())));
  }
View Full Code Here

Examples of org.jmule.core.edonkey.packet.tag.IntTag

    try {
      TagList tagList = new TagList();
      Tag tag;
      tag = new StringTag(FT_FILENAME, fileLink.getFileName());
      tagList.addTag(tag);
      tag = new IntTag(FT_FILESIZE, Convert.longToInt((fileLink
          .getFileSize())));
      tagList.addTag(tag);
      createDownloadFiles(fileLink.getFileName(), fileLink.getFileSize(),
          fileLink.getFileHash(), null, tagList);
      int partCount = (int) ((sharedFile.length() / PARTSIZE));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.