diff --git a/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeTypes.java b/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeTypes.java index a9b453bfff..4db1237bda 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeTypes.java +++ b/src/main/java/com/gregtechceu/gtceu/common/data/GTRecipeTypes.java @@ -97,6 +97,7 @@ public class GTRecipeTypes { .setMaxIOSize(2, 1, 0, 0).setEUIO(IO.IN) .setSlotOverlay(false, false, GuiTextures.FURNACE_OVERLAY_1) .setProgressBar(GuiTextures.PROGRESS_BAR_ARROW, LEFT_TO_RIGHT) + .setIconSupplier(() -> GTMachines.ALLOY_SMELTER[GTValues.LV].asStack()) .setSteamProgressBar(GuiTextures.PROGRESS_BAR_ARROW_STEAM, LEFT_TO_RIGHT) .setSound(GTSoundEntries.FURNACE); @@ -144,6 +145,7 @@ public class GTRecipeTypes { .setSlotOverlay(false, false, GuiTextures.CRUSHED_ORE_OVERLAY) .setSlotOverlay(true, false, GuiTextures.DUST_OVERLAY) .setProgressBar(GuiTextures.PROGRESS_BAR_MACERATE, LEFT_TO_RIGHT) + .setIconSupplier(() -> GTMachines.MACERATOR[GTValues.LV].asStack()) .setSteamProgressBar(GuiTextures.PROGRESS_BAR_MACERATE_STEAM, LEFT_TO_RIGHT) .setSound(GTSoundEntries.MACERATOR); @@ -195,6 +197,7 @@ public class GTRecipeTypes { .prepareBuilder(recipeBuilder -> recipeBuilder.duration(200).EUt(2)) .setSlotOverlay(false, false, GuiTextures.COMPRESSOR_OVERLAY) .setProgressBar(GuiTextures.PROGRESS_BAR_COMPRESS, LEFT_TO_RIGHT) + .setIconSupplier(() -> GTMachines.COMPRESSOR[GTValues.LV].asStack()) .setSteamProgressBar(GuiTextures.PROGRESS_BAR_COMPRESS_STEAM, LEFT_TO_RIGHT) .setSound(GTSoundEntries.COMPRESSOR); @@ -263,6 +266,7 @@ public class GTRecipeTypes { .prepareBuilder(recipeBuilder -> recipeBuilder.duration(400).EUt(2)) .setSlotOverlay(false, false, GuiTextures.EXTRACTOR_OVERLAY) .setProgressBar(GuiTextures.PROGRESS_BAR_EXTRACT, LEFT_TO_RIGHT) + .setIconSupplier(() -> GTMachines.EXTRACTOR[GTValues.LV].asStack()) .setSteamProgressBar(GuiTextures.PROGRESS_BAR_EXTRACT_STEAM, LEFT_TO_RIGHT); public final static GTRecipeType EXTRUDER_RECIPES = register("extruder", ELECTRIC).setMaxIOSize(2, 1, 0, 0) @@ -297,6 +301,7 @@ public class GTRecipeTypes { .setEUIO(IO.IN) .setSlotOverlay(false, false, GuiTextures.HAMMER_OVERLAY) .setProgressBar(GuiTextures.PROGRESS_BAR_HAMMER, UP_TO_DOWN) + .setIconSupplier(() -> GTMachines.FORGE_HAMMER[GTValues.LV].asStack()) .setSteamProgressBar(GuiTextures.PROGRESS_BAR_HAMMER_STEAM, UP_TO_DOWN) .setSound(GTSoundEntries.FORGE_HAMMER); @@ -411,6 +416,7 @@ public class GTRecipeTypes { .setSlotOverlay(false, false, GuiTextures.DUST_OVERLAY) .setSlotOverlay(true, false, GuiTextures.CRUSHED_ORE_OVERLAY) .setProgressBar(GuiTextures.PROGRESS_BAR_MACERATE, LEFT_TO_RIGHT) + .setIconSupplier(() -> GTMachines.ROCK_CRUSHER[GTValues.LV].asStack()) .setSteamProgressBar(GuiTextures.PROGRESS_BAR_MACERATE_STEAM, LEFT_TO_RIGHT) .prepareBuilder(recipeBuilder -> recipeBuilder.addCondition(RockBreakerCondition.INSTANCE)) .setUiBuilder((recipe, widgetGroup) -> { diff --git a/src/main/java/com/gregtechceu/gtceu/core/MixinHelpers.java b/src/main/java/com/gregtechceu/gtceu/core/MixinHelpers.java index a4292b12f2..cd4cdf1db0 100644 --- a/src/main/java/com/gregtechceu/gtceu/core/MixinHelpers.java +++ b/src/main/java/com/gregtechceu/gtceu/core/MixinHelpers.java @@ -195,10 +195,8 @@ public static void generateGTDynamicLoot(Map lootTa LootTable.Builder builder = BlockLootSubProvider.createSilkTouchDispatchTable(block, BLOCK_LOOT.applyExplosionDecay(block, LootItem.lootTableItem(dropItem.getItem()) - .apply(SetItemCountFunction.setCount(UniformGenerator.between(1, - Math.max(1, - material.getProperty(PropertyKey.ORE).getOreMultiplier() * - oreMultiplier)))))); + .apply(SetItemCountFunction.setCount( + UniformGenerator.between(1, Math.max(1, oreMultiplier)))))); // .apply(ApplyBonusCount.addOreBonusCount(Enchantments.BLOCK_FORTUNE)))); //disable fortune for // balance reasons. (for now, until we can think of a better solution.) diff --git a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java index 4f75ea2733..e3f008c896 100644 --- a/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java +++ b/src/main/java/com/gregtechceu/gtceu/data/recipe/generated/OreRecipeHandler.java @@ -147,16 +147,20 @@ public static void processOre(TagPrefix orePrefix, Material material, OrePropert public static void processRawOre(TagPrefix orePrefix, Material material, OreProperty property, Consumer provider) { - ItemStack crushedStack = ChemicalHelper.get(crushed, material); + ItemStack crushedStack = ChemicalHelper.get(crushed, material, + material.getProperty(PropertyKey.ORE).getOreMultiplier()); ItemStack ingotStack; Material smeltingMaterial = property.getDirectSmeltResult() == null ? material : property.getDirectSmeltResult(); if (smeltingMaterial.hasProperty(PropertyKey.INGOT)) { - ingotStack = ChemicalHelper.get(ingot, smeltingMaterial); + ingotStack = ChemicalHelper.get(ingot, smeltingMaterial, + material.getProperty(PropertyKey.ORE).getOreMultiplier()); } else if (smeltingMaterial.hasProperty(PropertyKey.GEM)) { - ingotStack = ChemicalHelper.get(gem, smeltingMaterial); + ingotStack = ChemicalHelper.get(gem, smeltingMaterial, + material.getProperty(PropertyKey.ORE).getOreMultiplier()); } else { - ingotStack = ChemicalHelper.get(dust, smeltingMaterial); + ingotStack = ChemicalHelper.get(dust, smeltingMaterial, + material.getProperty(PropertyKey.ORE).getOreMultiplier()); } if (!crushedStack.isEmpty()) { @@ -171,16 +175,29 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp } builder.save(provider); - MACERATOR_RECIPES + GTRecipeBuilder builder2 = MACERATOR_RECIPES .recipeBuilder("macerate_" + orePrefix.name + "_" + material.getName() + "_ore_to_crushed_ore") .inputItems(orePrefix, material) - .outputItems(crushedStack) - .chancedOutput(crushedStack, 5000, 750) - .chancedOutput(crushedStack, 2500, 500) - .chancedOutput(crushedStack, 1250, 250) + .outputItems(GTUtil.copyAmount(crushedStack.getCount() * 2, crushedStack)) .EUt(2) - .duration(400) - .save(provider); + .duration(400); + + Material byproductMaterial = GTUtil.selectItemInList(0, material, property.getOreByProducts(), + Material.class); + ItemStack byproductStack = ChemicalHelper.get(gem, byproductMaterial); + if (byproductStack.isEmpty()) { + byproductStack = ChemicalHelper.get(dust, byproductMaterial); + } + builder2.chancedOutput(byproductStack, 1000, 300); + + for (MaterialStack secondaryMaterial : ore.secondaryMaterials()) { + if (secondaryMaterial.material().hasProperty(PropertyKey.DUST)) { + ItemStack dustStack = ChemicalHelper.getGem(secondaryMaterial); + builder2.chancedOutput(dustStack, 500, 100); + break; + } + } + builder2.save(provider); } // do not try to add smelting recipes for materials which require blast furnace, or don't have smelting recipes @@ -189,10 +206,12 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp float xp = Math.round(((1 + property.getOreMultiplier() * 0.33f) / 3) * 10f) / 10f; VanillaRecipeHelper.addSmeltingRecipe(provider, "smelt_" + orePrefix.name + "_" + material.getName() + "_ore_to_ingot", - ChemicalHelper.getTag(orePrefix, material), ingotStack, xp); + ChemicalHelper.getTag(orePrefix, material), GTUtil.copyAmount(ingotStack.getCount(), ingotStack), + xp); VanillaRecipeHelper.addBlastingRecipe(provider, "smelt_" + orePrefix.name + "_" + material.getName() + "_ore_to_ingot", - ChemicalHelper.getTag(orePrefix, material), ingotStack, xp); + ChemicalHelper.getTag(orePrefix, material), GTUtil.copyAmount(ingotStack.getCount(), ingotStack), + xp); } if (!ConfigHolder.INSTANCE.recipes.disableManualCompression) { @@ -203,11 +222,11 @@ public static void processRawOre(TagPrefix orePrefix, Material material, OreProp VanillaRecipeHelper.addShapelessRecipe(provider, "decompress_" + material.getName() + "_from_ore_block", ChemicalHelper.get(rawOre, material, 9), ChemicalHelper.getTag(rawOreBlock, material)); - COMPRESSOR_RECIPES.recipeBuilder("compress_" + material.getName() + "to_ore_block") - .inputItems(rawOre, material, 9) - .outputItems(rawOreBlock, material) - .duration(300).EUt(2).save(provider); } + COMPRESSOR_RECIPES.recipeBuilder("compress_" + material.getName() + "to_ore_block") + .inputItems(rawOre, material, 9) + .outputItems(rawOreBlock, material) + .duration(300).EUt(2).save(provider); } public static void processCrushedOre(TagPrefix crushedPrefix, Material material, OreProperty property,