From 3033ac1f6f071dbb8d2a5227957ccc6800616baa Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Wed, 26 Dec 2018 20:16:10 +0000 Subject: % Overhauled Multiblock Tooltips. % Overhauled Multiblock structural checks, they are now able to utilise my Blueprint system for much faster, cleaner checks. --- .../base/GregtechMeta_MultiBlockBase.java | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 38e5681bdc..8bcaf0b2ec 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -199,6 +199,40 @@ GT_MetaTileEntity_MultiBlockBase { return true; } + private String[] aCachedToolTip; + + @Override + public final String[] getDescription() { + if (aCachedToolTip != null) { + return aCachedToolTip; + } + String[] x = getTooltip(); + //Add Stock Tooltip to bottom of list + String[] z; + if (getPollutionPerTick(null) > 0) { + z = new String[] { + getPollutionTooltip(), + getMachineTooltip(), + CORE.GT_Tooltip}; + } + else { + z = new String[] { + getMachineTooltip(), + CORE.GT_Tooltip}; + } + + int a2, a3; + a2 = x != null ? x.length : 0; + a3 = z != null ? z.length : 0; + String[] aToolTip = new String[(a2 + a3)]; + aToolTip = ArrayUtils.addAll(aToolTip, x); + aToolTip = ArrayUtils.addAll(aToolTip, z); + aCachedToolTip = aToolTip; + return aToolTip; + } + + public abstract String[] getTooltip(); + public int getAmountOfOutputs() { return 1; } @@ -935,6 +969,9 @@ GT_MetaTileEntity_MultiBlockBase { resetRecipeMapForAllInputHatches(); } + + + /** * Enable Texture Casing Support if found in GT 5.09 -- cgit