diff options
author | Elisis <gtandemmodding@gmail.com> | 2023-11-14 20:42:39 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-14 20:42:39 +1100 |
commit | ebd1748addf3c0bdd8d25c040ccaf530b390a766 (patch) | |
tree | 6b77138201dbe3f3d91fda4d7e5923c718bcd8aa /src/main/java/gregtech/api/util | |
parent | af3ef0e96b1522f1953e62164cf2bcd0a5291475 (diff) | |
download | GT5-Unofficial-ebd1748addf3c0bdd8d25c040ccaf530b390a766.tar.gz GT5-Unofficial-ebd1748addf3c0bdd8d25c040ccaf530b390a766.tar.bz2 GT5-Unofficial-ebd1748addf3c0bdd8d25c040ccaf530b390a766.zip |
Allow a recipe's displayed NEI item outputs to be changed (#2367)
* Add GT_Recipe#getRepresentativeOutputs method
* Spotless apply for branch nei-output-override for #2367 (#2368)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
* Javadoc, move method, remove unnecessary import, Object to ItemStack
* Actually fix merge
* Spotless apply for branch nei-output-override for #2367 (#2369)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Recipe.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 61cd2134a3..7ae355b1e0 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -580,6 +580,20 @@ public class GT_Recipe implements Comparable<GT_Recipe> { return GT_Utility.copyOrNull(mOutputs[aIndex]); } + /*** + * Dictates the ItemStacks displayed in the output slots of any NEI page handled by the default GT NEI handler. + * Override to make shown items differ from a GT_Recipe's item output array + * + * @see gregtech.nei.GT_NEI_DefaultHandler + * @param i Slot index + * @return ItemStack to be displayed in the slot + * + */ + // + public ItemStack getRepresentativeOutput(int i) { + return getOutput(i); + } + public int getOutputChance(int aIndex) { if (mChances == null) return 10000; if (aIndex < 0 || aIndex >= mChances.length) return 10000; |