Java 类net.minecraft.client.util.ITooltipFlag 实例源码

项目:Defier    文件:PatternItem.java   
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
     if(!stack.hasTagCompound() || !stack.getTagCompound().hasKey("defieritem")){
         tooltip.add("Blank Pattern");
     }else{
         ItemStack stored = new ItemStack(stack.getTagCompound().getCompoundTag("defieritem"));
         DefierRecipe recipe = DefierRecipeRegistry.findRecipeForStack(stored);
         if(recipe == null){
             tooltip.add(TextFormatting.RED + "Unknown Recipe");
         }else{
             stored.clearCustomName();
             tooltip.add("Item: " + stored.getDisplayName());
             tooltip.add("Energy Cost: " + Defier.LARGE_NUMBER.format(recipe.getCost()) + "RF");
         }
     }
}
项目:TheOink    文件:OinkIronPorkChop.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    if(OinkConfig.pEffects) {
        tooltip.add("1st step towards the Ultimate Pork Chop!");
        if (GuiScreen.isShiftKeyDown()) {
            tooltip.add("Haste");
            tooltip.add("Speed");
            tooltip.add("Night Vision");
        }
        if (!GuiScreen.isShiftKeyDown())
            tooltip.add(TextFormatting.AQUA + I18n.format("press.for.info.name", "SHIFT"));
    }else if(!OinkConfig.pEffects) {
        tooltip.add("1st step towards the Ultimate Pork Chop!");
    }

}
项目:Bewitchment    文件:ItemFilledBowl.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    if (stack.getTagCompound() == null) {
        stack.setTagCompound(new NBTTagCompound()); //including this again because issues with crashing
    }
    NBTTagCompound nbt = stack.getTagCompound();
    if (nbt.getInteger("hunger") == 0) {
        float roundedSaturation = Math.round(nbt.getFloat("saturation") * 10) / 10;
        tooltip.add(I18n.format("item.stew.desc2", nbt.getInteger("hunger"), roundedSaturation));
        if (nbt.getInteger("hunger") == 0) {
            tooltip.add(I18n.format("item.stew.desc3"));
        } else {
            tooltip.add(I18n.format("item.stew.desc1"));
        }
    }
}
项目:ModularMachinery    文件:HybridFluidRenderer.java   
@Override
public List<String> getTooltip(Minecraft minecraft, T ingredient, ITooltipFlag tooltipFlag) {
    if(ModularMachinery.isMekanismLoaded) {
        List<String> tooltip = attemptGetTooltip(minecraft, ingredient, tooltipFlag);
        if(tooltip != null) {
            return tooltip;
        }
    }
    FluidStack f = ingredient.asFluidStack();
    if(f == null) {
        return Lists.newArrayList();
    }
    IIngredientRenderer<FluidStack> fluidStackRenderer = this.fluidStackRenderer;
    if(fluidStackRenderer == null) {
        fluidStackRenderer = ModIntegrationJEI.ingredientRegistry.getIngredientRenderer(FluidStack.class);
    }
    return fluidStackRenderer.getTooltip(minecraft, f, tooltipFlag);
}
项目:TheOink    文件:OinkGoldPorkChop.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    if(OinkConfig.pEffects) {
        tooltip.add("2nd step towards the Ultimate Pork Chop!");
        if (GuiScreen.isShiftKeyDown()) {
            tooltip.add("Resistance");
            tooltip.add("Fire Resistance");
            tooltip.add("Haste");
            tooltip.add("Speed");
            tooltip.add("Night Vision");
        }
        if (!GuiScreen.isShiftKeyDown())
            tooltip.add(TextFormatting.AQUA + I18n.format("press.for.info.name", "SHIFT"));
    }else if(!OinkConfig.pEffects) {
        tooltip.add("2nd step towards the Ultimate Pork Chop!");
    }

}
项目:chesttransporter    文件:ItemChestTransporter.java   
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, @Nullable World world, List<String> list, ITooltipFlag advanced)
{
    NBTTagCompound tagCompound = getTagCompound(stack);
    getChest(stack).ifPresent(chest ->
                              {
                                  NonNullList<Pair<Integer, ItemStack>> items = Util.readItemsFromNBT(tagCompound);
                                  int numItems = 0;
                                  for (Pair<Integer, ItemStack> pair : items)
                                  {
                                      numItems += pair.getRight().getCount();
                                  }

                                  if (numItems > 0)
                                  {
                                      list.add("Contains " + numItems + " items");
                                  }
                                  list.add(chest.getRegistryName().toString());
                                  chest.addInformation(stack, world, list, advanced);
                              });
}
项目:Mods    文件:ItemCrate.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip,
        ITooltipFlag advanced) {
    /*
     * if (!par1ItemStack.hasTagCompound()) {
     * par1ItemStack.getTagCompound()=new NBTTagCompound();
     * par1ItemStack.getTagCompound().setTag("Attributes", (NBTTagCompound)
     * ((ItemUsable)par1ItemStack.getItem()).buildInAttributes.copy()); }
     */
    if (stack.hasTagCompound()) {
        super.addInformation(stack, world, tooltip, advanced);

        if (stack.getTagCompound().getBoolean("Open")) {
            tooltip.add("The crate is opened now");
            tooltip.add("Right click to get the item");
        }

        tooltip.add("Possible content:");
        for (String name : getData(stack).crateContent.keySet()) {
            WeaponData data = MapList.nameToData.get(name);
            if (data != null)
                tooltip.add(data.getString(PropertyType.NAME));
        }
    }
}
项目:chesttransporter    文件:Spawner.java   
@Override
public void addInformation(ItemStack stack, @Nullable World world, List<String> list, ITooltipFlag advanced)
{
    if (stack.hasTagCompound())
    {
        NBTTagCompound chestTile = stack.getTagCompound().getCompoundTag("ChestTile");
        NBTTagCompound spawnData = chestTile.getCompoundTag("SpawnData");
        String mobId = spawnData.getString("id");

        if (mobId.length() > 0)
        {
            String translated = EntityList.getTranslationName(new ResourceLocation(mobId));
            list.add(translated == null ? mobId : translated);
        }
    }
}
项目:TheOink    文件:OinkDiamondPorkChop.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    if(OinkConfig.pEffects) {
        tooltip.add("3rd step towards the Ultimate Pork Chop!");
        if (GuiScreen.isShiftKeyDown()) {
            tooltip.add("Strength");
            tooltip.add("Regeneration");
            tooltip.add("Resistance");
            tooltip.add("Fire Resistance");
            tooltip.add("Haste");
            tooltip.add("Speed");
            tooltip.add("Night Vision");
        }
        if (!GuiScreen.isShiftKeyDown())
            tooltip.add(TextFormatting.AQUA + I18n.format("press.for.info.name", "SHIFT"));
    }else if(!OinkConfig.pEffects) {
        tooltip.add("3rd step towards the Ultimate Pork Chop!");
    }
}
项目:pnc-repressurized    文件:ItemNonDespawning.java   
/**
 * allows items to add custom lines of information to the mouseover description
 */
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World worldIn, List<String> curInfo, ITooltipFlag moreInfo) {
    super.addInformation(stack, worldIn, curInfo, moreInfo);
    curInfo.add(I18n.format("gui.tooltip.doesNotDespawn"));
}
项目:pnc-repressurized    文件:ItemMachineUpgrade.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> infoList, ITooltipFlag par4) {
    if (PneumaticCraftRepressurized.proxy.isSneakingInGui()) {
        infoList.add(I18n.format("gui.tooltip.item.upgrade.usedIn"));
        PneumaticRegistry.getInstance().getItemRegistry().addTooltip(this, infoList);
    } else {
        infoList.add(I18n.format("gui.tooltip.item.upgrade.shiftMessage"));
    }
    super.addInformation(stack, world, infoList, par4);
}
项目:pnc-repressurized    文件:ItemAssemblyProgram.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World worldIn, List<String> infoList, ITooltipFlag par4) {
    infoList.add("Required Machines:");
    infoList.add("-" + Blockss.ASSEMBLY_CONTROLLER.getLocalizedName());

    if (referencePrograms == null) {
        referencePrograms = new AssemblyProgram[PROGRAMS_AMOUNT];
        for (int i = 0; i < PROGRAMS_AMOUNT; i++) {
            referencePrograms[i] = getProgramFromItem(i);
        }
    }
    AssemblyProgram program = referencePrograms[Math.min(stack.getItemDamage(), PROGRAMS_AMOUNT - 1)];
    AssemblyProgram.EnumMachine[] requiredMachines = program.getRequiredMachines();
    for (AssemblyProgram.EnumMachine machine : requiredMachines) {
        switch (machine) {
            case PLATFORM:
                infoList.add("-" + Blockss.ASSEMBLY_PLATFORM.getLocalizedName());
                break;
            case DRILL:
                infoList.add("-" + Blockss.ASSEMBLY_DRILL.getLocalizedName());
                break;
            case LASER:
                infoList.add("-" + Blockss.ASSEMBLY_LASER.getLocalizedName());
                break;
            case IO_UNIT_EXPORT:
                infoList.add("-" + Blockss.ASSEMBLY_IO_UNIT.getLocalizedName() + " (export)");//TODO localize
                break;
            case IO_UNIT_IMPORT:
                infoList.add("-" + Blockss.ASSEMBLY_IO_UNIT.getLocalizedName() + " (import)");
                break;
        }
    }
}
项目:pnc-repressurized    文件:ItemEmptyPCB.java   
@Override
public void addInformation(ItemStack stack, World player, List<String> infoList, ITooltipFlag par4) {
    super.addInformation(stack, player, infoList, par4);
    if (stack.getItemDamage() < 100) {
        infoList.add(I18n.format("gui.tooltip.item.uvLightBox.successChance", 100 - stack.getItemDamage()));
    } else {
        infoList.add(I18n.format("gui.tooltip.item.uvLightBox.putInLightBox"));
    }
    if (stack.hasTagCompound()) {
        infoList.add(I18n.format("gui.tooltip.item.uvLightBox.etchProgress",stack.getTagCompound().getInteger("etchProgress")));
    } else if (stack.getItemDamage() < 100) {
        infoList.add(I18n.format("gui.tooltip.item.uvLightBox.putInAcid"));
    }
}
项目:pnc-repressurized    文件:ItemTubeModule.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack par1ItemStack, World par2EntityPlayer, List<String> par3List, ITooltipFlag par4) {
    super.addInformation(par1ItemStack, par2EntityPlayer, par3List, par4);
    TubeModule module = ModuleRegistrator.getModule(moduleName);
    module.addItemDescription(par3List);
    par3List.add(TextFormatting.DARK_GRAY + "In line: " + (module.isInline() ? "Yes" : "No"));
}
项目:ModularMachinery    文件:ItemBlueprint.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    DynamicMachine machine = getAssociatedMachine(stack);
    if(machine == null) {
        tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.machinery.empty"));
    } else {
        tooltip.add(TextFormatting.GRAY + machine.getLocalizedName());
    }
}
项目:pnc-repressurized    文件:BlockPneumaticCraft.java   
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, World world, List<String> curInfo, ITooltipFlag flag) {
    if (stack.hasTagCompound() && stack.getTagCompound().hasKey(PneumaticCraftUtils.SAVED_TANKS, Constants.NBT.TAG_COMPOUND)) {
        NBTTagCompound tag = stack.getTagCompound().getCompoundTag(PneumaticCraftUtils.SAVED_TANKS);
        for (String s : tag.getKeySet()) {
            NBTTagCompound tankTag = tag.getCompoundTag(s);
            FluidTank tank = new FluidTank(tankTag.getInteger("Amount"));
            tank.readFromNBT(tankTag);
            FluidStack fluidStack = tank.getFluid();
            if (fluidStack != null && fluidStack.amount > 0) {
                curInfo.add(fluidStack.getFluid().getLocalizedName(fluidStack) + ": " + fluidStack.amount + "mB");
            }
        }
    }
    if (PneumaticCraftRepressurized.proxy.isSneakingInGui()) {
        TileEntity te = createTileEntity(world, getDefaultState());
        if (te instanceof TileEntityPneumaticBase) {
            float pressure = ((TileEntityPneumaticBase) te).dangerPressure;
            curInfo.add(TextFormatting.YELLOW + I18n.format("gui.tooltip.maxPressure", pressure));
        }
    }

    String info = "gui.tab.info." + stack.getUnlocalizedName();
    String translatedInfo = I18n.format(info);
    if (!translatedInfo.equals(info)) {
        if (PneumaticCraftRepressurized.proxy.isSneakingInGui()) {
            translatedInfo = TextFormatting.AQUA + translatedInfo.substring(2);
            if (!Loader.isModLoaded(ModIds.IGWMOD))
                translatedInfo += " \\n \\n" + I18n.format("gui.tab.info.assistIGW");
            curInfo.addAll(PneumaticCraftUtils.convertStringIntoList(translatedInfo, 40));
        } else {
            curInfo.add(TextFormatting.AQUA + I18n.format("gui.tooltip.sneakForInfo"));
        }
    }
}
项目:refinedstorageaddons    文件:ItemNetworkBag.java   
@Override
public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flag) {
    super.addInformation(stack, world, tooltip, flag);

    tooltip.add(TextFormatting.YELLOW + "WIP" + TextFormatting.RESET);
    tooltip.add("Filtering options coming soon");
}
项目:Industrial-Foregoing    文件:EnergyFieldAddon.java   
@Override
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    super.addInformation(stack, worldIn, tooltip, flagIn);
    if (stack.hasCapability(CapabilityEnergy.ENERGY, null)) {
        IEnergyStorage storage = stack.getCapability(CapabilityEnergy.ENERGY, null);
        tooltip.add(new TextComponentTranslation("text.industrialforegoing.tooltip.energy_field_right_charge").getUnformattedComponentText() + new DecimalFormat().format(storage.getEnergyStored()) + " / " + new DecimalFormat().format(storage.getMaxEnergyStored()));
        if (getLinkedBlockPos(stack) != null) {
            BlockPos pos = getLinkedBlockPos(stack);
            tooltip.add(new TextComponentTranslation("text.industrialforegoing.tooltip.energy_field_right_linked").getUnformattedComponentText() + " x=" + pos.getX() + " y=" + pos.getY() + " z=" + pos.getZ());
        } else {
            tooltip.add(new TextComponentTranslation("text.industrialforegoing.tooltip.energy_field_right_click").getUnformattedComponentText());
        }
    }
}
项目:TheOink    文件:OinkTools.java   
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {

    int damage = stack.getMaxDamage() - stack.getItemDamage() ;

    tooltip.add("Uses Left: \u00A7c" + damage);
    if (GuiScreen.isShiftKeyDown()) {
        tooltip.add(tooltipInfo);
    }
    if (!GuiScreen.isShiftKeyDown())
        tooltip.add(TextFormatting.AQUA + I18n.format("press.for.info.name", "SHIFT"));
}
项目:Industrial-Foregoing    文件:PageItemList.java   
@Override
public void drawScreenPost(CategoryEntry entry, GUIBookBase base, int mouseX, int mouseY, float partialTicks, FontRenderer renderer) {
    for (int pos = 0; pos < itemStacks.size(); ++pos) {
        int itemsRow = (base.getGuiXSize() - 40) / 18;
        if (mouseX >= base.getGuiLeft() + 15 + (pos % itemsRow) * 20 && mouseX <= base.getGuiLeft() + 15 + (pos % itemsRow) * 20 + 16 && mouseY >= base.getGuiTop() + 35 + (pos / itemsRow) * 20 && mouseY <= base.getGuiTop() + 35 + (pos / itemsRow) * 20 + 16) {
            base.drawHoveringText(itemStacks.get(pos).getTooltip(null, ITooltipFlag.TooltipFlags.NORMAL), mouseX, mouseY);
            break;
        }
    }
}
项目:Industrial-Foregoing    文件:PageRecipe.java   
@SideOnly(Side.CLIENT)
@Override
public void drawScreenPost(CategoryEntry entry, GUIBookBase base, int mouseX, int mouseY, float partialTicks, FontRenderer renderer) {
    for (int pos = 0; pos < 9; ++pos) {
        if (recipe.getIngredients().get(pos).getMatchingStacks().length == 0) continue;
        if (mouseX >= base.getGuiLeft() + 25 + (pos % 3) * 18 && mouseX <= base.getGuiLeft() + 25 + (pos % 3) * 18 + 16 && mouseY >= base.getGuiTop() + 69 + (pos / 3) * 18 && mouseY <= base.getGuiTop() + 69 + (pos / 3) * 18 + 16) {
            ItemStack stack = recipe.getIngredients().get(pos).getMatchingStacks()[0];
            base.drawHoveringText(stack.getTooltip(null, ITooltipFlag.TooltipFlags.NORMAL), mouseX, mouseY);
        }
    }
    if (mouseX >= base.getGuiLeft() + 25 + 94 && mouseX <= base.getGuiLeft() + 25 + 94 + 18 && mouseY >= base.getGuiTop() + 69 + 18 && mouseY <= base.getGuiTop() + 69 + 18 + 18) {
        base.drawHoveringText(recipe.getRecipeOutput().getTooltip(null, ITooltipFlag.TooltipFlags.NORMAL), mouseX, mouseY);
    }
}
项目:Mods    文件:ItemStatue.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip,
        ITooltipFlag advanced) {
    if(stack.hasTagCompound()) {
        if(stack.getTagCompound().getCompoundTag("Statue").getBoolean("Player")) {
            tooltip.add(stack.getTagCompound().getCompoundTag("Statue").getCompoundTag("Profile").getString("Name"));
        }
    }
}
项目:Solar    文件:ItemVacuumConveyor.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    TooltipBuilder.inline()
            .condition(() -> NBTHelper.hasTag(stack, "lookup"))
            .ifPresent(sub -> sub
                    .addI18("item_filter", TooltipBuilder.DARK_GRAY_ITALIC)
                    .add(": ", TooltipBuilder.DARK_GRAY_ITALIC)
                    .add(new ItemStack(NBTHelper.getOrCreate(stack, "lookup", NBTType.COMPOUND)).getDisplayName(), TooltipBuilder.GRAY_ITALIC)
                    .end()
                    .skip()
            ).build(tooltip);
}
项目:UniversalRemote    文件:ItemUniversalRemote.java   
@Override
public void addInformation(ItemStack stack, World playerIn, List<String> tooltip, ITooltipFlag advanced) {

    // this is a client side only method so we are safe doing client things!

    ItemUniversalRemoteNBTParser myNBT = new ItemUniversalRemoteNBTParser(stack);

    if(myNBT.validateNBT())
    {
        // get the stored data...
        String dimName = myNBT.getDimensionName();
        String blockName = myNBT.getBlockName();
        String modName = myNBT.getModName();

        BlockPos blockPosition = myNBT.getBlockPosition();

        tooltip.add(TextFormatter.style(TextFormatting.AQUA, blockName).getFormattedText());
        tooltip.add(TextFormatter.style(TextFormatting.DARK_AQUA, modName).getFormattedText());
        tooltip.add(TextFormatter.style(TextFormatting.GRAY, dimName + " (" + blockPosition.getX() + ", " + blockPosition.getY() + ", " + blockPosition.getZ() + ")").getFormattedText());
    } else {
        tooltip.add(TextFormatter.translateAndStyle(TextFormatting.DARK_RED, true, "universalremote.strings.unbound").getFormattedText());
    }


    super.addInformation(stack, playerIn, tooltip, advanced);

    if (!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) && !Keyboard.isKeyDown(Keyboard.KEY_RSHIFT))
    {
        tooltip.add(TextFormatter.translateAndStyle(TextFormatting.DARK_GRAY, true, "universalremote.strings.showmore").getFormattedText());
    }
    else
    {
        tooltip.add(TextFormatter.translateAndStyle("universalremote.strings.instructionsOne", TextFormatting.GRAY).getFormattedText());
        tooltip.add(TextFormatter.translateAndStyle("universalremote.strings.instructionsTwo", TextFormatting.GRAY).getFormattedText());
    }
}
项目:Bewitchment    文件:ItemTarots.java   
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    super.addInformation(stack, worldIn, tooltip, flagIn);
    if (stack.hasTagCompound() && stack.getTagCompound().hasKey("read_name")) {
        String readFutureOf = stack.getTagCompound().getString("read_name");
        tooltip.add(I18n.format(this.getUnlocalizedName() + ".read_to", readFutureOf));
    }
}
项目:Mods    文件:ItemWearable.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip,
        ITooltipFlag advanced) {
    super.addInformation(stack, world, tooltip, advanced);
    if (stack.hasTagCompound()) {

        if (stack.getTagCompound().hasKey("UEffect")) {
            tooltip.add("");
            String str;

            switch (stack.getTagCompound().getByte("UEffect")){
                case 0:str="Burning Flames"; break;
                case 1:str="Hearts"; break;
                case 2:str="Steaming"; break;
                case 3:str="Bubbling"; break;
                case 4:str="Stormy Storm"; break;
                case 5:str="Arcana"; break;
                case 6:str="Massed Flies"; break;
                case 7:str="Slimy"; break;
                case 8:str="Nebula"; break;
                case 9:str="Dragon's breath"; break;
                default:str="Musically";
            }
            tooltip.add("Effect - "+str);
        }
    }
}
项目:Mods    文件:TNTCannon.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip,
        ITooltipFlag advanced) {
    if (this.isSticky(stack))
        tooltip.add("Sticky");
    if (this.isBouncy(stack))
        tooltip.add("Bouncing");
    if (this.isHarmless(stack))
        tooltip.add("Harmless");
    if (this.isCrushing(stack))
        tooltip.add("Crushing");
    if (this.firesEntireStack(stack))
        tooltip.add("Super Spread");
}
项目:ModularMachinery    文件:BlockEnergyInputHatch.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) {
    EnergyHatchSize size = EnergyHatchSize.values()[MathHelper.clamp(stack.getMetadata(), 0, EnergyHatchSize.values().length - 1)];
    tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.storage", size.maxEnergy));
    tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.in.accept", size.transferLimit));
    if(Loader.isModLoaded("ic2")) {
        tooltip.add("");
        tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.ic2.in.voltage",
                TextFormatting.BLUE + I18n.format("tooltip.energyhatch.ic2.any")));
        tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.ic2.in.transfer",
                TextFormatting.BLUE + I18n.format("tooltip.energyhatch.ic2.any"), TextFormatting.BLUE + I18n.format("tooltip.energyhatch.ic2.powerrate")));
    }
}
项目:Bewitchment    文件:ItemTalisman.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) {
    if (!stack.isItemEnchanted()) {
        tooltip.add(TextFormatting.AQUA + I18n.format("witch.tooltip.talismans_description.name"));
    }
}
项目:ModularMachinery    文件:BlockEnergyOutputHatch.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) {
    EnergyHatchSize size = EnergyHatchSize.values()[MathHelper.clamp(stack.getMetadata(), 0, EnergyHatchSize.values().length - 1)];
    tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.storage", size.maxEnergy));
    tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.out.transfer", size.transferLimit));
    if(Loader.isModLoaded("ic2")) {
        tooltip.add("");
        tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.ic2.out.voltage",
                TextFormatting.BLUE + I18n.format(size.getUnlocalizedEnergyDescriptor())));
        tooltip.add(TextFormatting.GRAY + I18n.format("tooltip.energyhatch.ic2.out.transfer",
                TextFormatting.BLUE + String.valueOf(size.getEnergyTransmission()),
                TextFormatting.BLUE + I18n.format("tooltip.energyhatch.ic2.powerrate")));
    }
}
项目:ExPetrum    文件:ItemFood.java   
@Override
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag advanced)
{
    super.addInformation(stack, world, tooltip, advanced);
    DecimalFormat df = new DecimalFormat("#.#");
    DecimalFormat df1 = new DecimalFormat("#,###");
    tooltip.add(I18n.format("exp.txt.item.desc.rot", df.format((this.getTotalRot(stack) / this.getEntry(stack).getBaseHealth()) * 100)));
    tooltip.add(I18n.format("exp.txt.item.desc.weight", df1.format(this.getTotalWeight(stack))));
}
项目:harshencastle    文件:HarshenSoulOre.java   
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    tooltip.add("\u00A74" + new TextComponentTranslation("ore1").getFormattedText());
    tooltip.add("\u00A74" + new TextComponentTranslation("ore2").getFormattedText());
    tooltip.add("\u00A74" + new TextComponentTranslation("ore3").getFormattedText());
    super.addInformation(stack, worldIn, tooltip, flagIn);
}
项目:Thermionics    文件:ItemBlockBattery.java   
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    String storedEnergy = I18n.translateToLocal("thermionics.data.energystorage");

    if (stack.hasTagCompound() && stack.getTagCompound().hasKey("energy")) {
        tooltip.add(storedEnergy+": "+stack.getTagCompound().getInteger("energy"));
    } else {
        tooltip.add(storedEnergy+": 0");
    }
}
项目:harshencastle    文件:EnderBow.java   
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    tooltip.add("\u00A73" + new TextComponentTranslation("enderbow1").getFormattedText());
    tooltip.add("\u00A73" + new TextComponentTranslation("enderbow2").getFormattedText());
    tooltip.add("\u00A73" + new TextComponentTranslation("enderbow3").getFormattedText());
    tooltip.add("");
    tooltip.add("\u00A73" + new TextComponentTranslation("enderbow4").getFormattedText());
}
项目:harshencastle    文件:PontusWorldGateSpawner.java   
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    String prefix = stack.getMetadata() == 0? "gatespawner" : "gatespawnerenhanced";
    tooltip.add("\u00A73" + new TextComponentTranslation(prefix + "1").getFormattedText());
    tooltip.add("\u00a73" + new TextComponentTranslation(prefix + "2").getFormattedText());
    super.addInformation(stack, worldIn, tooltip, flagIn);

}
项目:MiningWells    文件:ItemUpgrade.java   
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> info, ITooltipFlag flag) {
    if (stack == null) {
        return;
    }
    if (info == null) {
        info = new ArrayList<>();
    }
    info.add(I18n.format("upgrade." + upgradeType.getPublicName()));
    info.add(I18n.format("upgrade.level_info") + ": " + upgradeLevel);
}
项目:SimplyTea    文件:SimplyTea.java   
@Override
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced){
    if (stack.getMetadata() == 0){
        tooltip.add(I18n.format("simplytea.tooltip.empty"));
    }
    if (stack.getMetadata() == 1){
        tooltip.add(I18n.format("simplytea.tooltip.water"));
    }
}
项目:Thermionics    文件:ItemChunkUnloader.java   
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
    tooltip.add(I18n.translateToLocal("item.thermionics.chunkunloader.tip"));
    int loadedState = stack.getItemDamage();
    switch(loadedState) {
    default: //Default to unattuned

    case 0: tooltip.add(I18n.translateToLocalFormatted("thermionics.data.chunkunloader.unattuned")); break;
    case 1: tooltip.add(I18n.translateToLocalFormatted("thermionics.data.chunkunloader.unloaded")); break;
    case 2: tooltip.add(I18n.translateToLocalFormatted("thermionics.data.chunkunloader.loaded")); break;
    }
}
项目:needtobreath    文件:ProtectiveHelmet.java   
@Override
public void addInformation(ItemStack itemStack, World player, List<String> list, ITooltipFlag advancedToolTip) {
    super.addInformation(itemStack, player, list, advancedToolTip);
    list.add("If you were this helmet you will get,");
    list.add("some protection against the poisonous");
    list.add("atmosphere");
}
项目:Mods    文件:ItemMedigun.java   
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> tooltip,
        ITooltipFlag advanced) {
    super.addInformation(stack, world, tooltip, advanced);

    tooltip.add("Charge: " + Float.toString(stack.getTagCompound().getFloat("ubercharge")));
}