Skip to content

Commit e54d7ce

Browse files
fixing byproduct multiplier
1 parent 3df32ff commit e54d7ce

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ private static void processOre(@NotNull Consumer<FinishedRecipe> provider, @NotN
7878
}
7979

8080
Material byproductMaterial = property.getOreByProduct(0, material);
81-
ItemStack byproductStack = ChemicalHelper.get(gem, byproductMaterial);
81+
ItemStack byproductStack = ChemicalHelper.get(gem, byproductMaterial, property.getByProductMultiplier());
8282
if (byproductStack.isEmpty()) {
83-
byproductStack = ChemicalHelper.get(dust, byproductMaterial);
83+
byproductStack = ChemicalHelper.get(dust, byproductMaterial, property.getByProductMultiplier());
8484
}
8585

8686
Material smeltingMaterial = property.getDirectSmeltResult().isNull() ? material :
@@ -159,9 +159,9 @@ private static void processRawOre(@NotNull Consumer<FinishedRecipe> provider, @N
159159
}
160160

161161
Material byproductMaterial = property.getOreByProduct(0, material);
162-
ItemStack byproductStack = ChemicalHelper.get(gem, byproductMaterial);
162+
ItemStack byproductStack = ChemicalHelper.get(gem, byproductMaterial, property.getByProductMultiplier());
163163
if (byproductStack.isEmpty()) {
164-
byproductStack = ChemicalHelper.get(dust, byproductMaterial);
164+
byproductStack = ChemicalHelper.get(dust, byproductMaterial, property.getByProductMultiplier());
165165
}
166166

167167
Material smeltingMaterial = property.getDirectSmeltResult().isNull() ? material :
@@ -292,15 +292,15 @@ private static void processCrushedOre(@NotNull Consumer<FinishedRecipe> provider
292292
.inputFluids(Water.getFluid(1000))
293293
.circuitMeta(1)
294294
.outputItems(crushedPurifiedOre)
295-
.chancedOutput(TagPrefix.dust, byproductMaterial, "1/3", 0)
295+
.chancedOutput(TagPrefix.dust, byproductMaterial, property.getByProductMultiplier(), "1/3", 0)
296296
.outputItems(TagPrefix.dust, GTMaterials.Stone)
297297
.save(provider);
298298

299299
ORE_WASHER_RECIPES.recipeBuilder("wash_" + material.getName() + "_crushed_ore_to_purified_ore_distilled")
300300
.inputItems(crushed, material)
301301
.inputFluids(DistilledWater.getFluid(100))
302302
.outputItems(crushedPurifiedOre)
303-
.chancedOutput(TagPrefix.dust, byproductMaterial, "1/3", 0)
303+
.chancedOutput(TagPrefix.dust, byproductMaterial, property.getByProductMultiplier(), "1/3", 0)
304304
.outputItems(TagPrefix.dust, GTMaterials.Stone)
305305
.duration(200)
306306
.save(provider);
@@ -341,7 +341,7 @@ private static void processCrushedCentrifuged(@NotNull Consumer<FinishedRecipe>
341341
}
342342

343343
ItemStack dustStack = ChemicalHelper.get(dust, material);
344-
ItemStack byproductStack = ChemicalHelper.get(dust, property.getOreByProduct(2, material), 1);
344+
ItemStack byproductStack = ChemicalHelper.get(dust, property.getOreByProduct(2, material), property.getByProductMultiplier());
345345

346346
FORGE_HAMMER_RECIPES.recipeBuilder("hammer_" + material.getName() + "_refined_ore_to_dust")
347347
.inputItems(crushedRefined, material)
@@ -375,7 +375,7 @@ private static void processCrushedPurified(@NotNull Consumer<FinishedRecipe> pro
375375
ItemStack crushedCentrifugedStack = ChemicalHelper.get(crushedRefined, material);
376376
ItemStack dustStack = ChemicalHelper.get(dustPure, material);
377377
Material byproductMaterial = property.getOreByProduct(1, material);
378-
ItemStack byproductStack = ChemicalHelper.get(dust, byproductMaterial);
378+
ItemStack byproductStack = ChemicalHelper.get(dust, byproductMaterial, property.getByProductMultiplier());
379379

380380
FORGE_HAMMER_RECIPES.recipeBuilder("hammer_" + material.getName() + "_crushed_ore_to_dust")
381381
.inputItems(crushedPurified, material)
@@ -402,16 +402,16 @@ private static void processCrushedPurified(@NotNull Consumer<FinishedRecipe> pro
402402
.recipeBuilder("centrifuge_" + material.getName() + "_purified_ore_to_refined_ore")
403403
.inputItems(crushedPurified, material)
404404
.outputItems(crushedCentrifugedStack)
405-
.chancedOutput(TagPrefix.dust, byproductMaterial, "1/3", 0)
405+
.chancedOutput(TagPrefix.dust, byproductMaterial, property.getByProductMultiplier(), "1/3", 0)
406406
.save(provider);
407407
}
408408

409409
if (material.hasProperty(PropertyKey.GEM)) {
410-
ItemStack exquisiteStack = ChemicalHelper.get(gemExquisite, material);
411-
ItemStack flawlessStack = ChemicalHelper.get(gemFlawless, material);
412-
ItemStack gemStack = ChemicalHelper.get(gem, material);
413-
ItemStack flawedStack = ChemicalHelper.get(gemFlawed, material);
414-
ItemStack chippedStack = ChemicalHelper.get(gemChipped, material);
410+
ItemStack exquisiteStack = ChemicalHelper.get(gemExquisite, material, property.getByProductMultiplier());
411+
ItemStack flawlessStack = ChemicalHelper.get(gemFlawless, material, property.getByProductMultiplier());
412+
ItemStack gemStack = ChemicalHelper.get(gem, material, property.getByProductMultiplier());
413+
ItemStack flawedStack = ChemicalHelper.get(gemFlawed, material, property.getByProductMultiplier());
414+
ItemStack chippedStack = ChemicalHelper.get(gemChipped, material, property.getByProductMultiplier());
415415

416416
if (material.hasFlag(HIGH_SIFTER_OUTPUT)) {
417417
GTRecipeBuilder builder = SIFTER_RECIPES
@@ -466,7 +466,7 @@ private static void processDirtyDust(@NotNull Consumer<FinishedRecipe> provider,
466466
.duration((int) (material.getMass() * 4)).EUt(24);
467467

468468
if (byproduct.hasProperty(PropertyKey.DUST)) {
469-
builder.chancedOutput(TagPrefix.dust, byproduct, "1/9", 0);
469+
builder.chancedOutput(TagPrefix.dust, byproduct, property.getByProductMultiplier(), "1/9", 0);
470470
} else {
471471
builder.outputFluids(byproduct.getFluid(L / 9));
472472
}
@@ -499,12 +499,12 @@ private static void processPureDust(@NotNull Consumer<FinishedRecipe> provider,
499499
separatedMaterial.get(separatedMaterial.size() - 1).hasProperty(PropertyKey.INGOT)) ? nugget : dust;
500500

501501
ItemStack separatedStack2 = ChemicalHelper.get(prefix, separatedMaterial.get(separatedMaterial.size() - 1),
502-
prefix == nugget ? 2 : 1);
502+
prefix == nugget ? 2 * property.getByProductMultiplier() : property.getByProductMultiplier());
503503

504504
ELECTROMAGNETIC_SEPARATOR_RECIPES.recipeBuilder("separate_" + material.getName() + "_pure_dust_to_dust")
505505
.inputItems(dustPure, material)
506506
.outputItems(dustStack)
507-
.chancedOutput(TagPrefix.dust, separatedMaterial.get(0), 1000, 250)
507+
.chancedOutput(TagPrefix.dust, separatedMaterial.get(0), property.getByProductMultiplier(), 1000, 250)
508508
.chancedOutput(separatedStack2, prefix == TagPrefix.dust ? 500 : 2000,
509509
prefix == TagPrefix.dust ? 150 : 600)
510510
.duration(200).EUt(24)
@@ -514,7 +514,7 @@ private static void processPureDust(@NotNull Consumer<FinishedRecipe> provider,
514514
CENTRIFUGE_RECIPES.recipeBuilder("centrifuge_" + material.getName() + "_pure_dust_to_dust")
515515
.inputItems(dustPure, material)
516516
.outputItems(dustStack)
517-
.chancedOutput(TagPrefix.dust, byproductMaterial, "1/9", 0)
517+
.chancedOutput(TagPrefix.dust, byproductMaterial, property.getByProductMultiplier(), "1/9", 0)
518518
.duration(100)
519519
.EUt(5)
520520
.save(provider);

src/main/java/com/gregtechceu/gtceu/integration/xei/widgets/GTOreByProduct.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,9 @@ public GTOreByProduct(Material material) {
172172
// macerate ore -> crushed
173173
addToOutputs(material, TagPrefix.crushed, 2 * oreMultiplier);
174174
if (!ChemicalHelper.get(TagPrefix.gem, byproducts[0]).isEmpty()) {
175-
addToOutputs(byproducts[0], TagPrefix.gem, 1);
175+
addToOutputs(byproducts[0], TagPrefix.gem, byproductMultiplier);
176176
} else {
177-
addToOutputs(byproducts[0], TagPrefix.dust, 1);
177+
addToOutputs(byproducts[0], TagPrefix.dust, byproductMultiplier);
178178
}
179179
addChance(1400, 850);
180180

@@ -185,12 +185,12 @@ public GTOreByProduct(Material material) {
185185

186186
// centrifuge impure -> dust
187187
addToOutputs(material, TagPrefix.dust, 1);
188-
addToOutputs(byproducts[0], TagPrefix.dust, 1);
188+
addToOutputs(byproducts[0], TagPrefix.dust, byproductMultiplier);
189189
addChance(1111, 0);
190190

191191
// ore wash crushed -> crushed purified
192192
addToOutputs(material, TagPrefix.crushedPurified, 1);
193-
addToOutputs(byproducts[0], TagPrefix.dust, 1);
193+
addToOutputs(byproducts[0], TagPrefix.dust, byproductMultiplier);
194194
addChance(3333, 0);
195195
FluidTagList tagList = new FluidTagList();
196196
tagList.add(GTMaterials.Water.getFluidTag(), 1000, null);
@@ -204,17 +204,17 @@ public GTOreByProduct(Material material) {
204204

205205
// macerate centrifuged -> dust
206206
addToOutputs(material, TagPrefix.dust, 1);
207-
addToOutputs(byproducts[2], TagPrefix.dust, 1);
207+
addToOutputs(byproducts[2], TagPrefix.dust, byproductMultiplier);
208208
addChance(1400, 850);
209209

210210
// macerate crushed purified -> purified
211211
addToOutputs(material, TagPrefix.dustPure, 1);
212-
addToOutputs(byproducts[1], TagPrefix.dust, 1);
212+
addToOutputs(byproducts[1], TagPrefix.dust, byproductMultiplier);
213213
addChance(1400, 850);
214214

215215
// centrifuge purified -> dust
216216
addToOutputs(material, TagPrefix.dust, 1);
217-
addToOutputs(byproducts[1], TagPrefix.dust, 1);
217+
addToOutputs(byproducts[1], TagPrefix.dust, byproductMultiplier);
218218
addChance(1111, 0);
219219

220220
// cauldron/simple washer
@@ -245,10 +245,10 @@ public GTOreByProduct(Material material) {
245245
separatedInto.get(separatedInto.size() - 1).hasProperty(PropertyKey.INGOT)) ? TagPrefix.nugget :
246246
TagPrefix.dust;
247247
ItemStack separatedStack2 = ChemicalHelper.get(prefix, separatedInto.get(separatedInto.size() - 1),
248-
prefix == TagPrefix.nugget ? 2 : 1);
248+
prefix == TagPrefix.nugget ? 2 * byproductMultiplier: byproductMultiplier);
249249

250250
addToOutputs(material, TagPrefix.dust, 1);
251-
addToOutputs(separatedInto.get(0), TagPrefix.dust, 1);
251+
addToOutputs(separatedInto.get(0), TagPrefix.dust, byproductMultiplier);
252252
addChance(1000, 250);
253253
addToOutputs(separatedStack2);
254254
addChance(prefix == TagPrefix.dust ? 500 : 2000, prefix == TagPrefix.dust ? 150 : 600);
@@ -259,16 +259,16 @@ public GTOreByProduct(Material material) {
259259
// sifter
260260
if (hasSifter) {
261261
boolean highOutput = material.hasFlag(MaterialFlags.HIGH_SIFTER_OUTPUT);
262-
ItemStack flawedStack = ChemicalHelper.get(TagPrefix.gemFlawed, material);
263-
ItemStack chippedStack = ChemicalHelper.get(TagPrefix.gemChipped, material);
262+
ItemStack flawedStack = ChemicalHelper.get(TagPrefix.gemFlawed, material, byproductMultiplier);
263+
ItemStack chippedStack = ChemicalHelper.get(TagPrefix.gemChipped, material, byproductMultiplier);
264264

265-
addToOutputs(material, TagPrefix.gemExquisite, 1);
265+
addToOutputs(material, TagPrefix.gemExquisite, byproductMultiplier);
266266
addGemChance(300, 100, 500, 150, highOutput);
267-
addToOutputs(material, TagPrefix.gemFlawless, 1);
267+
addToOutputs(material, TagPrefix.gemFlawless, byproductMultiplier);
268268
addGemChance(1000, 150, 1500, 200, highOutput);
269-
addToOutputs(material, TagPrefix.gem, 1);
269+
addToOutputs(material, TagPrefix.gem, byproductMultiplier);
270270
addGemChance(3500, 500, 5000, 1000, highOutput);
271-
addToOutputs(material, TagPrefix.dustPure, 1);
271+
addToOutputs(material, TagPrefix.dustPure, byproductMultiplier);
272272
addGemChance(5000, 750, 2500, 500, highOutput);
273273

274274
if (!flawedStack.isEmpty()) {

0 commit comments

Comments
 (0)