net.minecraft.client.util.ITooltipFlag Java Examples
The following examples show how to use
net.minecraft.client.util.ITooltipFlag.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Collector.java From EmergingTechnology with MIT License | 6 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int count = EmergingTechnologyConfig.POLYMERS_MODULE.COLLECTOR.minimumWaterBlocks; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.COLLECTOR_DESC)); if (!EmergingTechnologyConfig.POLYMERS_MODULE.COLLECTOR.biomeRequirementDisabled) { tooltip.add(Lang.get(Lang.BIOME_REQUIREMENT)); } tooltip.add(Lang.getWaterBlocksRequired(count)); tooltip.add(Lang.get(Lang.WATER_SURFACE_REQUIREMENT)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #2
Source File: TidalGenerator.java From EmergingTechnology with MIT License | 6 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.ELECTRICS_MODULE.TIDALGENERATOR.tidalEnergyGenerated; int min = EmergingTechnologyConfig.ELECTRICS_MODULE.TIDALGENERATOR.minOptimalDepth; int max = EmergingTechnologyConfig.ELECTRICS_MODULE.TIDALGENERATOR.maxOptimalDepth; int surround = EmergingTechnologyConfig.ELECTRICS_MODULE.TIDALGENERATOR.minimumWaterBlocks; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.TIDAL_DESC)); tooltip.add(Lang.getGenerated(energy, ResourceTypeEnum.ENERGY) + " " + Lang.getDepthBoost(min, max)); tooltip.add(Lang.getWaterBlocksRequired(surround)); if (!EmergingTechnologyConfig.ELECTRICS_MODULE.TIDALGENERATOR.biomeRequirementDisabled) { tooltip.add(Lang.get(Lang.BIOME_REQUIREMENT)); } } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #3
Source File: Wind.java From EmergingTechnology with MIT License | 6 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.ELECTRICS_MODULE.WIND.energyGenerated; int min = EmergingTechnologyConfig.ELECTRICS_MODULE.WIND.minOptimalHeight; int max = EmergingTechnologyConfig.ELECTRICS_MODULE.WIND.maxOptimalHeight; int surround = EmergingTechnologyConfig.ELECTRICS_MODULE.WIND.minimumAirBlocks; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.WIND_DESC)); tooltip.add(Lang.getGenerated(energy, ResourceTypeEnum.ENERGY) + " " + Lang.getDepthBoost(min, max)); tooltip.add(Lang.getAirBlocksRequired(surround)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #4
Source File: BlockTank.java From YouTubeModdingTutorial with MIT License | 6 votes |
@Override public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flags) { NBTTagCompound tagCompound = stack.getTagCompound(); if (tagCompound != null) { NBTTagCompound nbt = tagCompound.getCompoundTag("tank"); FluidStack fluidStack = null; if (!nbt.hasKey("Empty")) { fluidStack = FluidStack.loadFluidStackFromNBT(nbt); } if (fluidStack == null) { addInformationLocalized(tooltip, "message.mymod.tank", "empty"); } else { String name = fluidStack.getLocalizedName(); addInformationLocalized(tooltip, "message.mymod.tank", name + " (" + fluidStack.amount + ")"); } } }
Example #5
Source File: MultiblockInfoRecipeWrapper.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
@Override public List<String> getTooltipStrings(int mouseX, int mouseY) { if (tooltipBlockStack != null && !tooltipBlockStack.isEmpty() && !Mouse.isButtonDown(0)) { Minecraft minecraft = Minecraft.getMinecraft(); ITooltipFlag flag = minecraft.gameSettings.advancedItemTooltips ? TooltipFlags.ADVANCED : TooltipFlags.NORMAL; List<String> tooltip = tooltipBlockStack.getTooltip(minecraft.player, flag); EnumRarity rarity = tooltipBlockStack.getRarity(); for (int k = 0; k < tooltip.size(); ++k) { if (k == 0) { tooltip.set(k, rarity.rarityColor + tooltip.get(k)); } else { tooltip.set(k, TextFormatting.GRAY + tooltip.get(k)); } } return tooltip; } return Collections.emptyList(); }
Example #6
Source File: ToolMetaItem.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemStack, @Nullable World worldIn, List<String> lines, ITooltipFlag tooltipFlag) { T item = getItem(itemStack); if (item == null) { return; } IToolStats toolStats = item.getToolStats(); SolidMaterial primaryMaterial = getToolMaterial(itemStack); int maxInternalDamage = getMaxItemDamage(itemStack); if (toolStats.isUsingDurability(itemStack) && maxInternalDamage > 0) { lines.add(I18n.format("metaitem.tool.tooltip.durability", maxInternalDamage - getItemDamage(itemStack), maxInternalDamage)); } lines.add(I18n.format("metaitem.tool.tooltip.primary_material", primaryMaterial.getLocalizedName(), getHarvestLevel(itemStack))); lines.add(I18n.format("metaitem.tool.tooltip.attack_damage", toolStats.getBaseDamage(itemStack) + primaryMaterial.harvestLevel)); lines.add(I18n.format("metaitem.tool.tooltip.mining_speed", getToolDigSpeed(itemStack))); super.addInformation(itemStack, worldIn, lines, tooltipFlag); toolStats.addInformation(itemStack, lines, tooltipFlag.isAdvanced()); }
Example #7
Source File: BlockWireCoil.java From GregTech with GNU Lesser General Public License v3.0 | 6 votes |
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemStack, @Nullable World worldIn, List<String> lines, ITooltipFlag tooltipFlag) { super.addInformation(itemStack, worldIn, lines, tooltipFlag); VariantItemBlock itemBlock = (VariantItemBlock<CoilType, BlockWireCoil>) itemStack.getItem(); IBlockState stackState = itemBlock.getBlockState(itemStack); CoilType coilType = getState(stackState); lines.add(I18n.format("tile.wire_coil.tooltip_ebf")); lines.add(I18n.format("tile.wire_coil.tooltip_heat", coilType.coilTemperature)); lines.add(""); lines.add(I18n.format("tile.wire_coil.tooltip_smelter")); lines.add(I18n.format("tile.wire_coil.tooltip_level", coilType.level)); lines.add(I18n.format("tile.wire_coil.tooltip_discount", coilType.energyDiscount)); }
Example #8
Source File: GTItemDataOrbStorage.java From GT-Classic with GNU Lesser General Public License v3.0 | 6 votes |
@Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { NBTTagCompound nbt = StackUtil.getNbtData(stack); NBTTagList list = nbt.getTagList("Items", 10); if (list.hasNoTags()) { tooltip.add(I18n.format("No Data Stored... How did you get this?")); return; } for (int i = 0; i < list.tagCount(); ++i) { if (i < 5) { NBTTagCompound data = list.getCompoundTagAt(i); ItemStack contained = new ItemStack(data); tooltip.add(I18n.format(contained.getDisplayName() + " x" + contained.getCount())); } } int remaining = list.tagCount() - 5; if (remaining > 0) { tooltip.add(TextFormatting.ITALIC + I18n.format("and " + remaining + " more...")); } }
Example #9
Source File: AlgaeBioreactor.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.SYNTHETICS_MODULE.ALGAEBIOREACTOR.bioreactorEnergyUsage; int water = EmergingTechnologyConfig.SYNTHETICS_MODULE.ALGAEBIOREACTOR.bioreactorWaterUsage; int gas = EmergingTechnologyConfig.SYNTHETICS_MODULE.ALGAEBIOREACTOR.bioreactorGasUsage; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.ALGAEBIOREACTOR_DESC)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); tooltip.add(Lang.getRequired(water, ResourceTypeEnum.WATER)); tooltip.add(Lang.getRequired(gas, ResourceTypeEnum.GAS)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #10
Source File: Hydroponic.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int fluidUsage = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWBED.growBedWaterUsePerCycle; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.HYDROPONIC_DESC)); tooltip.add(Lang.getRequired(fluidUsage, ResourceTypeEnum.FLUID)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #11
Source File: GTItemFluidTube.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { tooltip.add(GTHelperFluid.getFluidName(stack)); if (GTHelperFluid.isFluidGas(stack)) { tooltip.add(TextFormatting.GREEN + I18n.format("Gaseous")); } if (GTHelperFluid.isFluidPlaceable(stack)) { tooltip.add(TextFormatting.YELLOW + I18n.format("Can be placed in world")); } if (GTHelperFluid.isFluidBurnable(stack)) { tooltip.add(TextFormatting.RED + I18n.format("Can be burned as liquid fuel")); } }
Example #12
Source File: Shredder.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.POLYMERS_MODULE.SHREDDER.shredderEnergyBaseUsage; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.SHREDDER_DESC)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #13
Source File: GTBlockUUMAssembler.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { if (stack.hasTagCompound()) { NBTTagCompound nbt; nbt = StackUtil.getNbtData(stack); if (nbt.hasKey(count)) { tooltip.add(TextFormatting.AQUA + I18n.format(nbt.getInteger(count) + " of UU-Matter stored")); } if (nbt.hasKey("energy")) { tooltip.add(TextFormatting.AQUA + I18n.format(nbt.getInteger("energy") + " EU stored")); } } super.addInformation(stack, worldIn, tooltip, flagIn); }
Example #14
Source File: ItemBlockCable.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) { WireProperties wireProperties = blockPipe.createItemProperties(stack); String voltageName = GTValues.VN[GTUtility.getTierByVoltage(wireProperties.voltage)]; tooltip.add(I18n.format("gregtech.cable.voltage", wireProperties.voltage, voltageName)); tooltip.add(I18n.format("gregtech.cable.amperage", wireProperties.amperage)); tooltip.add(I18n.format("gregtech.cable.loss_per_block", wireProperties.lossPerBlock)); }
Example #15
Source File: GTItemBlock.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@SideOnly(Side.CLIENT) @Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, tooltip, flagIn); PlayerHandler handler = PlayerHandler.getClientPlayerHandler(); if (handler.hasEUReader()) { Block thisBlock = this.getBlock(); if (thisBlock instanceof IGTReaderInfoBlock) { ((IGTReaderInfoBlock) thisBlock).addReaderInformation(stack, worldIn, tooltip, flagIn); } } }
Example #16
Source File: VariantBlock.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) { //tier less tooltip like: tile.turbine_casing.tooltip String unlocalizedVariantTooltip = getUnlocalizedName() + ".tooltip"; if (I18n.hasKey(unlocalizedVariantTooltip)) tooltip.addAll(Arrays.asList(I18n.format(unlocalizedVariantTooltip).split("/n"))); //item specific tooltip: tile.turbine_casing.bronze_gearbox.tooltip String unlocalizedTooltip = stack.getUnlocalizedName() + ".tooltip"; if (I18n.hasKey(unlocalizedTooltip)) tooltip.addAll(Arrays.asList(I18n.format(unlocalizedTooltip).split("/n"))); }
Example #17
Source File: MetaItem.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack itemStack, @Nullable World worldIn, List<String> lines, ITooltipFlag tooltipFlag) { T item = getItem(itemStack); if (item == null) return; String unlocalizedTooltip = "metaitem." + item.unlocalizedName + ".tooltip"; if (I18n.hasKey(unlocalizedTooltip)) { lines.addAll(Arrays.asList(I18n.format(unlocalizedTooltip).split("/n"))); } IElectricItem electricItem = itemStack.getCapability(GregtechCapabilities.CAPABILITY_ELECTRIC_ITEM, null); if (electricItem != null) { lines.add(I18n.format("metaitem.generic.electric_item.tooltip", electricItem.getCharge(), electricItem.getMaxCharge(), GTValues.VN[electricItem.getTier()])); } IFluidHandlerItem fluidHandler = ItemHandlerHelper.copyStackWithSize(itemStack, 1) .getCapability(CapabilityFluidHandler.FLUID_HANDLER_ITEM_CAPABILITY, null); if (fluidHandler != null) { IFluidTankProperties fluidTankProperties = fluidHandler.getTankProperties()[0]; FluidStack fluid = fluidTankProperties.getContents(); if (fluid != null) { lines.add(I18n.format("metaitem.generic.fluid_container.tooltip", fluid.amount, fluidTankProperties.getCapacity(), fluid.getLocalizedName())); } else lines.add(I18n.format("metaitem.generic.fluid_container.tooltip_empty")); } for (IItemBehaviour behaviour : getBehaviours(itemStack)) { behaviour.addInformation(itemStack, lines); } }
Example #18
Source File: GTBlockSuperconductorCable.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addReaderInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { if (this == GTBlocks.tileSuperconductorCableMAX) { tooltip.add((Ic2InfoLang.euReaderCableLimit.getLocalizedFormatted(new Object[] { 134217728 }))); } if (this == GTBlocks.tileSuperconductorCableIV) { tooltip.add((Ic2InfoLang.euReaderCableLimit.getLocalizedFormatted(new Object[] { 32769 }))); } if (this == GTBlocks.tileSuperconductorCableHV) { tooltip.add((Ic2InfoLang.euReaderCableLimit.getLocalizedFormatted(new Object[] { 512 }))); } tooltip.add((Ic2InfoLang.euReaderCableLoss.getLocalizedFormatted(new Object[] { 0.001 }))); }
Example #19
Source File: GTBlockBattery.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addReaderInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { if (this == GTBlocks.tileBatteryLV) { tooltip.add((Ic2InfoLang.electricMaxIn.getLocalizedFormatted(new Object[] { 32 }))); tooltip.add((Ic2InfoLang.electricMaxStorage.getLocalizedFormatted(new Object[] { 80000 }))); } }
Example #20
Source File: Cooker.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int loss = EmergingTechnologyConfig.SYNTHETICS_MODULE.COOKER.cookerBaseHeatLoss; int gain = EmergingTechnologyConfig.SYNTHETICS_MODULE.COOKER.cookerBaseHeatGain; int heat = EmergingTechnologyConfig.SYNTHETICS_MODULE.COOKER.cookerRequiredCookingHeat; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.COOKER_DESC)); tooltip.add(Lang.getHeatGainLoss(gain, loss)); tooltip.add(Lang.getRequired(heat, ResourceTypeEnum.HEAT)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #21
Source File: Solar.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.ELECTRICS_MODULE.SOLAR.solarEnergyGenerated; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.SOLAR_DESC)); tooltip.add(Lang.getGenerated(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #22
Source File: GTItemSprayCan.java From GT-Classic with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { NBTTagCompound nbt = StackUtil.getNbtData(stack); if (nbt.hasKey(COLOR)) { String name = EnumDyeColor.byDyeDamage(nbt.getInteger(COLOR)).getDyeColorName(); tooltip.add(I18n.format("Current: " + name.toUpperCase())); } else { tooltip.add(I18n.format("Current: NONE")); } tooltip.add(I18n.format("Sneak + click to change colors")); }
Example #23
Source File: SolarGlass.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.ELECTRICS_MODULE.SOLARGLASS.solarEnergyGenerated; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.SOLARGLASS_DESC)); tooltip.add(Lang.getGenerated(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #24
Source File: Injector.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.INJECTOR.injectorEnergyBaseUsage; int water = EmergingTechnologyConfig.HYDROPONICS_MODULE.INJECTOR.injectorWaterBaseUsage; int fluid = EmergingTechnologyConfig.HYDROPONICS_MODULE.INJECTOR.injectorFluidGenerated; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.INJECTOR_DESC)); tooltip.add(Lang.getGenerated(fluid, ResourceTypeEnum.FLUID)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); tooltip.add(Lang.getRequired(water, ResourceTypeEnum.WATER)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #25
Source File: Light.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int range = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.lightBlockRange; int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.GROWLIGHT.lightEnergyBaseUsage; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.LIGHT_DESC)); tooltip.add(Lang.getLightRange(range)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #26
Source File: BiomassGenerator.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.ELECTRICS_MODULE.BIOMASSGENERATOR.biomassEnergyGenerated; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.BIOMASS_DESC)); tooltip.add(Lang.getGenerated(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #27
Source File: Diffuser.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.DIFFUSER.diffuserEnergyBaseUsage; int gas = EmergingTechnologyConfig.HYDROPONICS_MODULE.DIFFUSER.diffuserGasBaseUsage; int range = EmergingTechnologyConfig.HYDROPONICS_MODULE.DIFFUSER.diffuserBaseRange; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.DIFFUSER_DESC)); tooltip.add(Lang.getGasRange(range)); tooltip.add(Lang.getRequired(gas, ResourceTypeEnum.GAS)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #28
Source File: Harvester.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.HYDROPONICS_MODULE.HARVESTER.harvesterEnergyBaseUsage; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.HARVESTER_DESC)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #29
Source File: Processor.java From EmergingTechnology with MIT License | 5 votes |
@SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) { int energy = EmergingTechnologyConfig.POLYMERS_MODULE.PROCESSOR.processorEnergyBaseUsage; int water = EmergingTechnologyConfig.POLYMERS_MODULE.PROCESSOR.processorWaterBaseUsage; if (KeyBindings.showExtendedTooltips()) { tooltip.add(Lang.get(Lang.PROCESSOR_DESC)); tooltip.add(Lang.getRequired(energy, ResourceTypeEnum.ENERGY)); tooltip.add(Lang.getRequired(water, ResourceTypeEnum.WATER)); } else { tooltip.add(Lang.get(Lang.INTERACT_SHIFT)); } }
Example #30
Source File: BlockFastFurnace.java From YouTubeModdingTutorial with MIT License | 5 votes |
@Override public void addInformation(ItemStack stack, @Nullable World world, List<String> tooltip, ITooltipFlag flags) { NBTTagCompound tagCompound = stack.getTagCompound(); if (tagCompound != null) { int energy = tagCompound.getInteger("energy"); int sizeIn = getItemCount(tagCompound, "itemsIn"); int sizeOut = getItemCount(tagCompound, "itemsOut"); addInformationLocalized(tooltip, "message.mymod.fast_furnace", energy, sizeIn, sizeOut); } }