diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-12-26 20:16:10 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-12-26 20:16:10 +0000 |
commit | 3033ac1f6f071dbb8d2a5227957ccc6800616baa (patch) | |
tree | a8f1aa065eb50ffa2133032f944314eeb3f7570c /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base | |
parent | bcc175906ebfac6f04ddf1c0184ca15fd946ac19 (diff) | |
download | GT5-Unofficial-3033ac1f6f071dbb8d2a5227957ccc6800616baa.tar.gz GT5-Unofficial-3033ac1f6f071dbb8d2a5227957ccc6800616baa.tar.bz2 GT5-Unofficial-3033ac1f6f071dbb8d2a5227957ccc6800616baa.zip |
% Overhauled Multiblock Tooltips.
% Overhauled Multiblock structural checks, they are now able to utilise my Blueprint system for much faster, cleaner checks.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base')
-rw-r--r-- | src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java | 37 |
1 files changed, 37 insertions, 0 deletions
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 |