Examples of tagAt()


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

      {
        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)
          {
            position.scale(scale);
View Full Code Here

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

    {
      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)
      {
        this.slots[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
View Full Code Here

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

    // 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();
          if( field != null ) {
            extraFields.put( name, field );
View Full Code Here

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

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

    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 );
    }

    NBTTagCompound stackTag = (NBTTagCompound) compound.getTag( "recipeResult" );
View Full Code Here

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

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

    }

    // 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

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

    NBTTagList nbtTagList = nbttagcompound.getTagList("Items");
    this.inventory = new ItemStack[this.getSizeInventory()];

    for (int i = 0; i < nbtTagList.tagCount(); i++)
    {
      NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbtTagList.tagAt(i);

      byte byte0 = nbttagcompound1.getByte("Slot");
      if ((byte0 >= 0) && (byte0 < this.inventory.length))
      {
        this.inventory[byte0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
View Full Code Here

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

    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")];

        if (!receivedStacks.containsKey(orientation))
          receivedStacks.put(orientation, new PipeItemsCompactorInventory());
View Full Code Here

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

    // 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)
      {
        contents[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
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.