Examples of NBTTagList


Examples of net.minecraft.server.v1_4_R1.NBTTagList

//   
//    storage.setString(STRING_NBT_BINARY, baos.toString());
   
    String    author  = nbt.getString  (tagStringAuthor);
    String    title  = nbt.getString  (tagStringTitle);
    NBTTagList  pages  = nbt.getList  (tagStringPages);
   
    if (pages != null) {
      for (int i = 0; i < pages.size(); i++)
        setString(tagStringPagePref+i, ((NBTTagString)pages.get(i)).data);
      setInteger(tagIntegerPagesSize, pages.size());
    }
   
    if (title != null)
      setString(tagStringTitle, title);
   
View Full Code Here

Examples of net.minecraft.src.NBTTagList

    }
  }
   public void readFromNBT(NBTTagCompound nbttagcompound) {
       super.readFromNBT(nbttagcompound);
      
       NBTTagList nbttaglist = nbttagcompound.getTagList("stackList");
      
       theInventory = new ItemStack [nbttaglist.tagCount()];
      
       for (int i = 0; i < theInventory.length; ++i) { 
         NBTTagCompound nbttagcompound2 = (NBTTagCompound) nbttaglist
        .tagAt(i)
        
         if (!nbttagcompound2.getBoolean("isNull")) {
           theInventory [i] = ItemStack.loadItemStackFromNBT(nbttagcompound2);
         }
View Full Code Here

Examples of net.minecraft.src.NBTTagList

   }

  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);
   
      NBTTagList nbttaglist = new NBTTagList();
     
      for (int i = 0; i < theInventory.length; ++i) {       
        NBTTagCompound nbttagcompound2 = new NBTTagCompound ();
        nbttaglist.appendTag(nbttagcompound2);
        if (theInventory[i] == null) {
          nbttagcompound2.setBoolean("isNull", true);
        } else {
          nbttagcompound2.setBoolean("isNull", false);
          theInventory[i].writeToNBT(nbttagcompound2);
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.