Codota Logo
LocUtils.getTooltips
Code IndexAdd Codota to your IDE (free)

How to use
getTooltips
method
in
slimeknights.mantle.util.LocUtils

Best Java code snippets using slimeknights.mantle.util.LocUtils.getTooltips (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: SlimeKnights/TinkersConstruct

 public boolean checkMissingMaterialTooltip(ItemStack stack, List<String> tooltip, String statIdentifier) {
  Material material = getMaterial(stack);

  if(material == Material.UNKNOWN) {
   NBTTagCompound tag = TagUtil.getTagSafe(stack);
   String materialID = tag.getString(Tags.PART_MATERIAL);

   String error;
   if(!materialID.isEmpty()) {
    error = I18n.translateToLocalFormatted("tooltip.part.missing_material", materialID);
   }
   else {
    error = I18n.translateToLocal("tooltip.part.missing_info");
   }
   tooltip.addAll(LocUtils.getTooltips(error));
   return true;
  }
  else if(statIdentifier != null && material.getStats(statIdentifier) == null) {
   tooltip.addAll(LocUtils.getTooltips(Util.translateFormatted("tooltip.part.missing_stats", material.getLocalizedName(), statIdentifier)));
   return true;
  }

  return false;
 }
}
origin: SlimeKnights/TinkersConstruct

 tooltip.addAll(LocUtils.getTooltips(Util.translateFormatted(desc, items.tagCount())));
tooltip.addAll(LocUtils.getTooltips(Util.translateFormatted("tooltip.chest.has_items", items.tagCount())));
origin: SlimeKnights/TinkersConstruct

public class ItemTinkerBook extends Item {

 public ItemTinkerBook() {
  this.setCreativeTab(TinkerRegistry.tabGeneral);
  this.setMaxStackSize(1);
 }

 @Nonnull
 @Override
 public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) {
  ItemStack itemStack = playerIn.getHeldItem(handIn);
  if(worldIn.isRemote) {
   TinkerBook.INSTANCE.openGui(itemStack);
  }
  return new ActionResult<>(EnumActionResult.SUCCESS, itemStack);
 }

 @Override
 public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
  if(I18n.canTranslate(super.getUnlocalizedName(stack) + ".tooltip")) {
   tooltip.addAll(LocUtils.getTooltips(TextFormatting.GRAY.toString() + LocUtils.translateRecursive(super.getUnlocalizedName(stack) + ".tooltip")));
  }
 }
}

origin: SlimeKnights/TinkersConstruct

tooltip.addAll(LocUtils.getTooltips(Util.translate("item.tconstruct.sharpening_kit.tooltip")));
if(!checkMissingMaterialTooltip(stack, tooltip, MaterialTypes.HEAD)) {
 Material material = getMaterial(stack);
origin: SlimeKnights/TinkersConstruct

 i = 2;
tooltip.addAll(LocUtils.getTooltips(Util.translate(LOC_TOOLTIP + i)));
origin: progwml6/Natura

public static void addOptionalTooltip(ItemStack stack, List<String> tooltip)
{
  if (I18n.canTranslate(stack.getUnlocalizedName() + ".tooltip"))
  {
    tooltip.addAll(LocUtils.getTooltips(TextFormatting.GRAY.toString() + LocUtils.translateRecursive(stack.getUnlocalizedName() + ".tooltip")));
  }
  else if (I18n.canTranslate(stack.getUnlocalizedName() + ".tooltip"))
  {
    tooltip.addAll(LocUtils.getTooltips(TextFormatting.GRAY.toString() + LocUtils.translateRecursive(stack.getUnlocalizedName() + ".tooltip")));
  }
}
origin: SlimeKnights/Mantle

 public static void addOptionalTooltip(ItemStack stack, List<String> tooltip) {
  if(I18n.canTranslate(stack.getUnlocalizedName() + ".tooltip")) {
   tooltip.addAll(LocUtils.getTooltips(TextFormatting.GRAY.toString() +
                     LocUtils.translateRecursive(stack.getUnlocalizedName() + ".tooltip")));
  }
  else if(I18n.canTranslate(stack.getUnlocalizedName() + ".tooltip")) {
   tooltip.addAll(LocUtils.getTooltips(
     TextFormatting.GRAY.toString() + LocUtils.translateRecursive(stack.getUnlocalizedName() + ".tooltip")));
  }
 }
}
origin: SlimeKnights/Mantle

public void addInformation(@Nonnull ItemStack stack, @Nullable World worldIn, @Nonnull List<String> tooltip, ITooltipFlag flagIn) {
 if(I18n.canTranslate(this.getUnlocalizedName(stack) + ".tooltip")) {
  tooltip.addAll(LocUtils.getTooltips(TextFormatting.GRAY.toString() +
        LocUtils.translateRecursive(this.getUnlocalizedName(stack) + ".tooltip")));
  tooltip.addAll(LocUtils.getTooltips(
    TextFormatting.GRAY.toString() + LocUtils.translateRecursive(super.getUnlocalizedName(stack) + ".tooltip")));
slimeknights.mantle.utilLocUtilsgetTooltips

Popular methods of LocUtils

  • translateRecursive
  • makeLocString
    Removes all whitespaces from the string and makes it lowercase.
  • convertNewlines

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • notifyDataSetChanged (ArrayAdapter)
  • getContentResolver (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Path (java.nio.file)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now