diff options
author | BlueWeabo <ilia.iliev2005@gmail.com> | 2023-07-30 11:11:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-30 11:11:40 +0300 |
commit | cc4040b0753af8984f09701e3b5af208c30bea7b (patch) | |
tree | 31ab9f8ae00930fcde233f4be2068426b3fb6958 /src/main/java/gtPlusPlus/xmod/gregtech/common | |
parent | fb94d2c6146e6b582e5b7375d66ec009bef0d69a (diff) | |
download | GT5-Unofficial-cc4040b0753af8984f09701e3b5af208c30bea7b.tar.gz GT5-Unofficial-cc4040b0753af8984f09701e3b5af208c30bea7b.tar.bz2 GT5-Unofficial-cc4040b0753af8984f09701e3b5af208c30bea7b.zip |
Make sure to account for first output being chanced on steam grinder (#709)
* make sure to account for first output being chanced
* use XSTR directly
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common')
-rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java index eccdc64f70..a08df17367 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java @@ -24,6 +24,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.objects.XSTR; import gregtech.api.util.GT_Multiblock_Tooltip_Builder; import gregtech.api.util.GT_ParallelHelper; import gregtech.api.util.GT_Recipe; @@ -138,11 +139,10 @@ public class GregtechMetaTileEntity_SteamMacerator public GT_ParallelHelper createParallelHelper(@Nonnull GT_Recipe recipe) { return super.createParallelHelper(recipe).setCustomItemOutputCalculation(parallel -> { ArrayList<ItemStack> items = new ArrayList<>(); - ItemStack output = recipe.getOutput(0); - if (output != null) { - output = output.copy(); - output.stackSize *= parallel; - items.add(output); + for (int i = 0; i < parallel; i++) { + if (recipe.getOutputChance(0) > XSTR.XSTR_INSTANCE.nextInt(10000)) { + items.add(recipe.getOutput(0)); + } } return items.toArray(new ItemStack[0]); }); |