Examples of NBTTagString


Examples of net.minecraft.nbt.NBTTagString

  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.NBTTagString

    root.setTag("cartList", cartList);

    if(!newlySpawnedCarts.isEmpty()) {
      NBTTagList spawnedCartList = new NBTTagList();
      for (UUID uuid : newlySpawnedCarts) {
        spawnedCartList.appendTag(new NBTTagString(uuid.toString()));
      }
      root.setTag("newlySpawnedCarts", spawnedCartList);
    }
  }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

  @Override
  public void writeToNBT(NBTTagCompound nbtRoot) {
    super.writeToNBT(nbtRoot);
    NBTTagList list = new NBTTagList();
    for (ForgeDirection dir : validConnections) {
      NBTTagString name = new NBTTagString(dir.name());
      list.appendTag(name);
    }
    nbtRoot.setTag("validConnections", list);
  }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

    public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
        if (par1ItemStack.stackTagCompound != null) {
            if (par1ItemStack.stackTagCompound.hasKey("info")) {
                NBTTagCompound info = par1ItemStack.stackTagCompound.getCompoundTag("info");
                for (Object o : info.getTags()) {
                    NBTTagString t = (NBTTagString) o;
                    par3List.add(t.data);
                }
            }
        }
    }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

    if (genFlatBedrock) {
      genTag.setBoolean("Bedrock", true);
    }
    NBTTagList featureList = new NBTTagList();
    for (int i = 0; i < features.size(); i++) {
      featureList.appendTag(new NBTTagString(features.get(i).getFeatureName()));
    }
    genTag.setTag("List", featureList);
    genTag.setLong("Hash", genHash);
    // FIXME: is it possible for a chunk to save out before we retrogen it?
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

                            System.out.println("Match found");
                            list.removeTag(j);
                        }
                    }
                }
                list.appendTag(new NBTTagString(color + args[0].toLowerCase() + "> " + cmd));
                display.setTag("Lore", list);

                is.getTagCompound().setTag("display", display);
                is.getTagCompound().setTag("FEbinding", nbt);
            }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

        {
            NBTTagList list = new NBTTagList();
            String[] array = (String[]) obj;
            for (int i = 0; i < array.length; i++)
            {
                list.appendTag(new NBTTagString(array[i]));
            }

            tag.setTag(name, list);
        }
        else if (IReconstructData.class.isAssignableFrom(type))
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

        {
            return tag.getString(name);
        }
        else if (type.equals(String[].class))
        {
            NBTTagList list = tag.getTagList(name, new NBTTagString(Strings.EMPTY).getId());
            String[] array = new String[list.tagCount()];
            for (int i = 0; i < array.length; i++)
            {
                array[i] = list.getStringTagAt(i);
            }
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

                        return;
                    }

                    if (itemstack.getItem() == Items.written_book && itemstack1.getItem() == Items.writable_book)
                    {
                        itemstack1.setTagInfo("author", new NBTTagString(net.playerEntity.getCommandSenderName()));
                        itemstack1.setTagInfo("title", new NBTTagString(itemstack.getTagCompound().getString("title")));
                        itemstack1.setTagInfo("pages", itemstack.getTagCompound().getTagList("pages", 8));
                        itemstack1.func_150996_a(Items.written_book);
                    }

                    return;
View Full Code Here

Examples of net.minecraft.nbt.NBTTagString

            }

            SortedSet<String> keys = new TreeSet<String>(map.keySet());
            for (String name : keys)
            {
                pages.appendTag(new NBTTagString(name + map.get(name)));
            }

            tag.setString("author", "ForgeEssentials");
            tag.setString("title", "Rule Book");
            tag.setTag("pages", pages);
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.