Examples of tagAt()


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

    // Our inventory
    contents = new ItemStack[Info.CB_INVENTORY_SIZE];
    NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
    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

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

    // Our inventory
    contents = new ItemStack[Info.BS_INVENTORY_SIZE];
    NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
    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

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

        NBTTagList inputPins = ((NBTTagCompound)circuits.tagAt(c)).getTagList("inputPins");
        if(inputPins != null)
        {
          for(int i = 0; i < inputPins.tagCount() && i < _pinMappingInputs[c].length; i++)
          {
            int pin = ((NBTTagCompound)inputPins.tagAt(i)).getInteger("pin");
            int buffer = ((NBTTagCompound)inputPins.tagAt(i)).getInteger("buffer");
            _pinMappingInputs[c][i] = new PinMapping(pin, buffer);
          }
        }
       
View Full Code Here

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

        if(inputPins != null)
        {
          for(int i = 0; i < inputPins.tagCount() && i < _pinMappingInputs[c].length; i++)
          {
            int pin = ((NBTTagCompound)inputPins.tagAt(i)).getInteger("pin");
            int buffer = ((NBTTagCompound)inputPins.tagAt(i)).getInteger("buffer");
            _pinMappingInputs[c][i] = new PinMapping(pin, buffer);
          }
        }
       
        NBTTagList outputPins = ((NBTTagCompound)circuits.tagAt(c)).getTagList("outputPins");
View Full Code Here

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

        NBTTagList outputPins = ((NBTTagCompound)circuits.tagAt(c)).getTagList("outputPins");
        if(outputPins != null)
        {
          for(int i = 0; i < outputPins.tagCount() && i < _pinMappingOutputs[c].length; i++)
          {
            int pin = ((NBTTagCompound)outputPins.tagAt(i)).getInteger("pin");
            int buffer = ((NBTTagCompound)outputPins.tagAt(i)).getInteger("buffer");
            _pinMappingOutputs[c][i] = new PinMapping(pin, buffer);
          }
        }
       
View Full Code Here

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

        if(outputPins != null)
        {
          for(int i = 0; i < outputPins.tagCount() && i < _pinMappingOutputs[c].length; i++)
          {
            int pin = ((NBTTagCompound)outputPins.tagAt(i)).getInteger("pin");
            int buffer = ((NBTTagCompound)outputPins.tagAt(i)).getInteger("buffer");
            _pinMappingOutputs[c][i] = new PinMapping(pin, buffer);
          }
        }
       
        NBTTagCompound circuitState = ((NBTTagCompound)circuits.tagAt(c)).getCompoundTag("state");
View Full Code Here

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

    NBTTagList circuits = nbttagcompound.getTagList("circuits");
    if(circuits != null)
    {
      for(int c = 0; c < circuits.tagCount(); c++)
      {
        initCircuit(c, ((NBTTagCompound)circuits.tagAt(c)).getString("circuit"));
       
        NBTTagList inputPins = ((NBTTagCompound)circuits.tagAt(c)).getTagList("inputPins");
        if(inputPins != null)
        {
          for(int i = 0; i < inputPins.tagCount() && i < _pinMappingInputs[c].length; i++)
View Full Code Here

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

    super.readFromNBT(nbttagcompound);
   
    NBTTagList nbttaglist = nbttagcompound.getTagList("Tanks");
    for(int i = 0; i < nbttaglist.tagCount(); i++)
    {
      NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
      int j = nbttagcompound1.getByte("Tank") & 0xff;
      if(j >= 0 && j < _tanks.length)
      {
        LiquidStack l = LiquidStack.loadLiquidStackFromNBT(nbttagcompound1);
        if(l != null && l.asItemStack().getItem() != null && LiquidContainerRegistry.isLiquid(l.asItemStack()))
View Full Code Here

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

  private static void updateEnchantment(ItemStack stack, int enchantId, short newLevel)
  {
    NBTTagList tagList = stack.getTagCompound().getTagList("ench");
    for(int i = 0; i < tagList.tagCount(); ++i)
    {
      if(((NBTTagCompound)tagList.tagAt(i)).getShort("id") == enchantId)
      {
        ((NBTTagCompound)tagList.tagAt(i)).setShort("lvl", newLevel);
      }
    }
    stack.getTagCompound().setTag("ench", tagList);
View Full Code Here

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

    NBTTagList tagList = stack.getTagCompound().getTagList("ench");
    for(int i = 0; i < tagList.tagCount(); ++i)
    {
      if(((NBTTagCompound)tagList.tagAt(i)).getShort("id") == enchantId)
      {
        ((NBTTagCompound)tagList.tagAt(i)).setShort("lvl", newLevel);
      }
    }
    stack.getTagCompound().setTag("ench", tagList);
  }
 
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.