Skip to content

Commit bf573dd

Browse files
authored
don't generate ABS recipes with > 9 dusts (#79)
1 parent 606cd63 commit bf573dd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/gregicality/multiblocks/api/recipes/alloyblast/AlloyBlastRecipeProducer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ protected int addInputs(@NotNull Material material, @NotNull RecipeBuilder<Blast
9898
// calculate the output amount and add inputs
9999
int outputAmount = 0;
100100
int fluidAmount = 0;
101+
int dustAmount = 0;
101102
for (MaterialStack materialStack : material.getMaterialComponents()) {
102103
final Material msMat = materialStack.material;
103104
final int msAmount = (int) materialStack.amount;
104105

105106
if (msMat.hasProperty(PropertyKey.DUST)) {
107+
if (dustAmount >= 9) return -1; // more than 9 dusts won't fit in the machine
108+
dustAmount++;
106109
builder.input(OrePrefix.dust, msMat, msAmount);
107110
} else if (msMat.hasProperty(PropertyKey.FLUID)) {
108111
if (fluidAmount >= 2) return -1; // more than 2 fluids won't fit in the machine

0 commit comments

Comments
 (0)