Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagList.tagCount()


    for(MinerFilter filter : filters)
    {
      filterTags.appendTag(filter.write(new NBTTagCompound()));
    }

    if(filterTags.tagCount() != 0)
    {
      itemStack.stackTagCompound.setTag("filters", filterTags);
    }
  }
View Full Code Here


      if(itemStack.stackTagCompound.hasKey("filters"))
      {
        NBTTagList tagList = itemStack.stackTagCompound.getTagList("filters", NBT.TAG_COMPOUND);

        for(int i = 0; i < tagList.tagCount(); i++)
        {
          filters.add(MinerFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
        }
      }
    }
View Full Code Here

      NBTTagCompound tagCompound = new NBTTagCompound();
      filter.write(tagCompound);
      filterTags.appendTag(tagCompound);
    }

    if(filterTags.tagCount() != 0)
    {
      nbtTags.setTag("filters", filterTags);
    }
   
    return nbtTags;
View Full Code Here

    if(nbtTags.hasKey("filters"))
    {
      NBTTagList tagList = nbtTags.getTagList("filters", NBT.TAG_COMPOUND);

      for(int i = 0; i < tagList.tagCount(); i++)
      {
        filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
      }
    }
  }
View Full Code Here

      NBTTagCompound tagCompound = new NBTTagCompound();
      filter.write(tagCompound);
      filterTags.appendTag(tagCompound);
    }

    if(filterTags.tagCount() != 0)
    {
      itemStack.stackTagCompound.setTag("filters", filterTags);
    }
  }
View Full Code Here

      if(itemStack.stackTagCompound.hasKey("filters"))
      {
        NBTTagList tagList = itemStack.stackTagCompound.getTagList("filters", NBT.TAG_COMPOUND);

        for(int i = 0; i < tagList.tagCount(); i++)
        {
          filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
        }
      }
    }
View Full Code Here

      NBTTagCompound tagCompound = new NBTTagCompound();
      filter.write(tagCompound);
      filterTags.appendTag(tagCompound);
    }

    if(filterTags.tagCount() != 0)
    {
      nbtTags.setTag("filters", filterTags);
    }
  }
View Full Code Here

    if(nbtTags.hasKey("filters"))
    {
      NBTTagList tagList = nbtTags.getTagList("filters", NBT.TAG_COMPOUND);

      for(int i = 0; i < tagList.tagCount(); i++)
      {
        filters.add(TransporterFilter.readFromNBT((NBTTagCompound)tagList.getCompoundTagAt(i)));
      }
    }
  }
View Full Code Here

    // System.out.println("readFromNBT");

    NBTTagList nbtItems = nbttagcompound.getTagList("items");

    for (int j = 0; j < nbtItems.tagCount(); ++j) {
      try {
        NBTTagCompound nbtTreeMap = (NBTTagCompound) nbtItems.tagAt(j);

        ForgeDirection orientation = ForgeDirection.values()[nbtTreeMap.getInteger("orientation")];
View Full Code Here

    lowerBoundary = nbttagcompound.getInteger("lowerBoundary");

    // Our inventory
    NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
    //Redundant: contents = new ItemStack[Info.SM_INVENTORY_SIZE];
    for (int i = 0; i < nbttaglist.tagCount(); ++i)
    {
      NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
      int j = nbttagcompound1.getByte("Slot") & 255;

      if (j >= 0 && j < contents.length)
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.