Examples of tagCount()


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

                        vectorTag.setInteger(NBT_FIELD_BLOCK_METADATA, targetCheck.getBlockMetadata(world));
                        list.appendTag(vectorTag);
                      }
                      else
                      {
                        for (int i = 0; i < list.tagCount(); i++)
                        {
                          Vector3 vector = new Vector3((NBTTagCompound) list.tagAt(i));

                          if (vector.equals(position))
                          {
View Full Code Here

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

                }
              }

              saveNBT.setTag(NBT_FIELD_BLOCK_LIST, list);

              nbt.setInteger(NBT_FIELD_SIZE, list.tagCount());

              NBTUtility.saveData(getSaveDirectory(), NBT_FILE_SAVE_PREFIX + getModeID(itemStack), saveNBT);

              this.clearCache();
View Full Code Here

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

      if (nbt != null)
      {
        NBTTagList nbtTagList = nbt.getTagList(NBT_FIELD_BLOCK_LIST);

        for (int i = 0; i < nbtTagList.tagCount(); i++)
        {
          NBTTagCompound vectorTag = (NBTTagCompound) nbtTagList.tagAt(i);
          Vector3 position = new Vector3(vectorTag);

          if (scale > 0)
View Full Code Here

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

    this.slots = new ItemStack[this.getSizeInventory()];
    if (nbt.hasKey("CustomName"))
    {
      this.customName = nbt.getString("CustomName");
    }
    for (int i = 0; i < nbttaglist.tagCount(); ++i)
    {
      NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.tagAt(i);
      int j = nbttagcompound1.getByte("Slot") & 255;

      if (j >= 0 && j < this.slots.length)
View Full Code Here

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

    public void readFromNBT(NBTTagCompound nbttagcompound)
    {
        super.readFromNBT(nbttagcompound);
        NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
        chestContents = new ItemStack[getSizeInventory()];
        for (int i = 0; i < nbttaglist.tagCount(); i++)
        {
            NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
            int j = nbttagcompound1.getByte("Slot") & 0xff;
            if (j >= 0 && j < chestContents.length)
            {
View Full Code Here

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

    subGrid.readFromNBT( compound );

    // Extra Fields
    NBTTagList list = compound.getTagList( "extraFields" );
    if( list != null ) {
      int count = list.tagCount();
      for(int i=0; i<count; i++) {
        NBTBase tag = list.tagAt( i );
        if( tag != null ) {
          Object field = Utils.readFieldFromNBT( tag );
          String name = tag.getName();
View Full Code Here

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

  public void readFromNBT(NBTTagCompound compound) {
    NBTTagCompound c = ((NBTTagCompound) compound.getTag( "inv." + name ));
    if( c == null ) return;

    NBTTagList list = c.getTagList( "inventoryContents" );
    for( int i = 0; i < list.tagCount() && i < internalInv.length; i++ ) {
      NBTTagCompound tag = (NBTTagCompound) list.tagAt( i );
      int index = tag.getInteger( "index" );
      internalInv[index] = Utils.readStackFromNBT( tag );
    }
  }
View Full Code Here

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

    ItemStack[] ingredients = new ItemStack[9];
    NBTTagList tagList = compound.getTagList( "recipeIngredients" );
    if( tagList == null )
      return null;
    for( int i = 0; i < tagList.tagCount(); i++ ) {
      NBTTagCompound tag = (NBTTagCompound) tagList.tagAt( i );
      int index = tag.getInteger( "index" );
      ingredients[index] = Utils.readStackFromNBT( tag );
    }
View Full Code Here

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

    if( nbt == null )
      return;

    // Read the ingredients.
    NBTTagList list1 = nbt.getTagList( "ingredientList" );
    for( int i = 0; i < list1.tagCount(); i++ ) {
      NBTTagCompound tag = (NBTTagCompound) list1.tagAt( i );
      ItemStack item = Utils.readStackFromNBT( (NBTTagCompound) tag.getTag( "ingredient" ) );
      if( item != null )
        ingredients.addStack( item );
    }
View Full Code Here

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

        ingredients.addStack( item );
    }

    // Read the recipes.
    NBTTagList list2 = nbt.getTagList( "recipes" );
    for( int i = 0; i < list2.tagCount(); i++ ) {
      NBTTagCompound tag = (NBTTagCompound) list2.tagAt( i );
      ItemStack key = Utils.readStackFromNBT( (NBTTagCompound) tag.getTag( "key" ) );
      if( key != null ) {
        CraftRecipe recipe = CraftRecipe.readFromNBT( tag );
        recipes.put( key, recipe );
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.