Examples of tagCount()


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

  public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
    locked = par1NBTTagCompound.getBoolean(TAG_LOCKED);

    NBTTagList var2 = par1NBTTagCompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
    inventorySlots = new ItemStack[getSizeInventory()];
    for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
      NBTTagCompound var4 = var2.getCompoundTagAt(var3);
      byte var5 = var4.getByte("Slot");
      if (var5 >= 0 && var5 < inventorySlots.length)
        inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
    }
View Full Code Here

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

    for (int i : par1NBTTagCompound.getIntArray(TAG_LEVELS))
      levels.add(i);

    NBTTagList var2 = par1NBTTagCompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
    inventorySlots = new ItemStack[getSizeInventory()];
    for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
      NBTTagCompound var4 = var2.getCompoundTagAt(var3);
      byte var5 = var4.getByte("Slot");
      if (var5 >= 0 && var5 < inventorySlots.length)
        inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
    }
View Full Code Here

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

    ItemStack curStack;
    ItemStack curStack2;

    ArrayList<ItemStack> containedItems = new ArrayList<ItemStack>();

    boolean[] visited = new boolean[nbtList.tagCount()];

    for (int i = 0; i < nbtList.tagCount(); i++) {
      NBTTagCompound tag = nbtList.getCompoundTagAt(i);
      int slot = tag.getInteger("Slot");
View Full Code Here

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

    ArrayList<ItemStack> containedItems = new ArrayList<ItemStack>();

    boolean[] visited = new boolean[nbtList.tagCount()];

    for (int i = 0; i < nbtList.tagCount(); i++) {
      NBTTagCompound tag = nbtList.getCompoundTagAt(i);
      int slot = tag.getInteger("Slot");

      if (visited[i] || slot < minSlot || slot > maxSlot) {
        continue;
View Full Code Here

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

      if (curStack == null) {
        continue;
      }
      containedItems.add(curStack);
      for (int j = 0; j < nbtList.tagCount(); j++) {
        NBTTagCompound tag2 = nbtList.getCompoundTagAt(j);
        int slot2 = tag.getInteger("Slot");

        if (visited[j] || slot2 < minSlot || slot2 > maxSlot) {
          continue;
View Full Code Here

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

        catch (Exception e)
        {
        }
       
        NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
        for (int var3 = 0; var3 < var2.tagCount(); ++var3)
        {
            NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
            byte var5 = var4.getByte("Slot");
           
            if (var5 >= 0 && var5 < this.inventory.length)
View Full Code Here

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

        super.readFromNBT(par1NBTTagCompound);
       
        NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
        this.inventory = new ItemStack[OTHER_SIZE + UPGRADE_SIZE];
       
        for (int i = 0; i < var2.tagCount(); i++)
        {
            NBTTagCompound tag = (NBTTagCompound) var2.tagAt(i);
            byte var5 = tag.getByte("Slot");
           
            if (var5 >= 0 && var5 < this.inventory.length)
View Full Code Here

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

        }
        catch (Exception e)
        {
        }
       
        for (int var3 = 0; var3 < var2.tagCount(); var3++)
        {
            NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
            byte var5 = var4.getByte("Slot");
           
            if (var5 >= 0 && var5 < this.inventory.length)
View Full Code Here

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

    public void readFromNBT(NBTTagCompound par1NBTTagCompound)
    {
        super.readFromNBT(par1NBTTagCompound);
       
        NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
        for (int var3 = 0; var3 < var2.tagCount(); ++var3)
        {
            NBTTagCompound var4 = (NBTTagCompound) var2.tagAt(var3);
            byte var5 = var4.getByte("Slot");
           
            if (var5 >= 0 && var5 < this.inventory.length)
View Full Code Here

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

        orientation = cmp.getInteger(TAG_ORIENTATION);
        blocks=cmp.getInteger(TAG_BLOCKS);
        NBTTagList var2 = cmp.getTagList("Items", Constants.NBT.TAG_COMPOUND);
        inventorySlots = new ItemStack[getSizeInventory()];
        for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
            NBTTagCompound var4 = var2.getCompoundTagAt(var3);
            byte var5 = var4.getByte("Slot");
            if (var5 >= 0 && var5 < inventorySlots.length)
                inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
        }
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.