diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c0d2d410..ffe33ab1a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Fixed Exporter in Regulator Mode not regulating properly when same item is specified multiple times (raoulvdberge) - Fixed air appearing in Grid (raoulvdberge) - Fixed config categories not correctly appearing in ingame config GUI (raoulvdberge) +- Fixed craftable items showing "1 total" if not stored in system in Grid (raoulvdberge) - Removed "detailed" Grid view type variant, made detailed tooltips a config option instead (raoulvdberge) ### 1.5.25 diff --git a/src/main/java/com/raoulvdberge/refinedstorage/gui/grid/GuiGrid.java b/src/main/java/com/raoulvdberge/refinedstorage/gui/grid/GuiGrid.java index 694f977dc..6013e055a 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/gui/grid/GuiGrid.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/gui/grid/GuiGrid.java @@ -509,7 +509,9 @@ public class GuiGrid extends GuiBase implements IGridDisplay { List textLines = Lists.newArrayList(gridStack.getTooltip().split("\n")); if (RS.INSTANCE.config.detailedTooltip) { - textLines.add(""); + if (!(gridStack instanceof GridStackItem) || !((GridStackItem) gridStack).doesDisplayCraftText()) { + textLines.add(""); + } if (gridStack.getTrackerEntry() != null) { textLines.add(""); @@ -550,10 +552,14 @@ public class GuiGrid extends GuiBase implements IGridDisplay { // RS BEGIN if (RS.INSTANCE.config.detailedTooltip) { - int size = (int) (font.getStringWidth(I18n.format("misc.refinedstorage:total", gridStack.getFormattedFullQuantity())) * textScale); + int size; - if (size > tooltipTextWidth) { - tooltipTextWidth = size; + if (!(gridStack instanceof GridStackItem) || !((GridStackItem) gridStack).doesDisplayCraftText()) { + size = (int) (font.getStringWidth(I18n.format("misc.refinedstorage:total", gridStack.getFormattedFullQuantity())) * textScale); + + if (size > tooltipTextWidth) { + tooltipTextWidth = size; + } } if (gridStack.getTrackerEntry() != null) { @@ -618,12 +624,14 @@ public class GuiGrid extends GuiBase implements IGridDisplay { GlStateManager.pushMatrix(); GlStateManager.scale(textScale, textScale, 1); - font.drawStringWithShadow( - TextFormatting.GRAY + I18n.format("misc.refinedstorage:total", gridStack.getFormattedFullQuantity()), - RenderUtils.getOffsetOnScale(tooltipX, textScale), - RenderUtils.getOffsetOnScale(tooltipTop + tooltipHeight - (gridStack.getTrackerEntry() != null ? 15 : 6) - (font.getUnicodeFlag() ? 2 : 0), textScale), - -1 - ); + if (!(gridStack instanceof GridStackItem) || !((GridStackItem) gridStack).doesDisplayCraftText()) { + font.drawStringWithShadow( + TextFormatting.GRAY + I18n.format("misc.refinedstorage:total", gridStack.getFormattedFullQuantity()), + RenderUtils.getOffsetOnScale(tooltipX, textScale), + RenderUtils.getOffsetOnScale(tooltipTop + tooltipHeight - (gridStack.getTrackerEntry() != null ? 15 : 6) - (font.getUnicodeFlag() ? 2 : 0), textScale), + -1 + ); + } if (gridStack.getTrackerEntry() != null) { font.drawStringWithShadow(