Examples of tagCount()


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

  public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
    adult = par1NBTTagCompound.getBoolean(TAG_ADULT);
    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()

  public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
    NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
    inventorySlots = new ItemStack[1];

    if (nbttaglist.tagCount() > 0) {
      NBTTagCompound tagList = nbttaglist.getCompoundTagAt(0);
      inventorySlots[0] = ItemStack.loadItemStackFromNBT(tagList);
    }
  }
View Full Code Here

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

  public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
    super.readFromNBT(par1NBTTagCompound);

    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()

  }

  public void readCustomNBT(NBTTagCompound par1NBTTagCompound) {
    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()

    {
        super.readFromNBT(par1NBTTagCompound);
        NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
        this.furnaceItemStacks = new ItemStack[this.getSizeInventory()];

        for (int var3 = 0; var3 < var2.tagCount(); ++var3)
        {
            NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3);
            byte var5 = var4.getByte("Slot");

            if (var5 >= 0 && var5 < this.furnaceItemStacks.length)
View Full Code Here

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

    // read in the inventories contents
    inventory = new ItemStack[slotDefinition.getNumSlots()];

    NBTTagList itemList = (NBTTagList) nbtRoot.getTag("Items");
    if(itemList != null) {
      for (int i = 0; i < itemList.tagCount(); i++) {
        NBTTagCompound itemStack = itemList.getCompoundTagAt(i);
        byte slot = itemStack.getByte("Slot");
        if(slot >= 0 && slot < inventory.length) {
          inventory[slot] = ItemStack.loadItemStackFromNBT(itemStack);
        }
View Full Code Here

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

            NBTTagCompound nbt = PacketHandler.readNBTTagCompound(dataStream);
            byte type = nbt.getByte("type");

            NBTTagList nbtList = (NBTTagList) nbt.getTag("list");

            for (int i = 0; i < nbtList.tagCount(); i++)
            {
              Vector3 vector = new Vector3((NBTTagCompound) nbtList.tagAt(i)).translate(0.5);

              if (type == 1)
              {
View Full Code Here

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

             */
            NBTTagCompound nbt = PacketHandler.readNBTTagCompound(dataStream);

            NBTTagList nbtList = (NBTTagList) nbt.getTag("list");

            for (int i = 0; i < nbtList.tagCount(); i++)
            {
              // Render hologram for starting position
              Vector3 vector = new Vector3((NBTTagCompound) nbtList.tagAt(i)).translate(0.5);

              if (isPreview)
View Full Code Here

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

             */
            NBTTagCompound nbt = PacketHandler.readNBTTagCompound(dataStream);

            NBTTagList nbtList = (NBTTagList) nbt.getTag("list");

            for (int i = 0; i < nbtList.tagCount(); i++)
            {
              Vector3 vector = new Vector3((NBTTagCompound) nbtList.tagAt(i)).translate(0.5);
              ModularForceFieldSystem.proxy.renderHologram(this.worldObj, vector, 1, 0, 0, 30, null);
            }

View Full Code Here

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

      {
        this.getCalculatedField().clear();
        NBTTagCompound nbt = PacketHandler.readNBTTagCompound(dataStream);
        NBTTagList nbtList = nbt.getTagList("blockList");

        for (int i = 0; i < nbtList.tagCount(); i++)
        {
          NBTTagCompound tagAt = (NBTTagCompound) nbtList.tagAt(i);
          this.getCalculatedField().add(new Vector3(tagAt));
        }
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.