Package net.minecraft.nbt

Examples of net.minecraft.nbt.NBTTagCompound


        ThaumicTinkerer.netHandler.registerMessage(PacketTabletButton.class, PacketTabletButton.class, 142 + 8, Side.SERVER);
        ThaumicTinkerer.netHandler.registerMessage(PacketPlacerButton.class, PacketPlacerButton.class, 142 + 9, Side.SERVER);
    }

    public void registerVersionChecker() {
        NBTTagCompound compound = new NBTTagCompound();
        compound.setString("curseProjectName", "75598-thaumic-tinkerer");
        compound.setString("curseFilenameParser", "ThaumicTinkerer-[].jar");
        compound.setString("modDisplayName", "Thaumic Tinkerer");
        FMLInterModComms.sendRuntimeMessage(LibMisc.MOD_ID, "VersionChecker", "addCurseCheck", compound);
    }
View Full Code Here


        return LibItemNames.MOB_ASPECT;
    }

    public static void markLastUsedTablet(ItemStack stack, TileSummon tablet) {
        if (stack.stackTagCompound == null) {
            stack.stackTagCompound = new NBTTagCompound();
        }
        stack.stackTagCompound.setInteger("LastX", tablet.xCoord);
        stack.stackTagCompound.setInteger("LastY", tablet.yCoord);
        stack.stackTagCompound.setInteger("LastZ", tablet.zCoord);
    }
View Full Code Here

    return par1ItemStack;
  }

  private List<String> getPlayerResearch(ItemStack par1ItemStack) {
    List<String> retVals = new ArrayList<String>();
    NBTTagCompound cmp = ItemNBTHelper.getNBT(par1ItemStack);
    if (!cmp.hasKey("research"))
      return retVals;
    NBTTagList list = cmp.getTagList("research", Constants.NBT.TAG_STRING);
    for (int i = 0; i < list.tagCount(); i++) {

      retVals.add(list.getStringTagAt(i));
    }
    return retVals;
View Full Code Here

    ItemNBTHelper.setString(stack, TAG_PLAYER, playerName);
  }

  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

    return Math.max(0, -newHp);
  }

  public static void setHP(EntityPlayer player, int hp) {
    NBTTagCompound cmp = getCompoundToSet(player);
    cmp.setInteger(TAG_HP, hp);
  }
View Full Code Here

    NBTTagCompound cmp = getCompoundToSet(player);
    cmp.setInteger(TAG_HP, hp);
  }

  public static int getHP(EntityPlayer player) {
    NBTTagCompound cmp = getCompoundToSet(player);
    return cmp.hasKey(TAG_HP) ? cmp.getInteger(TAG_HP) : 0;
  }
View Full Code Here

    NBTTagCompound cmp = getCompoundToSet(player);
    return cmp.hasKey(TAG_HP) ? cmp.getInteger(TAG_HP) : 0;
  }

  private static NBTTagCompound getCompoundToSet(EntityPlayer player) {
    NBTTagCompound cmp = player.getEntityData();
    if (!cmp.hasKey(COMPOUND))
      cmp.setTag(COMPOUND, new NBTTagCompound());

    return cmp.getCompoundTag(COMPOUND);
  }
View Full Code Here

  private static final String COMPOUND = LibMisc.MOD_ID;
  private static final String TAG_STATUS = "GemArmor";

  private static NBTTagCompound getCompoundToSet(EntityPlayer player) {
    NBTTagCompound cmp = player.getEntityData();
    if (!cmp.hasKey(COMPOUND))
      cmp.setTag(COMPOUND, new NBTTagCompound());

    return cmp.getCompoundTag(COMPOUND);
  }
View Full Code Here

    return cmp.getCompoundTag(COMPOUND);
  }

  public static boolean getArmorStatus(EntityPlayer player) {
    NBTTagCompound cmp = getCompoundToSet(player);
    return !cmp.hasKey(TAG_STATUS) || cmp.getBoolean(TAG_STATUS);
  }
View Full Code Here

    NBTTagCompound cmp = getCompoundToSet(player);
    return !cmp.hasKey(TAG_STATUS) || cmp.getBoolean(TAG_STATUS);
  }

  public static void setArmorStatus(EntityPlayer player, boolean status) {
    NBTTagCompound cmp = getCompoundToSet(player);
    cmp.setBoolean(TAG_STATUS, status);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.nbt.NBTTagCompound

Copyright © 2018 www.massapicom. 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.