Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/fixSteamGrinderBonusOutput' into…
Browse files Browse the repository at this point in the history
… dev
  • Loading branch information
Dream-Master committed Jul 26, 2023
2 parents e4d9d98 + 157d69f commit c58127c
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import static gregtech.api.GregTech_API.sBlockCasings1;
import static gregtech.api.util.GT_StructureUtility.buildHatchAdder;

import java.util.ArrayList;

import javax.annotation.Nonnull;

import net.minecraft.item.ItemStack;

import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable;
Expand All @@ -18,8 +22,10 @@
import gregtech.api.enums.Textures;
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.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_ParallelHelper;
import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_SteamMultiBase;
Expand Down Expand Up @@ -123,4 +129,24 @@ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
return GT_Recipe.GT_Recipe_Map.sMaceratorRecipes;
}

@Override
protected ProcessingLogic createProcessingLogic() {
return new ProcessingLogic() {

@Override
@Nonnull
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);
}
return items.toArray(new ItemStack[0]);
});
}
};
}
}

0 comments on commit c58127c

Please sign in to comment.