Java Code Examples for net.minecraft.client.resources.I18n
The following examples show how to use
net.minecraft.client.resources.I18n.
These examples are extracted from open source projects.
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 Project: PneumaticCraft Author: MineMaarten File: ItemGPSTool.java License: GNU General Public License v3.0 | 6 votes |
@Override public void addInformation(ItemStack stack, EntityPlayer player, List infoList, boolean par4){ super.addInformation(stack, player, infoList, par4); NBTTagCompound compound = stack.stackTagCompound; if(compound != null) { int x = compound.getInteger("x"); int y = compound.getInteger("y"); int z = compound.getInteger("z"); if(x != 0 || y != 0 || z != 0) { infoList.add("\u00a72Set to " + x + ", " + y + ", " + z); } String varName = getVariable(stack); if(!varName.equals("")) { infoList.add(I18n.format("gui.tooltip.gpsTool.variable", varName)); } } }
Example #2
Source Project: PneumaticCraft Author: MineMaarten File: GuiOmnidirectionalHopper.java License: GNU General Public License v3.0 | 6 votes |
@Override public void initGui(){ super.initGui(); statusStat = addAnimatedStat("gui.tab.hopperStatus", new ItemStack(Blockss.omnidirectionalHopper), 0xFFFFAA00, false); GuiAnimatedStat optionStat = addAnimatedStat("gui.tab.gasLift.mode", new ItemStack(net.minecraft.init.Blocks.lever), 0xFFFFCC00, false); List<String> text = new ArrayList<String>(); for(int i = 0; i < 4; i++) text.add(" "); optionStat.setTextWithoutCuttingString(text); GuiButtonSpecial button = new GuiButtonSpecial(1, 5, 20, 20, 20, ""); button.setRenderStacks(new ItemStack(Items.bucket)); button.setTooltipText(I18n.format("gui.tab.omnidirectionalHopper.mode.empty")); optionStat.addWidget(button); modeButtons[0] = button; button = new GuiButtonSpecial(2, 30, 20, 20, 20, ""); button.setRenderStacks(new ItemStack(Items.water_bucket)); button.setTooltipText(I18n.format("gui.tab.omnidirectionalHopper.mode.leaveItem")); optionStat.addWidget(button); modeButtons[1] = button; }
Example #3
Source Project: MediaMod Author: MediaModMC File: GuiServices.java License: GNU General Public License v3.0 | 6 votes |
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawDefaultBackground(); GlStateManager.pushMatrix(); GlStateManager.color(1, 1, 1, 1); // Bind the texture for rendering mc.getTextureManager().bindTexture(this.headerResource); // Render the header Gui.drawModalRectWithCustomSizedTexture(width / 2 - 111, height / 2 - 110, 0, 0, 222, 55, 222, 55); GlStateManager.popMatrix(); if (!SpotifyHandler.logged) { drawCenteredString(fontRendererObj, I18n.format("menu.guiservices.text.spotifyNotLogged.name"), width / 2, height / 2 - 53, Color.red.getRGB()); } else { drawCenteredString(fontRendererObj, I18n.format("menu.guiservices.text.spotifyLogged.name"), width / 2, height / 2 - 53, Color.green.getRGB()); } super.drawScreen(mouseX, mouseY, partialTicks); }
Example #4
Source Project: WearableBackpacks Author: copygirl File: ScreenEntityEntry.java License: MIT License | 6 votes |
public EntryButtonRenderOptions(EntryEntityID entityID, Optional<RenderOptions> value, Supplier<List<BackpackEntry>> backpacks) { _previousValue = value; _value = value.orElse(RenderOptions.DEFAULT); GuiButton button = new GuiButton(EntryCategory.BUTTON_WIDTH); String languageKey = "config." + WearableBackpacks.MOD_ID + ".entity.renderOptions"; button.setText(I18n.format(languageKey)); button.setTooltip(formatTooltip(languageKey, languageKey + ".tooltip", null, null)); button.setAction(() -> display(new ScreenRenderOptions(this, backpacks.get(), entityID.entityEntry.map(e -> (Class<? extends EntityLivingBase>)e.getEntityClass()).orElse(null)))); setSpacing(6); addWeighted(button); addFixed(buttonUndo); }
Example #5
Source Project: ToroQuest Author: ToroCraft File: VillageLordGuiContainer.java License: GNU General Public License v3.0 | 6 votes |
private static String processListParamter(String s) { StringBuilder sb = new StringBuilder(); String[] sStacks = s.substring(2).split(";"); boolean isFirst = true; for (String sStack : sStacks) { if (isFirst) { isFirst = false; } else { sb.append(", "); } String[] sStackParts = sStack.split(","); if (sStackParts.length == 2) { sb.append(I18n.format(sStackParts[0] + ".name")); sb.append("[").append(sStackParts[1]).append("]"); } else { sb.append(sStackParts); } } return sb.toString(); }
Example #6
Source Project: Production-Line Author: GoodTimeStudio File: GuiFluidKineticGenerator.java License: MIT License | 6 votes |
@Override protected void drawGuiContainerForegroundLayer(int x, int y) { super.drawGuiContainerForegroundLayer(x, y); if (this.container.tile.fluidTank.getFluidAmount() > 0) { String tooltip = this.container.tile.fluidTank.getFluid().getLocalizedName() + ": " + this.container.tile.fluidTank.getFluidAmount() + "mB"; drawTooltip(x - this.guiLeft, y - this.guiTop, Collections.singletonList(tooltip)); } String output = I18n.format(GUI_PREFIX + "FluidKineticGenerator.output", this.container.getTileEntity().maxrequestkineticenergyTick( this.container.getTileEntity().facing)); this.drawString(this.fontRendererObj, output, 96, 33, 2157374); String max_output = I18n.format(GUI_PREFIX + "FluidKineticGenerator.max-output", this.container.getTileEntity().kuOutput); this.drawString(this.fontRendererObj, max_output, 96, 52, 2157374); }
Example #7
Source Project: enderutilities Author: maruohon File: GuiPortalPanel.java License: GNU Lesser General Public License v3.0 | 6 votes |
@Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { super.drawGuiContainerForegroundLayer(mouseX, mouseY); String s = this.tepp.hasCustomName() ? this.tepp.getName() : I18n.format(this.tepp.getName()); this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 5, 0x404040); this.fontRenderer.drawString(I18n.format("enderutilities.gui.label.settargetname"), 8, 118, 0x404040); this.fontRenderer.drawString(I18n.format("container.inventory"), 8, 156, 0x404040); GlStateManager.disableLighting(); GlStateManager.disableBlend(); String name = this.tepp.getPanelDisplayName(); if (this.nameLast.equals(name) == false) { this.nameField.setText(name); this.nameLast = name; } this.nameField.drawTextBox(); }
Example #8
Source Project: Hyperium Author: HyperiumClient File: ChangeBackgroundGui.java License: GNU Lesser General Public License v3.0 | 6 votes |
@Override public void initGui() { downloadUrlField = new GuiTextField(0, mc.fontRendererObj, width / 4, height / 2 - 10, width / 2, 20); downloadUrlField.setFocused(true); downloadUrlField.setMaxStringLength(150); buttonList.add(new GuiButton(1, width / 2 - 150 / 2, height / 2 + 20, 150, 20, I18n.format("button.changebackground.seturl"))); buttonList.add(new GuiButton(2, width / 2 - 150 / 2, height / 2 + 42, 150, 20, I18n.format("button.changebackground.choosefile"))); buttonList.add(new GuiButton(3, width / 2 - 150 / 2, height / 2 + 64, 150, 20, I18n.format("button.changebackground.resetbackground"))); buttonList.add(new GuiButton(4, width / 2 - 150 / 2, height / 2 + 86, 150, 20, I18n.format("gui.cancel"))); if (Minecraft.getMinecraft().isFullScreen()) Minecraft.getMinecraft().toggleFullscreen(); }
Example #9
Source Project: enderutilities Author: maruohon File: GuiInserter.java License: GNU Lesser General Public License v3.0 | 6 votes |
@Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { if (this.tef.isFiltered()) { this.fontRenderer.drawString(I18n.format("enderutilities.container.inserter_filtered"), 8, 6, 0x404040); this.fontRenderer.drawString(I18n.format("container.inventory"), 8, 105, 0x404040); } else { this.fontRenderer.drawString(I18n.format("enderutilities.container.inserter_normal"), 8, 6, 0x404040); this.fontRenderer.drawString(I18n.format("container.inventory"), 8, 49, 0x404040); } String str = String.valueOf(this.tef.getBaseItemHandler().getInventoryStackLimit()); this.fontRenderer.drawString(str, 134 - this.fontRenderer.getStringWidth(str), 22, 0x404040); str = String.valueOf(this.tef.getUpdateDelay()); this.fontRenderer.drawString(str, 134 - this.fontRenderer.getStringWidth(str), 36, 0x404040); }
Example #10
Source Project: TofuCraftReload Author: 0999312 File: GuiSaltFurnace.java License: MIT License | 6 votes |
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); super.drawScreen(mouseX, mouseY, partialTicks); if (this.isPointInRegion(114, 29, 6, 35, mouseX, mouseY)) { //TODO FluidTank tank = this.tileFurnace.getNigariTank(); // StringBuilder amount = new StringBuilder(TextFormatting.GRAY + ""); // amount.append(tank.getFluidAmount()); // amount.append("mb/"); // amount.append(tank.getCapacity()); // amount.append("mb"); ArrayList<String> string = Lists.newArrayList(I18n.format("fluid.nigari")); //TODO string.add(amount.toString()); this.drawHoveringText(string, mouseX, mouseY, fontRenderer); } }
Example #11
Source Project: Fullscreen-Windowed-Minecraft Author: hancin File: ConfigurationHandler.java License: BSD 2-Clause "Simplified" License | 6 votes |
private void load() { _enableFullscreenWindowed = _configuration.get(Configuration.CATEGORY_GENERAL, "enableFullscreenWindowed", true, I18n.format("comment.fullscreenwindowed.enableFullscreenWindowed")); _fullscreenMonitor = _configuration.get(Configuration.CATEGORY_GENERAL, "fullscreenMonitor", Reference.AUTOMATIC_MONITOR_SELECTION, I18n.format("comment.fullscreenwindowed.fullscreenmonitor")); _enableAdvancedFeatures = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "enableAdvancedFeatures", Reference.ADVANCED_FEATURES_ENABLED, I18n.format("comment.fullscreenwindowed.enableAdvancedFeatures")); _enableMaximumCompatibility = _configuration.get(Configuration.CATEGORY_GENERAL, "enableMaximumCompatibility", Reference.ENABLE_MAXIMUM_COMPATIBILITY, I18n.format("comment.fullscreenwindowed.enableMaximumCompatibility")); _customFullscreenDimensions = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "customFullscreenDimensions", false, I18n.format("comment.fullscreenwindowed.customFullscreenDimensions")); _customFullscreenDimensionsX = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "customFullscreenDimensionsX", 0, I18n.format("comment.fullscreenwindowed.customFullscreenDimensionsX")); _customFullscreenDimensionsY = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "customFullscreenDimensionsY", 0, I18n.format("comment.fullscreenwindowed.customFullscreenDimensionsY")); _customFullscreenDimensionsW = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "customFullscreenDimensionsW", 0, I18n.format("comment.fullscreenwindowed.customFullscreenDimensionsW")); _customFullscreenDimensionsH = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "customFullscreenDimensionsH", 0, I18n.format("comment.fullscreenwindowed.customFullscreenDimensionsH")); //TODO: due to how LWJGL draws windows, it's not a good idea to have this... disabled until I can fix the bugs with X,Y being off due to decoration shadows. //_onlyRemoveDecorations = _configuration.get(ConfigurationHandler.CATEGORY_ADVANCED, "onlyRemoveDecorations", Reference.ONLY_REMOVE_DECORATIONS, I18n.format("comment.fullscreenwindowed.onlyRemoveDecorations")); if (_configuration.hasChanged()) { _configuration.save(); } }
Example #12
Source Project: GregTech Author: GregTechCE File: CycleButtonWidget.java License: GNU Lesser General Public License v3.0 | 6 votes |
@Override public void drawInForeground(int mouseX, int mouseY) { boolean isHovered = isMouseOverElement(mouseX, mouseY); boolean wasHovered = isMouseHovered; if (isHovered && !wasHovered) { this.isMouseHovered = true; this.hoverStartTime = System.currentTimeMillis(); } else if (!isHovered && wasHovered) { this.isMouseHovered = false; this.hoverStartTime = 0L; } else if (isHovered) { long timeSinceHover = System.currentTimeMillis() - hoverStartTime; if (timeSinceHover > 1000L && tooltipHoverString != null) { List<String> hoverList = Arrays.asList(I18n.format(tooltipHoverString).split("/n")); drawHoveringText(ItemStack.EMPTY, hoverList, 300, mouseX, mouseY); } } }
Example #13
Source Project: enderutilities Author: maruohon File: GuiMemoryChest.java License: GNU Lesser General Public License v3.0 | 6 votes |
protected void createButtons() { this.buttonList.clear(); int x = (this.width - this.xSize) / 2; int y = (this.height - this.ySize) / 2; String strPublic = I18n.format("enderutilities.gui.label.public") + " (" + I18n.format("enderutilities.tooltip.item.owner") + ": " + this.temc.getOwnerName() + ")"; String strPrivate = I18n.format("enderutilities.gui.label.private") + " (" + I18n.format("enderutilities.tooltip.item.owner") + ": " + this.temc.getOwnerName() + ")"; this.buttonList.add(new GuiButtonStateCallback(BTN_ID_TOGGLE_LOCK, x + 138, y + 15, 8, 8, 8, 0, this.guiTextureWidgets, this, ButtonState.create(0, 0, strPublic), ButtonState.create(0, 48, strPrivate))); }
Example #14
Source Project: ExNihiloAdscensio Author: MikeLydeamore File: BlockSieve.java License: MIT License | 6 votes |
@Override public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer player, World world, IBlockState blockState, IProbeHitData data) { TileSieve sieve = (TileSieve) world.getTileEntity(data.getPos()); if (sieve == null) return; if (sieve.getMeshStack() == null) { probeInfo.text("Mesh: None"); return; } probeInfo.text("Mesh: " + I18n.format(sieve.getMeshStack().getUnlocalizedName() + ".name")); if (mode == ProbeMode.EXTENDED) { Map<Enchantment, Integer> enchantments = EnchantmentHelper.getEnchantments(sieve.getMeshStack()); for (Enchantment enchantment : enchantments.keySet()) { probeInfo.text(TextFormatting.BLUE + enchantment.getTranslatedName(enchantments.get(enchantment))); } } }
Example #15
Source Project: PneumaticCraft Author: MineMaarten File: GuiAmadron.java License: GNU General Public License v3.0 | 6 votes |
@Override public void initGui(){ super.initGui(); String amadron = I18n.format("gui.amadron"); addLabel(amadron, guiLeft + xSize / 2 - mc.fontRenderer.getStringWidth(amadron) / 2, guiTop + 5); addLabel(I18n.format("gui.search"), guiLeft + 76 - mc.fontRenderer.getStringWidth(I18n.format("gui.search")), guiTop + 41); addInfoTab(I18n.format("gui.tooltip.item.amadronTablet")); addAnimatedStat("gui.tab.info.ghostSlotInteraction.title", new ItemStack(Blocks.hopper), 0xFF00AAFF, true).setText("gui.tab.info.ghostSlotInteraction"); addAnimatedStat("gui.tab.amadron.disclaimer.title", new ItemStack(Items.writable_book), 0xFF0000FF, true).setText("gui.tab.amadron.disclaimer"); searchBar = new WidgetTextField(mc.fontRenderer, guiLeft + 79, guiTop + 40, 73, mc.fontRenderer.FONT_HEIGHT); addWidget(searchBar); scrollbar = new WidgetVerticalScrollbar(-1, guiLeft + 156, guiTop + 54, 142); scrollbar.setStates(1); scrollbar.setListening(true); addWidget(scrollbar); List<String> tooltip = PneumaticCraftUtils.convertStringIntoList(I18n.format("gui.amadron.button.order.tooltip"), 40); addWidget(new GuiButtonSpecial(1, guiLeft + 6, guiTop + 15, 72, 20, I18n.format("gui.amadron.button.order")).setTooltipText(tooltip)); addTradeButton = new GuiButtonSpecial(2, guiLeft + 80, guiTop + 15, 72, 20, I18n.format("gui.amadron.button.addTrade")); addWidget(addTradeButton); updateVisibleOffers(); }
Example #16
Source Project: PneumaticCraft Author: MineMaarten File: GuiPressureModuleSimple.java License: GNU General Public License v3.0 | 6 votes |
@Override public void initGui(){ super.initGui(); String title = I18n.format("item." + module.getType() + ".name"); addLabel(title, width / 2 - fontRendererObj.getStringWidth(title) / 2, guiTop + 5); advancedMode = new GuiCheckBox(0, guiLeft + 6, guiTop + 15, 0xFF000000, "gui.tubeModule.advancedConfig").setTooltip(I18n.format("gui.tubeModule.advancedConfig.tooltip")); advancedMode.checked = false; addWidget(advancedMode); thresholdField = new WidgetTextFieldNumber(fontRendererObj, guiLeft + 110, guiTop + 33, 30, fontRendererObj.FONT_HEIGHT).setDecimals(1); addWidget(thresholdField); if(module instanceof TubeModuleRedstoneReceiving) { thresholdField.setValue(((TubeModuleRedstoneReceiving)module).getThreshold()); addLabel(I18n.format("gui.tubeModule.simpleConfig.threshold"), guiLeft + 6, guiTop + 33); } else { thresholdField.setValue(module.lowerBound); addLabel(I18n.format("gui.tubeModule.simpleConfig.turn"), guiLeft + 6, guiTop + 33); moreOrLessButton = new GuiButtonSpecial(1, guiLeft + 85, guiTop + 28, 20, 20, module.lowerBound < module.higherBound ? ">" : "<"); moreOrLessButton.setTooltipText(I18n.format(module.lowerBound < module.higherBound ? "gui.tubeModule.simpleConfig.higherThan" : "gui.tubeModule.simpleConfig.lowerThan")); addWidget(moreOrLessButton); } addLabel(I18n.format("gui.general.bar"), guiLeft + 145, guiTop + 34); }
Example #17
Source Project: Signals Author: MineMaarten File: GuiContainerBase.java License: GNU General Public License v3.0 | 6 votes |
@Override public void drawScreen(int x, int y, float partialTick){ if(!hasInit) return; super.drawScreen(x, y, partialTick); List<String> tooltip = new ArrayList<>(); GL11.glColor4d(1, 1, 1, 1); GL11.glDisable(GL11.GL_LIGHTING); for(IGuiWidget widget : widgets) { if(widget.getBounds().contains(x, y)) widget.addTooltip(x, y, tooltip, Signals.proxy.isSneakingInGui()); } if(!tooltip.isEmpty()) { List<String> localizedTooltip = new ArrayList<>(); for(String line : tooltip) { String localizedLine = I18n.format(line); String[] lines = WordUtils.wrap(localizedLine, 50).split(System.getProperty("line.separator")); for(String locLine : lines) { localizedTooltip.add(locLine); } } drawHoveringText(localizedTooltip, x, y, fontRenderer); } }
Example #18
Source Project: Hyperium Author: HyperiumClient File: HyperiumGuiScreenResourcePacks.java License: GNU Lesser General Public License v3.0 | 5 votes |
public void drawScreen(GuiResourcePackAvailable availableResourcePacksList, GuiResourcePackSelected selectedResourcePacksList, int mouseX, int mouseY, float partialTicks, FontRenderer fontRendererObj, int width) { parent.drawBackground(0); availableResourcePacksList.drawScreen(mouseX, mouseY, partialTicks); selectedResourcePacksList.drawScreen(mouseX, mouseY, partialTicks); parent.drawCenteredString(fontRendererObj, I18n.format("resourcePack.title"), width / 2, 16, 16777215); }
Example #19
Source Project: MediaMod Author: MediaModMC File: GuiPlayerSettings.java License: GNU General Public License v3.0 | 5 votes |
@Override protected void actionPerformed(GuiButton button) throws IOException { super.actionPerformed(button); switch (button.id) { case 0: this.mc.displayGuiScreen(new GuiMediaModSettings()); break; case 1: Settings.SHOW_ALBUM_ART = !Settings.SHOW_ALBUM_ART; button.displayString = getSuffix(Settings.SHOW_ALBUM_ART, I18n.format("menu.guiplayersettings.buttons.showAlbumArt.name")); break; case 2: Settings.AUTO_COLOR_SELECTION = !Settings.AUTO_COLOR_SELECTION; button.displayString = getSuffix(Settings.AUTO_COLOR_SELECTION, I18n.format("menu.guiplayersettings.buttons.colorSelection.name")); break; case 3: Settings.MODERN_PLAYER_STYLE = !Settings.MODERN_PLAYER_STYLE; button.displayString = getSuffix(Settings.MODERN_PLAYER_STYLE, I18n.format("menu.guiplayersettings.buttons.modernPlayer.name")); break; case 4: this.mc.displayGuiScreen(new GuiPlayerPositioning()); break; case 5: int nextIndex = Settings.PROGRESS_STYLE.ordinal() + 1; if (nextIndex >= ProgressStyle.values().length) { nextIndex = 0; } Settings.PROGRESS_STYLE = ProgressStyle.values()[nextIndex]; button.displayString = I18n.format("menu.guiplayersettings.buttons.progressStyle.name") + " " + EnumChatFormatting.GREEN + I18n.format("menu.guiplayersettings.buttons.progressStyle." + Settings.PROGRESS_STYLE.name().toLowerCase()); break; } }
Example #20
Source Project: GregTech Author: GregTechCE File: TankWidget.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override public void drawInForeground(int mouseX, int mouseY) { if (!hideTooltip && !gui.isJEIHandled && isMouseOverElement(mouseX, mouseY)) { List<String> tooltips = new ArrayList<>(); if (lastFluidInTank != null) { Fluid fluid = lastFluidInTank.getFluid(); tooltips.add(fluid.getLocalizedName(lastFluidInTank)); tooltips.add(I18n.format("gregtech.fluid.amount", lastFluidInTank.amount, lastTankCapacity)); tooltips.add(I18n.format("gregtech.fluid.temperature", fluid.getTemperature(lastFluidInTank))); tooltips.add(I18n.format(fluid.isGaseous(lastFluidInTank) ? "gregtech.fluid.state_gas" : "gregtech.fluid.state_liquid")); } else { tooltips.add(I18n.format("gregtech.fluid.empty")); tooltips.add(I18n.format("gregtech.fluid.amount", 0, lastTankCapacity)); } if (allowClickFilling) { tooltips.add(""); //add empty line to separate things tooltips.add(I18n.format("gregtech.fluid.click_to_fill")); tooltips.add(I18n.format("gregtech.fluid.click_to_fill.shift")); } if (allowClickEmptying) { tooltips.add(""); //add empty line to separate things tooltips.add(I18n.format("gregtech.fluid.click_to_empty")); tooltips.add(I18n.format("gregtech.fluid.click_to_empty.shift")); } drawHoveringText(ItemStack.EMPTY, tooltips, 300, mouseX, mouseY); GlStateManager.color(1.0f, 1.0f, 1.0f); } }
Example #21
Source Project: Custom-Main-Menu Author: lumien231 File: LogicUtil.java License: MIT License | 5 votes |
public static ArrayList<String> getTooltip(String tooltipString) { ArrayList<String> tooltip = new ArrayList<String>(); String[] split = tooltipString.split("\n"); for (String s:split) { tooltip.add(I18n.format(StringReplacer.replacePlaceholders(s))); } return tooltip; }
Example #22
Source Project: Valkyrien-Skies Author: ValkyrienSkies File: BlockCaptainsChair.java License: Apache License 2.0 | 5 votes |
@Override @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, @Nullable World player, List<String> itemInformation, ITooltipFlag advanced) { itemInformation.add(TextFormatting.ITALIC + "" + TextFormatting.BLUE + I18n .format("tooltip.vs_control.captains_chair_1")); itemInformation.add(TextFormatting.RED + "" + TextFormatting.ITALIC + I18n .format("tooltip.vs_control.captains_chair_2")); }
Example #23
Source Project: Hyperium Author: HyperiumClient File: ChangeBackgroundGui.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { drawDefaultBackground(); ScaledResolution resolution = new ScaledResolution(mc); drawCenteredString(mc.fontRendererObj, statusText, resolution.getScaledWidth() / 2, resolution.getScaledHeight() / 2 - 50, -1); drawCenteredString(mc.fontRendererObj, I18n.format("gui.changebackground.line2"), resolution.getScaledWidth() / 2, resolution.getScaledHeight() / 2 - 30, -1); downloadUrlField.drawTextBox(); super.drawScreen(mouseX, mouseY, partialTicks); }
Example #24
Source Project: GregTech Author: GregTechCE File: MetaTileEntityFisher.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, boolean advanced) { tooltip.add(I18n.format("gregtech.universal.tooltip.voltage_in", energyContainer.getInputVoltage(), GTValues.VN[getTier()])); tooltip.add(I18n.format("gregtech.universal.tooltip.energy_storage_capacity", energyContainer.getEnergyCapacity())); tooltip.add(I18n.format("gregtech.machine.fisher.speed", fishingTicks)); tooltip.add(I18n.format("gregtech.machine.fisher.requirement", (int) Math.sqrt(WATER_CHECK_SIZE))); }
Example #25
Source Project: GregTech Author: GregTechCE File: ElectricStats.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack itemStack, List<String> lines) { IElectricItem electricItem = itemStack.getCapability(GregtechCapabilities.CAPABILITY_ELECTRIC_ITEM, null); if(electricItem != null && electricItem.canProvideChargeExternally()) { lines.add(I18n.format("metaitem.electric.discharge_mode.tooltip")); } }
Example #26
Source Project: GT-Classic Author: e99999 File: GTBlockBaseMachine.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override public void addInformation(ItemStack stack, World worldIn, List<String> tooltip, ITooltipFlag flagIn) { if (tooltipSize == 0) { return; } for (int i = 0; i < this.tooltipSize; i++) { tooltip.add(I18n.format(this.getUnlocalizedName().replace("tile", "tooltip") + i)); } }
Example #27
Source Project: qcraft-mod Author: TeacherGaming File: GuiItemTransfer.java License: Apache License 2.0 | 5 votes |
@Override public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); this.drawCenteredString( this.fontRendererObj, I18n.format( "gui.qcraft:item_transfer.line1", m_destinationServerName ), this.width / 2, 70, 16777215 ); this.drawCenteredString( this.fontRendererObj, I18n.format( "gui.qcraft:item_transfer.line2", m_destinationServerName ), this.width / 2, 90, 16777215 ); super.drawScreen( par1, par2, par3 ); }
Example #28
Source Project: PneumaticCraft Author: MineMaarten File: GuiAirGrateModule.java License: GNU General Public License v3.0 | 5 votes |
@Override public void initGui(){ super.initGui(); addLabel(I18n.format("gui.entityFilter"), guiLeft + 10, guiTop + 14); textfield = new GuiTextField(fontRendererObj, guiLeft + 10, guiTop + 25, 160, 10); textfield.setText(((ModuleAirGrate)module).entityFilter); }
Example #29
Source Project: enderutilities Author: maruohon File: GuiMSU.java License: GNU Lesser General Public License v3.0 | 5 votes |
@Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { String str = this.temsu.hasCustomName() ? this.temsu.getName() : I18n.format("enderutilities.container.msu." + this.tier); this.fontRenderer.drawString(str, 8, 5, 0x404040); this.fontRenderer.drawString(I18n.format("container.inventory"), 8, 46, 0x404040); }
Example #30
Source Project: Framez Author: amadornes File: GuiMotorSettings.java License: GNU General Public License v3.0 | 5 votes |
@Override public void drawScreen(int x, int y, float partialTick) { super.drawScreen(x, y, partialTick); int x_ = (width - xSize) / 2; int y_ = (height - ySize) / 2; drawString(fontRendererObj, I18n.format("gui." + ModInfo.MODID + ":motor.redstone_pulse." + ((WidgetMode) getWidget(0)).value), x_ + 8 + 16, y_ + 20 + 3, COLOR_TEXT); drawString(fontRendererObj, I18n.format("gui." + ModInfo.MODID + ":motor.redstone_inverted." + ((WidgetMode) getWidget(1)).value), x_ + 8 + 16, y_ + 36 + 3, COLOR_TEXT); }