Examples of NBTTagCompound


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

Examples of net.minecraft.nbt.NBTTagCompound

        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

Examples of net.minecraft.nbt.NBTTagCompound

    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

Examples of net.minecraft.nbt.NBTTagCompound

    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

Examples of net.minecraft.nbt.NBTTagCompound

    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

Examples of net.minecraft.nbt.NBTTagCompound

    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

Examples of net.minecraft.nbt.NBTTagCompound

    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

Examples of net.minecraft.nbt.NBTTagCompound

  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

Examples of net.minecraft.nbt.NBTTagCompound

    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

Examples of net.minecraft.nbt.NBTTagCompound

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