From d41d6e83b8e93f7c538af110187c84c7dcab34e6 Mon Sep 17 00:00:00 2001 From: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Date: Sun, 29 Jan 2023 05:29:30 +0000 Subject: Small fixes --- .../com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java index ae85d9dbf1..fe4e0227d0 100644 --- a/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java +++ b/src/main/java/com/github/technus/tectech/recipe/EyeOfHarmonyRecipe.java @@ -14,6 +14,9 @@ import gregtech.api.enums.Materials; import java.util.*; import java.util.stream.Collectors; import java.util.stream.Stream; + +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; @@ -103,12 +106,15 @@ public class EyeOfHarmonyRecipe { this.recipeTriggerItem = new ItemStack(block); this.outputItems = validDustGenerator(materialList); - // this.outputItems.sort(Comparator.comparingLong(ItemStackLong::getStackSize)); - // Collections.reverse(this.outputItems); this.sumOfItems = this.outputItems.stream().map(ItemStackLong::getStackSize).reduce(0L, Long::sum); + this.outputItems.add(new ItemStackLong(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1), this.sumOfItems * 3)); + this.outputItems.sort(Comparator.comparingLong(ItemStackLong::getStackSize)); + Collections.reverse(this.outputItems); + + for (ItemStackLong itemStackLong : outputItems) { double stackSize = (double) itemStackLong.getStackSize(); double probability = Math.round(100_000 * stackSize / sumOfItems) / 1000.0; -- cgit