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/nei | |
| 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/nei')
| -rw-r--r-- | src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index a3ba09cb7d..f61bd7621f 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -754,16 +754,19 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { .getItemHandler() == itemOutputsInventory) { int i = widget.getMcSlot() .getSlotIndex(); - if (aRecipe.mOutputs.length > i && aRecipe.mOutputs[i] != null) { + + ItemStack output = aRecipe.getRepresentativeOutput(i); + if (output != null) { mOutputs.add( new FixedPositionedStack( - aRecipe.mOutputs[i], + output, GT_NEI_DefaultHandler.this.mRecipeMap.renderRealStackSizes, widget.getPos().x + 1, widget.getPos().y + 1, aRecipe.getOutputChance(i), GT_NEI_DefaultHandler.this.mRecipeMap.mNEIUnificateOutput)); } + } else if (widget.getMcSlot() .getItemHandler() == specialSlotInventory) { if (aRecipe.mSpecialItems != null) { |
