Examples of tagAt()


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

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

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

    energyCap = Math.max(packetSize, outputRate);

    NBTTagList nbttaglist = nbttagcompound.getTagList("SideSettings");
    for (int i = 0; i < nbttaglist.tagCount(); ++i)
    {
      NBTTagCompound entry = (NBTTagCompound)nbttaglist.tagAt(i);
      if (i >= 0 && i < sideSettings.length)
      {
        sideSettings[i] = (byte)(entry.getByte("Flags") & 255);
      }
    }
View Full Code Here

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

    }
    else
    {
      NBTTagList pos = mobTag.getTagList("Pos");
      ((NBTTagDouble)pos.tagAt(0)).data = x;
      ((NBTTagDouble)pos.tagAt(1)).data = y;
      ((NBTTagDouble)pos.tagAt(2)).data = z;
     
      e = EntityList.createEntityFromNBT(mobTag, world);
      if (e != null)
      {
View Full Code Here

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

    else
    {
      NBTTagList pos = mobTag.getTagList("Pos");
      ((NBTTagDouble)pos.tagAt(0)).data = x;
      ((NBTTagDouble)pos.tagAt(1)).data = y;
      ((NBTTagDouble)pos.tagAt(2)).data = z;
     
      e = EntityList.createEntityFromNBT(mobTag, world);
      if (e != null)
      {
        if(e instanceof EntityLiving)
View Full Code Here

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

    {
      List<ItemStack> drops = new ArrayList<ItemStack>();
      NBTTagList nbttaglist = tag.getTagList("DropItems");
      for (int i = nbttaglist.tagCount(); i --> 0; )
      {
        NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
        ItemStack item = ItemStack.loadItemStackFromNBT(nbttagcompound1);
        if (item != null && item.stackSize > 0)
        {
          drops.add(item);
        }
View Full Code Here

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

      e = ((RandomMob)WeightedRandom.getRandomItem(world.rand, mobs)).getMob();
    }
    else
    {
      NBTTagList pos = mobTag.getTagList("Pos");
      ((NBTTagDouble)pos.tagAt(0)).data = x;
      ((NBTTagDouble)pos.tagAt(1)).data = y;
      ((NBTTagDouble)pos.tagAt(2)).data = z;
     
      e = EntityList.createEntityFromNBT(mobTag, world);
      if (e != null)
View Full Code Here

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

    this.tileEntities.clear();

    NBTTagList tileEntitiesList = tagCompound.getTagList("TileEntities");

    for (int i = 0; i < tileEntitiesList.tagCount(); i++) {
      TileEntity tileEntity = TileEntity.createAndLoadEntity((NBTTagCompound) tileEntitiesList.tagAt(i));
      if (tileEntity != null) {
        tileEntity.worldObj = this;
        this.tileEntities.add(tileEntity);
      }
    }
View Full Code Here

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

        NBTTagList occupantsTagList = par1NBTTagCompound.getTagList("occupants");
        this.occupants = new LinkedList<EntityCitizen>();

        for (int var3 = 0; var3 < occupantsTagList.tagCount(); ++var3)
        {
            NBTTagCompound var4 = (NBTTagCompound)occupantsTagList.tagAt(var3);

            this.occupants.add(EntityCitizen.loadEntityCitizenFromNBT(var4));
        }
       
       
View Full Code Here

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

        NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
        this.chestContents = new ItemStack[this.getSizeInventory()];

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

            if (var5 >= 0 && var5 < this.chestContents.length)
            {
                this.chestContents[var5] = ItemStack.loadItemStackFromNBT(var4);
View Full Code Here

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

        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)
            {
                this.furnaceItemStacks[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.