Examples of appendTag()


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

    for (ItemStack stack : storedRequirements) {
      NBTTagCompound sub = new NBTTagCompound();
      stack.writeToNBT(stack.writeToNBT(sub));
      sub.setInteger("id", registry.getIdForItem(stack.getItem()));
      rq.appendTag(sub);
    }

    nbt.setTag("rq", rq);
  }
View Full Code Here

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

    double[] adouble = par1ArrayOfDouble;
    int i = par1ArrayOfDouble.length;

    for (int j = 0; j < i; ++j) {
      double d1 = adouble[j];
      nbttaglist.appendTag(new NBTTagDouble(d1));
    }

    return nbttaglist;
  }
View Full Code Here

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

    float[] afloat = par1ArrayOfFloat;
    int i = par1ArrayOfFloat.length;

    for (int j = 0; j < i; ++j) {
      float f1 = afloat[j];
      nbttaglist.appendTag(new NBTTagFloat(f1));
    }

    return nbttaglist;
  }
View Full Code Here

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

    for (Block b : idToBlock) {
      NBTTagCompound sub = new NBTTagCompound();
      sub.setString("name",
          Block.blockRegistry.getNameForObject(b));
      blocksMapping.appendTag(sub);
    }

    nbt.setTag("blocksMapping", blocksMapping);

    NBTTagList itemsMapping = new NBTTagList();
View Full Code Here

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

    for (Item i : idToItem) {
      NBTTagCompound sub = new NBTTagCompound();
      sub.setString("name",
          Item.itemRegistry.getNameForObject(i));
      itemsMapping.appendTag(sub);
    }

    nbt.setTag("itemsMapping", itemsMapping);

    NBTTagList entitiesMapping = new NBTTagList();
View Full Code Here

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

    NBTTagList entitiesMapping = new NBTTagList();

    for (Class<? extends Entity> e : idToEntity) {
      NBTTagCompound sub = new NBTTagCompound();
      sub.setString("name", e.getCanonicalName());
      entitiesMapping.appendTag(sub);
    }

    nbt.setTag("entitiesMapping", entitiesMapping);
  }
View Full Code Here

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

      for (ItemStack stack : storedRequirements) {
        NBTTagCompound sub = new NBTTagCompound();
        stack.writeToNBT(stack.writeToNBT(sub));
        sub.setInteger("id", registry.getIdForItem(stack.getItem()));
        rq.appendTag(sub);
      }

      nbt.setTag("rq", rq);
    }
  }
View Full Code Here

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

  private void setPlayerResearch(ItemStack stack, String playername) {
    List<String> researchesDone = ResearchManager.getResearchForPlayer(playername);
    NBTTagCompound cmp = ItemNBTHelper.getNBT(stack);
    NBTTagList list = new NBTTagList();
    for (String tag : researchesDone) {
      list.appendTag(new NBTTagString(tag));
    }
    cmp.setTag("research", list);

  }
View Full Code Here

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

    for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
      if (inventorySlots[var3] != null) {
        NBTTagCompound var4 = new NBTTagCompound();
        var4.setByte("Slot", (byte) var3);
        inventorySlots[var3].writeToNBT(var4);
        var2.appendTag(var4);
      }
    }
    par1NBTTagCompound.setTag("Items", var2);
  }
View Full Code Here

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

    for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
      if (inventorySlots[var3] != null) {
        NBTTagCompound var4 = new NBTTagCompound();
        var4.setByte("Slot", (byte) var3);
        inventorySlots[var3].writeToNBT(var4);
        var2.appendTag(var4);
      }
    }
    par1NBTTagCompound.setTag("Items", var2);
  }
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.