Skip to content

Commit

Permalink
don't generate ABS recipes with > 9 dusts
Browse files Browse the repository at this point in the history
  • Loading branch information
kumquat-ir committed Nov 10, 2024
1 parent 606cd63 commit 4c1e7bb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,14 @@ protected int addInputs(@NotNull Material material, @NotNull RecipeBuilder<Blast
// calculate the output amount and add inputs
int outputAmount = 0;
int fluidAmount = 0;
int dustAmount = 0;
for (MaterialStack materialStack : material.getMaterialComponents()) {
final Material msMat = materialStack.material;
final int msAmount = (int) materialStack.amount;

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

0 comments on commit 4c1e7bb

Please sign in to comment.