Search in sources :

Example 1 with ModLoadedCondition

use of net.minecraftforge.common.crafting.conditions.ModLoadedCondition in project TinkersConstruct by SlimeKnights.

the class SmelteryRecipeProvider method addSmelteryRecipes.

private void addSmelteryRecipes(Consumer<FinishedRecipe> consumer) {
    String folder = "smeltery/seared/";
    // grout crafting
    ShapelessRecipeBuilder.shapeless(TinkerSmeltery.grout, 2).requires(Items.CLAY_BALL).requires(ItemTags.SAND).requires(Blocks.GRAVEL).unlockedBy("has_item", has(Items.CLAY_BALL)).save(consumer, prefix(TinkerSmeltery.grout, folder));
    ShapelessRecipeBuilder.shapeless(TinkerSmeltery.grout, 8).requires(Blocks.CLAY).requires(ItemTags.SAND).requires(ItemTags.SAND).requires(ItemTags.SAND).requires(ItemTags.SAND).requires(Blocks.GRAVEL).requires(Blocks.GRAVEL).requires(Blocks.GRAVEL).requires(Blocks.GRAVEL).unlockedBy("has_item", has(Blocks.CLAY)).save(consumer, wrap(TinkerSmeltery.grout, folder, "_multiple"));
    // seared bricks from grout
    SimpleCookingRecipeBuilder.smelting(Ingredient.of(TinkerSmeltery.grout), TinkerSmeltery.searedBrick, 0.3f, 200).unlockedBy("has_item", has(TinkerSmeltery.grout)).save(consumer, prefix(TinkerSmeltery.searedBrick, folder));
    Consumer<Consumer<FinishedRecipe>> fastGrout = c -> SimpleCookingRecipeBuilder.blasting(Ingredient.of(TinkerSmeltery.grout), TinkerSmeltery.searedBrick, 0.3f, 100).unlockedBy("has_item", has(TinkerSmeltery.grout)).save(c);
    ConditionalRecipe.builder().addCondition(new ModLoadedCondition("ceramics")).addRecipe(c -> fastGrout.accept(ConsumerWrapperBuilder.wrap(new ResourceLocation("ceramics", "kiln")).build(c))).addCondition(TrueCondition.INSTANCE).addRecipe(fastGrout).generateAdvancement().build(consumer, wrap(TinkerSmeltery.searedBrick, folder, "_kiln"));
    // block from bricks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedBricks).define('b', TinkerSmeltery.searedBrick).pattern("bb").pattern("bb").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, wrap(TinkerSmeltery.searedBricks, folder, "_from_brick"));
    // ladder from bricks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedLadder, 4).define('b', TinkerSmeltery.searedBrick).define('B', TinkerTags.Items.SEARED_BRICKS).pattern("b b").pattern("b b").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, prefix(TinkerSmeltery.searedLadder, folder));
    // cobble -> stone
    SimpleCookingRecipeBuilder.smelting(Ingredient.of(TinkerSmeltery.searedCobble.get()), TinkerSmeltery.searedStone, 0.1f, 200).unlockedBy("has_item", has(TinkerSmeltery.searedCobble.get())).save(consumer, wrap(TinkerSmeltery.searedStone, folder, "_smelting"));
    // stone -> paver
    SimpleCookingRecipeBuilder.smelting(Ingredient.of(TinkerSmeltery.searedStone.get()), TinkerSmeltery.searedPaver, 0.1f, 200).unlockedBy("has_item", has(TinkerSmeltery.searedStone.get())).save(consumer, wrap(TinkerSmeltery.searedPaver, folder, "_smelting"));
    // stone -> bricks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedBricks, 4).define('b', TinkerSmeltery.searedStone).pattern("bb").pattern("bb").unlockedBy("has_item", has(TinkerSmeltery.searedStone)).save(consumer, wrap(TinkerSmeltery.searedBricks, folder, "_crafting"));
    // bricks -> cracked
    SimpleCookingRecipeBuilder.smelting(Ingredient.of(TinkerSmeltery.searedBricks), TinkerSmeltery.searedCrackedBricks, 0.1f, 200).unlockedBy("has_item", has(TinkerSmeltery.searedBricks)).save(consumer, wrap(TinkerSmeltery.searedCrackedBricks, folder, "_smelting"));
    // brick slabs -> fancy
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedFancyBricks).define('s', TinkerSmeltery.searedBricks.getSlab()).pattern("s").pattern("s").unlockedBy("has_item", has(TinkerSmeltery.searedBricks.getSlab())).save(consumer, wrap(TinkerSmeltery.searedFancyBricks, folder, "_crafting"));
    // bricks or stone as input
    this.searedStonecutter(consumer, TinkerSmeltery.searedBricks, folder);
    this.searedStonecutter(consumer, TinkerSmeltery.searedFancyBricks, folder);
    this.searedStonecutter(consumer, TinkerSmeltery.searedTriangleBricks, folder);
    // seared glass
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedGlass).define('b', TinkerSmeltery.searedBrick).define('G', Tags.Items.GLASS_COLORLESS).pattern(" b ").pattern("bGb").pattern(" b ").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, prefix(TinkerSmeltery.searedGlass, folder));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedGlassPane, 16).define('#', TinkerSmeltery.searedGlass).pattern("###").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.searedGlass)).save(consumer, prefix(TinkerSmeltery.searedGlassPane, folder));
    // stairs and slabs
    this.slabStairsCrafting(consumer, TinkerSmeltery.searedStone, folder, true);
    this.stairSlabWallCrafting(consumer, TinkerSmeltery.searedCobble, folder, true);
    this.slabStairsCrafting(consumer, TinkerSmeltery.searedPaver, folder, true);
    this.stairSlabWallCrafting(consumer, TinkerSmeltery.searedBricks, folder, true);
    // tanks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedTank.get(TankType.FUEL_TANK)).define('#', TinkerSmeltery.searedBrick).define('B', Tags.Items.GLASS).pattern("###").pattern("#B#").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "fuel_tank"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedTank.get(TankType.FUEL_GAUGE)).define('#', TinkerSmeltery.searedBrick).define('B', Tags.Items.GLASS).pattern("#B#").pattern("BBB").pattern("#B#").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "fuel_gauge"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedTank.get(TankType.INGOT_TANK)).define('#', TinkerSmeltery.searedBrick).define('B', Tags.Items.GLASS).pattern("#B#").pattern("#B#").pattern("#B#").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "ingot_tank"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedTank.get(TankType.INGOT_GAUGE)).define('#', TinkerSmeltery.searedBrick).define('B', Tags.Items.GLASS).pattern("B#B").pattern("#B#").pattern("B#B").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "ingot_gauge"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedLantern.get(), 3).define('C', Tags.Items.INGOTS_IRON).define('B', TinkerSmeltery.searedBrick).define('P', TinkerSmeltery.searedGlassPane).pattern(" C ").pattern("PPP").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "lantern"));
    // fluid transfer
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedFaucet.get(), 3).define('#', TinkerSmeltery.searedBrick).pattern("# #").pattern(" # ").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "faucet"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedChannel.get(), 5).define('#', TinkerSmeltery.searedBrick).pattern("# #").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "channel"));
    // casting
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedBasin.get()).define('#', TinkerSmeltery.searedBrick).pattern("# #").pattern("# #").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "basin"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedTable.get()).define('#', TinkerSmeltery.searedBrick).pattern("###").pattern("# #").pattern("# #").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "table"));
    // peripherals
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedDrain).define('#', TinkerSmeltery.searedBrick).define('C', Tags.Items.INGOTS_COPPER).pattern("# #").pattern("C C").pattern("# #").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "drain"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedChute).define('#', TinkerSmeltery.searedBrick).define('C', Tags.Items.INGOTS_COPPER).pattern("#C#").pattern("   ").pattern("#C#").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "chute"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedDuct).define('#', TinkerSmeltery.searedBrick).define('C', TinkerMaterials.cobalt.getIngotTag()).pattern("# #").pattern("C C").pattern("# #").unlockedBy("has_item", has(TinkerMaterials.cobalt.getIngotTag())).save(consumer, modResource(folder + "duct"));
    // controllers
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedMelter).define('G', Ingredient.of(TinkerSmeltery.searedTank.get(TankType.FUEL_GAUGE), TinkerSmeltery.searedTank.get(TankType.INGOT_GAUGE))).define('B', TinkerSmeltery.searedBrick).pattern("BGB").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "melter"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.searedHeater).define('B', TinkerSmeltery.searedBrick).pattern("BBB").pattern("B B").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.searedBrick)).save(consumer, modResource(folder + "heater"));
    // casting
    String castingFolder = "smeltery/casting/seared/";
    ItemCastingRecipeBuilder.basinRecipe(TinkerSmeltery.searedStone).setFluidAndTime(TinkerFluids.searedStone, false, FluidValues.BRICK_BLOCK).save(consumer, modResource(castingFolder + "stone/block_from_seared"));
    this.ingotCasting(consumer, TinkerFluids.searedStone, FluidValues.BRICK, TinkerSmeltery.searedBrick, castingFolder + "brick");
    ItemCastingRecipeBuilder.basinRecipe(TinkerSmeltery.searedGlass).setFluidAndTime(TinkerFluids.searedStone, false, FluidValues.BRICK_BLOCK).setCast(Tags.Items.GLASS_COLORLESS, true).save(consumer, modResource(castingFolder + "glass"));
    // discount for casting panes
    ItemCastingRecipeBuilder.tableRecipe(TinkerSmeltery.searedGlassPane).setFluidAndTime(TinkerFluids.searedStone, false, FluidValues.BRICK).setCast(Tags.Items.GLASS_PANES_COLORLESS, true).save(consumer, modResource(castingFolder + "glass_pane"));
    // smeltery controller
    ItemCastingRecipeBuilder.basinRecipe(TinkerSmeltery.smelteryController).setCast(TinkerSmeltery.searedHeater, true).setFluidAndTime(TinkerFluids.moltenCopper, true, FluidValues.INGOT * 4).save(consumer, prefix(TinkerSmeltery.smelteryController, castingFolder));
    // craft seared stone from clay and stone
    // button is the closest we have to a single stone brick, just go with it, better than not having the recipe
    ItemCastingRecipeBuilder.tableRecipe(TinkerSmeltery.searedBrick).setFluidAndTime(TinkerFluids.moltenClay, false, FluidValues.BRICK / 2).setCast(Items.STONE_BUTTON, true).save(consumer, modResource(castingFolder + "brick_composite"));
    // cobble
    searedCasting(consumer, TinkerSmeltery.searedCobble, CompoundIngredient.from(Ingredient.of(Tags.Items.COBBLESTONE), Ingredient.of(Blocks.GRAVEL)), castingFolder + "cobble/block");
    searedSlabCasting(consumer, TinkerSmeltery.searedCobble.getSlab(), Ingredient.of(Blocks.COBBLESTONE_SLAB), castingFolder + "cobble/slab");
    searedCasting(consumer, TinkerSmeltery.searedCobble.getStairs(), Ingredient.of(Blocks.COBBLESTONE_STAIRS), castingFolder + "cobble/stairs");
    searedCasting(consumer, TinkerSmeltery.searedCobble.getWall(), Ingredient.of(Blocks.COBBLESTONE_WALL), castingFolder + "cobble/wall");
    // stone
    searedCasting(consumer, TinkerSmeltery.searedStone, Ingredient.of(Tags.Items.STONE), castingFolder + "stone/block_from_clay");
    searedSlabCasting(consumer, TinkerSmeltery.searedStone.getSlab(), Ingredient.of(Blocks.STONE_SLAB), castingFolder + "stone/slab");
    searedCasting(consumer, TinkerSmeltery.searedStone.getStairs(), Ingredient.of(Blocks.STONE_STAIRS), castingFolder + "stone/stairs");
    // stone bricks
    searedCasting(consumer, TinkerSmeltery.searedBricks, Ingredient.of(Blocks.STONE_BRICKS), castingFolder + "bricks/block");
    searedSlabCasting(consumer, TinkerSmeltery.searedBricks.getSlab(), Ingredient.of(Blocks.STONE_BRICK_SLAB), castingFolder + "bricks/slab");
    searedCasting(consumer, TinkerSmeltery.searedBricks.getStairs(), Ingredient.of(Blocks.STONE_BRICK_STAIRS), castingFolder + "bricks/stairs");
    searedCasting(consumer, TinkerSmeltery.searedBricks.getWall(), Ingredient.of(Blocks.STONE_BRICK_WALL), castingFolder + "bricks/wall");
    // other seared
    searedCasting(consumer, TinkerSmeltery.searedCrackedBricks, Ingredient.of(Blocks.CRACKED_STONE_BRICKS), castingFolder + "cracked");
    searedCasting(consumer, TinkerSmeltery.searedFancyBricks, Ingredient.of(Blocks.CHISELED_STONE_BRICKS), castingFolder + "chiseled");
    searedCasting(consumer, TinkerSmeltery.searedPaver, Ingredient.of(Blocks.SMOOTH_STONE), castingFolder + "paver");
    // seared blocks
    String meltingFolder = "smeltery/melting/seared/";
    // double efficiency when using smeltery for grout
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.grout), TinkerFluids.searedStone.get(), FluidValues.BRICK * 2, 1.5f).save(consumer, modResource(meltingFolder + "grout"));
    // seared stone
    // stairs are here since the cheapest stair recipe is stone cutter, 1 to 1
    MeltingRecipeBuilder.melting(CompoundIngredient.from(Ingredient.of(TinkerTags.Items.SEARED_BLOCKS), Ingredient.of(TinkerSmeltery.searedLadder, TinkerSmeltery.searedCobble.getWall(), TinkerSmeltery.searedBricks.getWall(), TinkerSmeltery.searedCobble.getStairs(), TinkerSmeltery.searedStone.getStairs(), TinkerSmeltery.searedBricks.getStairs(), TinkerSmeltery.searedPaver.getStairs())), TinkerFluids.searedStone.get(), FluidValues.BRICK_BLOCK, 2.0f).save(consumer, modResource(meltingFolder + "block"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedCobble.getSlab(), TinkerSmeltery.searedStone.getSlab(), TinkerSmeltery.searedBricks.getSlab(), TinkerSmeltery.searedPaver.getSlab()), TinkerFluids.searedStone.get(), FluidValues.BRICK_BLOCK / 2, 1.5f).save(consumer, modResource(meltingFolder + "slab"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedBrick), TinkerFluids.searedStone.get(), FluidValues.BRICK, 1.0f).save(consumer, modResource(meltingFolder + "brick"));
    // melt down smeltery components
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedFaucet, TinkerSmeltery.searedChannel), TinkerFluids.searedStone.get(), FluidValues.BRICK, 1.5f).save(consumer, modResource(meltingFolder + "faucet"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedBasin, TinkerSmeltery.searedTable), TinkerFluids.searedStone.get(), FluidValues.BRICK * 7, 2.5f).save(consumer, modResource(meltingFolder + "casting"));
    // tanks
    MeltingRecipeBuilder.melting(NBTIngredient.from(new ItemStack(TinkerSmeltery.searedTank.get(TankType.FUEL_TANK))), TinkerFluids.searedStone.get(), FluidValues.BRICK * 8, 3f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_BLOCK)).save(consumer, modResource(meltingFolder + "fuel_tank"));
    MeltingRecipeBuilder.melting(NBTIngredient.from(new ItemStack(TinkerSmeltery.searedTank.get(TankType.INGOT_TANK))), TinkerFluids.searedStone.get(), FluidValues.BRICK * 6, 2.5f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_BLOCK * 3)).save(consumer, modResource(meltingFolder + "ingot_tank"));
    MeltingRecipeBuilder.melting(CompoundIngredient.from(NBTIngredient.from(new ItemStack(TinkerSmeltery.searedTank.get(TankType.FUEL_GAUGE))), NBTIngredient.from(new ItemStack(TinkerSmeltery.searedTank.get(TankType.INGOT_GAUGE)))), TinkerFluids.searedStone.get(), FluidValues.BRICK * 4, 2f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_BLOCK * 5)).save(consumer, modResource(meltingFolder + "gauge"));
    MeltingRecipeBuilder.melting(NBTIngredient.from(new ItemStack(TinkerSmeltery.searedLantern)), TinkerFluids.searedStone.get(), FluidValues.BRICK * 2, 1.0f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_PANE)).addByproduct(new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT / 3)).save(consumer, modResource(meltingFolder + "lantern"));
    // glass
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedGlass), TinkerFluids.searedStone.get(), FluidValues.BRICK * 4, 2f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_BLOCK)).save(consumer, modResource(meltingFolder + "glass"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedGlassPane), TinkerFluids.searedStone.get(), FluidValues.BRICK, 1.0f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_PANE)).save(consumer, modResource(meltingFolder + "pane"));
    // controllers
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedMelter), TinkerFluids.searedStone.get(), FluidValues.BRICK * 9, 3.5f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_PANE * 5)).save(consumer, modResource(meltingFolder + "melter"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedHeater), TinkerFluids.searedStone.get(), FluidValues.BRICK * 8, 3f).save(consumer, modResource(meltingFolder + "heater"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.smelteryController), TinkerFluids.moltenCopper.get(), FluidValues.INGOT * 4, 3.5f).addByproduct(new FluidStack(TinkerFluids.searedStone.get(), FluidValues.BRICK * 8)).save(consumer, modResource("smeltery/melting/metal/copper/smeltery_controller"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedDrain, TinkerSmeltery.searedChute), TinkerFluids.moltenCopper.get(), FluidValues.INGOT * 2, 2.5f).addByproduct(new FluidStack(TinkerFluids.searedStone.get(), FluidValues.BRICK * 4)).save(consumer, modResource("smeltery/melting/metal/copper/smeltery_io"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.searedDuct), TinkerFluids.moltenCobalt.get(), FluidValues.INGOT * 2, 2.5f).addByproduct(new FluidStack(TinkerFluids.searedStone.get(), FluidValues.BRICK * 4)).save(consumer, modResource("smeltery/melting/metal/cobalt/seared_duct"));
    // reinforcement - no seared stone as it can also be casted from scorched
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerModifiers.searedReinforcement), TinkerFluids.moltenObsidian.get(), FluidValues.GLASS_PANE).save(consumer, modResource(meltingFolder + "reinforcement"));
}
Also used : ResourceLocation(net.minecraft.resources.ResourceLocation) EntityTypeTags(net.minecraft.tags.EntityTypeTags) Tags(net.minecraftforge.common.Tags) Items(net.minecraft.world.item.Items) SingleItemRecipeBuilder(net.minecraft.data.recipes.SingleItemRecipeBuilder) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) ForgeMod(net.minecraftforge.common.ForgeMod) ItemNameIngredient(slimeknights.mantle.recipe.data.ItemNameIngredient) ICondition(net.minecraftforge.common.crafting.conditions.ICondition) GeodeItemObject(slimeknights.tconstruct.common.registration.GeodeItemObject) TinkerHeadType(slimeknights.tconstruct.world.TinkerHeadType) TinkerWorld(slimeknights.tconstruct.world.TinkerWorld) FluidAttributes(net.minecraftforge.fluids.FluidAttributes) MoldingRecipeBuilder(slimeknights.tconstruct.library.recipe.molding.MoldingRecipeBuilder) TinkerGadgets(slimeknights.tconstruct.gadgets.TinkerGadgets) EntityMeltingRecipeBuilder(slimeknights.tconstruct.library.recipe.entitymelting.EntityMeltingRecipeBuilder) ISmelteryRecipeHelper(slimeknights.tconstruct.library.data.recipe.ISmelteryRecipeHelper) OreRateType(slimeknights.tconstruct.library.recipe.melting.IMeltingContainer.OreRateType) ItemCastingRecipeBuilder(slimeknights.tconstruct.library.recipe.casting.ItemCastingRecipeBuilder) TankType(slimeknights.tconstruct.smeltery.block.component.SearedTankBlock.TankType) ItemTags(net.minecraft.tags.ItemTags) ICommonRecipeHelper(slimeknights.tconstruct.library.data.recipe.ICommonRecipeHelper) SlimeType(slimeknights.tconstruct.shared.block.SlimeType) ItemNameOutput(slimeknights.mantle.recipe.data.ItemNameOutput) TinkerTags(slimeknights.tconstruct.common.TinkerTags) Blocks(net.minecraft.world.level.block.Blocks) ConfigEnabledCondition(slimeknights.tconstruct.common.json.ConfigEnabledCondition) FluidValues(slimeknights.tconstruct.library.recipe.FluidValues) FluidStack(net.minecraftforge.fluids.FluidStack) ItemStack(net.minecraft.world.item.ItemStack) SimpleCookingRecipeBuilder(net.minecraft.data.recipes.SimpleCookingRecipeBuilder) IngredientIntersection(slimeknights.mantle.recipe.ingredient.IngredientIntersection) ShapedRecipeBuilder(net.minecraft.data.recipes.ShapedRecipeBuilder) EntityType(net.minecraft.world.entity.EntityType) ContainerFillingRecipeBuilder(slimeknights.tconstruct.library.recipe.casting.container.ContainerFillingRecipeBuilder) MeltingRecipeBuilder(slimeknights.tconstruct.library.recipe.melting.MeltingRecipeBuilder) TinkerModifiers(slimeknights.tconstruct.tools.TinkerModifiers) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Ingredient(net.minecraft.world.item.crafting.Ingredient) CompoundIngredient(slimeknights.mantle.recipe.data.CompoundIngredient) FluidIngredient(slimeknights.mantle.recipe.ingredient.FluidIngredient) ItemLike(net.minecraft.world.level.ItemLike) ShapelessRecipeBuilder(net.minecraft.data.recipes.ShapelessRecipeBuilder) FluidTagEmptyCondition(slimeknights.mantle.recipe.helper.FluidTagEmptyCondition) BiConsumer(java.util.function.BiConsumer) Fluid(net.minecraft.world.level.material.Fluid) ConditionalRecipe(net.minecraftforge.common.crafting.ConditionalRecipe) Fluids(net.minecraft.world.level.material.Fluids) TinkerMaterials(slimeknights.tconstruct.shared.TinkerMaterials) DataGenerator(net.minecraft.data.DataGenerator) TinkerCommons(slimeknights.tconstruct.shared.TinkerCommons) IngredientDifference(slimeknights.mantle.recipe.ingredient.IngredientDifference) ConsumerWrapperBuilder(slimeknights.mantle.recipe.data.ConsumerWrapperBuilder) IMeltingRecipe(slimeknights.tconstruct.library.recipe.melting.IMeltingRecipe) TinkerFluids(slimeknights.tconstruct.fluids.TinkerFluids) FluidTags(net.minecraft.tags.FluidTags) FinishedRecipe(net.minecraft.data.recipes.FinishedRecipe) EntityIngredient(slimeknights.mantle.recipe.ingredient.EntityIngredient) Consumer(java.util.function.Consumer) TinkerSmeltery(slimeknights.tconstruct.smeltery.TinkerSmeltery) BaseRecipeProvider(slimeknights.tconstruct.common.data.BaseRecipeProvider) BudSize(slimeknights.tconstruct.common.registration.GeodeItemObject.BudSize) NBTIngredient(slimeknights.mantle.recipe.data.NBTIngredient) FluidObject(slimeknights.mantle.registration.object.FluidObject) NotCondition(net.minecraftforge.common.crafting.conditions.NotCondition) TrueCondition(net.minecraftforge.common.crafting.conditions.TrueCondition) NBTNameIngredient(slimeknights.mantle.recipe.data.NBTNameIngredient) AlloyRecipeBuilder(slimeknights.tconstruct.library.recipe.alloying.AlloyRecipeBuilder) Block(net.minecraft.world.level.block.Block) ItemOutput(slimeknights.mantle.recipe.helper.ItemOutput) MeltingFuelBuilder(slimeknights.tconstruct.library.recipe.fuel.MeltingFuelBuilder) BiConsumer(java.util.function.BiConsumer) Consumer(java.util.function.Consumer) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) FluidStack(net.minecraftforge.fluids.FluidStack) ResourceLocation(net.minecraft.resources.ResourceLocation) ItemStack(net.minecraft.world.item.ItemStack)

Example 2 with ModLoadedCondition

use of net.minecraftforge.common.crafting.conditions.ModLoadedCondition in project Materialis by RCXcrafter.

the class MaterialisRecipes method buildShapelessRecipes.

public void buildShapelessRecipes(Consumer<IFinishedRecipe> consumer) {
    for (IngotWithBlockNNugget material : MaterialisResources.materialList) {
        blockIngotNuggetCompression(consumer, material.name, material.BLOCK_ITEM.get(), material.INGOT.get(), material.NUGGET.get());
    }
    String castingFolder = "smeltery/casting/metal/";
    String meltingFolder = "smeltery/melting/metal/";
    String alloyFolder = "smeltery/alloys/";
    String materialFolder = "tools/materials/";
    String compositeFolder = "tools/parts/composite/";
    String modifierFolder = "tools/modifiers/";
    String salvageFolder = "tools/modifiers/salvage/";
    String slotlessFolder = "tools/modifiers/slotless/";
    String spillFolder = "tools/spilling/";
    String toolFolder = "tools/building/";
    String partFolder = "tools/parts/";
    String castFolder = "smeltery/casts/";
    String armorFolder = "armor/building/";
    String armorRepairFolder = "armor/repair/";
    metalCasting(consumer, MaterialisResources.FAIRY_FLUID.OBJECT, MaterialisResources.FAIRY_INGOT.BLOCK.get(), MaterialisResources.FAIRY_INGOT.INGOT.get(), MaterialisResources.FAIRY_INGOT.NUGGET.get(), castingFolder, "fairy");
    metalMelting(consumer, MaterialisResources.FAIRY_FLUID.FLUID.get(), "fairy", false, meltingFolder, false);
    // metalCasting(consumer, MaterialisResources.RED_AURUM_FLUID.FLUID, MaterialisResources.RED_AURUM_INGOT.BLOCK.get(), MaterialisResources.RED_AURUM_INGOT.INGOT.get(), MaterialisResources.RED_AURUM_INGOT.NUGGET.get(), metalFolder, "red_aurum");
    // metalMelting(consumer, MaterialisResources.RED_AURUM_FLUID.FLUID.get(), "red_aurum", false, metalFolder, false);
    // metalCasting(consumer, MaterialisResources.DRULLOY_FLUID.FLUID, MaterialisResources.DRULLOY_INGOT.BLOCK.get(), MaterialisResources.DRULLOY_INGOT.INGOT.get(), MaterialisResources.DRULLOY_INGOT.NUGGET.get(), metalFolder, "drulloy");
    // metalMelting(consumer, MaterialisResources.DRULLOY_FLUID.FLUID.get(), "drulloy", false, metalFolder, false);
    // metalCasting(consumer, MaterialisResources.POKEFENNIUM_FLUID.FLUID, MaterialisResources.POKEFENNIUM_INGOT.BLOCK.get(), MaterialisResources.POKEFENNIUM_INGOT.INGOT.get(), MaterialisResources.POKEFENNIUM_INGOT.NUGGET.get(), metalFolder, "pokefennium");
    // metalMelting(consumer, MaterialisResources.POKEFENNIUM_FLUID.FLUID.get(), "pokefennium", false, metalFolder, false);
    // metalCasting(consumer, MaterialisResources.ALUMITE_FLUID.FLUID, MaterialisResources.ALUMITE_INGOT.BLOCK.get(), MaterialisResources.ALUMITE_INGOT.INGOT.get(), MaterialisResources.ALUMITE_INGOT.NUGGET.get(), metalFolder, "alumite");
    // metalMelting(consumer, MaterialisResources.ALUMITE_FLUID.FLUID.get(), "alumite", false, metalFolder, false);
    AlloyRecipeBuilder.alloy(MaterialisResources.FAIRY_FLUID.FLUID.get(), FluidValues.INGOT).addInput(TinkerFluids.moltenGold.get(), FluidValues.INGOT).addInput(TinkerFluids.liquidSoul.get(), FluidValues.GLASS_BLOCK).addInput(Fluids.MILK, 1000).build(consumer, prefix(MaterialisResources.FAIRY_FLUID.FLUID, alloyFolder));
    // wrench stuff
    partRecipes(consumer, MaterialisResources.WRENCH_HEAD, MaterialisResources.WRENCH_HEAD_CAST, 2, partFolder, castFolder);
    toolBuilding(consumer, MaterialisResources.WRENCH, toolFolder);
    toolBuilding(consumer, MaterialisResources.BATTLEWRENCH, toolFolder);
    // create stuff
    metalTagCasting(consumer, MaterialisResources.REFINED_RADIANCE_FLUID.OBJECT, "refined_radiance", castingFolder, false);
    metalMelting(consumer, MaterialisResources.REFINED_RADIANCE_FLUID.FLUID.get(), "refined_radiance", false, meltingFolder, true);
    metalTagCasting(consumer, MaterialisResources.SHADOW_STEEL_FLUID.OBJECT, "shadow_steel", castingFolder, false);
    metalMelting(consumer, MaterialisResources.SHADOW_STEEL_FLUID.FLUID.get(), "shadow_steel", false, meltingFolder, true);
    SpillingRecipeBuilder.forFluid(MaterialisResources.REFINED_RADIANCE_FLUID.FLUID.get(), FluidValues.NUGGET).addEffect(new EffectSpillingEffect(Effects.GLOWING, 800, 1)).build(withCondition(consumer, new ModLoadedCondition("create")), prefix(MaterialisResources.REFINED_RADIANCE_FLUID.FLUID, spillFolder));
    // eidolon stuff
    metalTagCasting(consumer, MaterialisResources.ARCANE_GOLD_FLUID.OBJECT, "arcane_gold", castingFolder, false);
    metalMelting(consumer, MaterialisResources.ARCANE_GOLD_FLUID.FLUID.get(), "arcane_gold", false, meltingFolder, true);
    castCreation(withCondition(consumer, tagConditionDomain("forge", "inlays")), MaterialisItemTags.INLAYS, MaterialisResources.INLAY_CAST, castFolder);
    tagCasting(consumer, TinkerFluids.moltenPewter, FluidValues.INGOT * 2, MaterialisResources.INLAY_CAST, "inlays/pewter", castingFolder + "pewter_inlay", true);
    tagCasting(consumer, MaterialisResources.ARCANE_GOLD_FLUID.OBJECT, FluidValues.INGOT * 2, MaterialisResources.INLAY_CAST, "inlays/arcane_gold", castingFolder + "arcane_gold_inlay", true);
    MeltingRecipeBuilder.melting(Ingredient.of(MaterialisItemTags.PEWTER_INLAY), TinkerFluids.moltenPewter.get(), FluidValues.INGOT * 2, 1.5f).build(withCondition(consumer, tagConditionDomain("forge", "inlays/pewter")), modResource(meltingFolder + "pewter_inlay"));
    MeltingRecipeBuilder.melting(Ingredient.of(MaterialisItemTags.ARCANE_GOLD_INLAY), MaterialisResources.ARCANE_GOLD_FLUID.FLUID.get(), FluidValues.INGOT * 2, 1.5f).build(withCondition(consumer, tagConditionDomain("forge", "inlays/arcane_gold")), modResource(meltingFolder + "arcane_gold_inlay"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(new ResourceLocation("eidolon", "pewter_blend")), TinkerFluids.moltenPewter.get(), FluidValues.INGOT, 1.0f).build(withCondition(consumer, new ModLoadedCondition("eidolon")), modResource(meltingFolder + "pewter_blend"));
    // aquaculture stuff
    metalTagCasting(consumer, MaterialisResources.NEPTUNIUM_FLUID.OBJECT, "neptunium", castingFolder, false);
    metalMelting(consumer, MaterialisResources.NEPTUNIUM_FLUID.FLUID.get(), "neptunium", false, meltingFolder, true);
    toolMelting(withCondition(consumer, new ModLoadedCondition("aquaculture")), new NameFluid("neptunium", MaterialisResources.NEPTUNIUM_FLUID.FLUID.get()), new ToolValue("aquaculture:neptunium_axe", 3), new ToolValue("aquaculture:neptunium_hoe", 2), new ToolValue("aquaculture:neptunium_pickaxe", 3), new ToolValue("aquaculture:neptunium_shovel", 1), new ToolValue("aquaculture:neptunium_sword", 2), new ToolValue("aquaculture:neptunium_bow", 3), new ToolValue("aquaculture:neptunium_fishing_rod", 2), new ToolValue("aquaculture:neptunium_fillet_knife", 2), new ToolValue("aquaculture:neptunium_helmet", 5), new ToolValue("aquaculture:neptunium_chestplate", 8), new ToolValue("aquaculture:neptunium_leggings", 7), new ToolValue("aquaculture:neptunium_boots", 4));
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("aquaculture")), "aquaculture", new NameFluid[] { new NameFluid("iron", TinkerFluids.moltenIron.get()), new NameFluid("gold", TinkerFluids.moltenGold.get()), new NameFluid("diamond", TinkerFluids.moltenDiamond.get()) }, new ToolValue("_fishing_rod", 2), new ToolValue("_fillet_knife", 2));
    // mystical world stuff
    metalTagCasting(consumer, MaterialisResources.QUICKSILVER_FLUID.OBJECT, "quicksilver", castingFolder, false);
    metalMelting(consumer, MaterialisResources.QUICKSILVER_FLUID.FLUID.get(), "quicksilver", true, meltingFolder, true, MaterialisByproduct.ZINC, MaterialisByproduct.TIN);
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("mysticalworld")), "mysticalworld", new NameFluid[] { new NameFluid("copper", TinkerFluids.moltenCopper.get()), new NameFluid("lead", TinkerFluids.moltenLead.get()), new NameFluid("quicksilver", MaterialisResources.QUICKSILVER_FLUID.FLUID.get()), new NameFluid("silver", TinkerFluids.moltenSilver.get()), new NameFluid("tin", TinkerFluids.moltenTin.get()) }, new ToolValue("_axe", 3), new ToolValue("_hoe", 2), new ToolValue("_pickaxe", 3), new ToolValue("_shovel", 1), new ToolValue("_sword", 2), new ToolValue("_knife", 1), new ToolValue("_spear", 2), new ToolValue("_helmet", 5), new ToolValue("_chestplate", 8), new ToolValue("_leggings", 7), new ToolValue("_boots", 4));
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("mysticalworld")), "mysticalworld", new NameFluid[] { new NameFluid("iron", TinkerFluids.moltenIron.get()), new NameFluid("gold", TinkerFluids.moltenGold.get()), new NameFluid("diamond", TinkerFluids.moltenDiamond.get()) }, new ToolValue("_knife", 1), new ToolValue("_spear", 2));
    // astral sorcery stuff
    metalTagCasting(consumer, MaterialisResources.STARMETAL_FLUID.OBJECT, "starmetal", castingFolder, false);
    // the ore recipe is defined manually
    metalMelting(consumer, MaterialisResources.STARMETAL_FLUID.FLUID.get(), "starmetal", false, meltingFolder, true);
    SpillingRecipeBuilder.forFluid(MaterialisFluidTags.LIQUID_STARLIGHT, 50).addEffect(new EffectSpillingEffect(Effects.NIGHT_VISION, 100, 1)).build(withCondition(consumer, new ModLoadedCondition("astralsorcery")), new ResourceLocation(Materialis.modID, spillFolder + "liquid_starlight"));
    // industrial foregoing stuff
    metalTagCasting(consumer, MaterialisResources.PINK_SLIME_FLUID.OBJECT, "pink_slime", castingFolder, false);
    metalMelting(consumer, MaterialisResources.PINK_SLIME_FLUID.FLUID.get(), "pink_slime", false, meltingFolder, true);
    Consumer<IFinishedRecipe> industrialForegoingLoaded = withCondition(consumer, new ModLoadedCondition("industrialforegoing"));
    AlloyRecipeBuilder.alloy(MaterialisResources.PINK_SLIME_FLUID.FLUID.get(), FluidValues.INGOT).addInput(TinkerFluids.moltenGold.get(), FluidValues.INGOT * 2).addInput(TinkerFluids.moltenIron.get(), FluidValues.INGOT * 2).addInput(MaterialisFluidTags.LIQUID_PINK_SLIME, 1000).build(industrialForegoingLoaded, prefix(MaterialisResources.PINK_SLIME_FLUID.FLUID, alloyFolder));
    CookingRecipeBuilder.blasting(Ingredient.of(MaterialisItemTags.PINK_SLIME), MaterialisResources.PINK_SLIME_CRYSTAL.get(), 1.0f, 400).unlockedBy("has_item", has(MaterialisItemTags.PINK_SLIME)).save(industrialForegoingLoaded, new ResourceLocation(Materialis.modID, "pink_slime_crystal_blasting"));
    // undergarden stuff
    metalTagCasting(consumer, MaterialisResources.CLOGGRUM_FLUID.OBJECT, "cloggrum", castingFolder, false);
    metalMelting(consumer, MaterialisResources.CLOGGRUM_FLUID.FLUID.get(), "cloggrum", true, meltingFolder, true, MaterialisByproduct.FROSTSTEEL);
    metalTagCasting(consumer, MaterialisResources.FROSTSTEEL_FLUID.OBJECT, "froststeel", castingFolder, false);
    metalMelting(consumer, MaterialisResources.FROSTSTEEL_FLUID.FLUID.get(), "froststeel", true, meltingFolder, true, MaterialisByproduct.REGALIUM);
    metalTagCasting(consumer, MaterialisResources.UTHERIUM_FLUID.OBJECT, "utherium", castingFolder, false);
    metalMelting(consumer, MaterialisResources.UTHERIUM_FLUID.FLUID.get(), "utherium", false, meltingFolder, true);
    oreMelting(consumer, MaterialisResources.UTHERIUM_FLUID.FLUID.get(), FluidValues.NUGGET, "ores/utherium", 1.5f, meltingFolder + "utherium/ore", true);
    metalTagCasting(consumer, MaterialisResources.FORGOTTEN_FLUID.OBJECT, "forgotten_metal", castingFolder, false);
    metalMelting(consumer, MaterialisResources.FORGOTTEN_FLUID.FLUID.get(), "forgotten_metal", false, meltingFolder, true);
    metalTagCasting(consumer, MaterialisResources.REGALIUM_FLUID.OBJECT, "regalium", castingFolder, false);
    metalMelting(consumer, MaterialisResources.REGALIUM_FLUID.FLUID.get(), "regalium", true, meltingFolder, true, MaterialisByproduct.CLOGGRUM);
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(new ResourceLocation("undergarden", "utheric_shard")), MaterialisResources.UTHERIUM_FLUID.FLUID.get(), FluidValues.NUGGET / 4, 1.0f).build(withCondition(consumer, new ModLoadedCondition("undergarden")), modResource(meltingFolder + "utheric_shard"));
    EntityMeltingRecipeBuilder.melting(EntityIngredient.of(CleansingModifier.rotspawnTag), new FluidStack(MaterialisResources.UTHERIUM_FLUID.FLUID.get(), FluidValues.NUGGET / 8)).build(withCondition(consumer, new ModLoadedCondition("undergarden")));
    SpillingRecipeBuilder.forFluid(MaterialisFluidTags.VIRULENT_MIX, 50).addEffect(new EffectSpillingEffect(Effects.POISON, 50, 1)).build(withCondition(consumer, new ModLoadedCondition("undergarden")), new ResourceLocation(Materialis.modID, spillFolder + "virulent_mix"));
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("undergarden")), "undergarden", new NameFluid[] { new NameFluid("cloggrum", MaterialisResources.CLOGGRUM_FLUID.FLUID.get()), new NameFluid("froststeel", MaterialisResources.FROSTSTEEL_FLUID.FLUID.get()), new NameFluid("utheric", MaterialisResources.UTHERIUM_FLUID.FLUID.get()) }, new ToolValue("_axe", 3), new ToolValue("_hoe", 2), new ToolValue("_pickaxe", 3), new ToolValue("_shovel", 1), new ToolValue("_sword", 2), new ToolValue("_helmet", 5), new ToolValue("_chestplate", 8), new ToolValue("_leggings", 7), new ToolValue("_boots", 4));
    toolMelting(withCondition(consumer, new ModLoadedCondition("undergarden")), new NameFluid("forgotten_metal", MaterialisResources.CLOGGRUM_FLUID.FLUID.get(), new FluidStack(MaterialisResources.FORGOTTEN_FLUID.FLUID.get(), FluidValues.INGOT), true), new ToolValue("undergarden:forgotten_axe", 3), new ToolValue("undergarden:forgotten_hoe", 2), new ToolValue("undergarden:forgotten_pickaxe", 3), new ToolValue("undergarden:forgotten_shovel", 1), new ToolValue("undergarden:forgotten_sword", 2), new ToolValue("undergarden:forgotten_battleaxe", 3));
    toolMelting(withCondition(consumer, new ModLoadedCondition("undergarden")), new NameFluid("cloggrum", MaterialisResources.CLOGGRUM_FLUID.FLUID.get()), new ToolValue("undergarden:cloggrum_shield", 6), new ToolValue("undergarden:cloggrum_battleaxe", 3));
    // mekanism stuff
    // metalTagCasting(consumer, TinkerFluids.moltenRefinedObsidian, "refined_obsidian", castingFolder, false);
    // metalMelting(consumer, TinkerFluids.moltenRefinedObsidian.get(), "refined_obsidian", false, false, meltingFolder, true);
    // metalTagCasting(consumer, TinkerFluids.moltenRefinedGlowstone, "refined_glowstone", castingFolder, false);
    // metalMelting(consumer, TinkerFluids.moltenRefinedGlowstone.get(), "refined_glowstone", false, meltingFolder, true);
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("mekanismtools")), "mekanismtools", new NameFluid[] { new NameFluid("bronze", TinkerFluids.moltenBronze.get()), new NameFluid("osmium", TinkerFluids.moltenOsmium.get()), new NameFluid("refined_glowstone", TinkerFluids.moltenRefinedGlowstone.get()), new NameFluid("refined_obsidian", TinkerFluids.moltenRefinedObsidian.get()), new NameFluid("steel", TinkerFluids.moltenSteel.get()) }, new ToolValue("_pickaxe", 3), new ToolValue("_axe", 3), new ToolValue("_shovel", 1), new ToolValue("_hoe", 2), new ToolValue("_sword", 2), new ToolValue("_paxel", 7), new ToolValue("_helmet", 5), new ToolValue("_chestplate", 8), new ToolValue("_leggings", 7), new ToolValue("_boots", 4));
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("mekanismtools")), "mekanismtools", new NameFluid[] { new NameFluid("bronze", TinkerFluids.moltenBronze.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT), false), new NameFluid("osmium", TinkerFluids.moltenOsmium.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT), false), new NameFluid("refined_glowstone", TinkerFluids.moltenRefinedGlowstone.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT), false), new NameFluid("refined_obsidian", TinkerFluids.moltenRefinedObsidian.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT), false), new NameFluid("steel", TinkerFluids.moltenSteel.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT), false) }, new ToolValue("_shield", 6));
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("mekanismtools")), "mekanismtools", new NameFluid[] { new NameFluid("iron", TinkerFluids.moltenIron.get()), new NameFluid("gold", TinkerFluids.moltenGold.get()), new NameFluid("diamond", TinkerFluids.moltenDiamond.get()), new NameFluid("netherite", TinkerFluids.moltenDiamond.get(), new FluidStack(TinkerFluids.moltenNetherite.get(), FluidValues.INGOT), true) }, new ToolValue("_paxel", 7));
    // psi stuff
    Consumer<IFinishedRecipe> psiLoaded = withCondition(consumer, new ModLoadedCondition("psi"));
    ShapedRecipeBuilder.shaped(MaterialisResources.PSIMETAL_EXOSUIT.get(ArmorSlotType.HELMET)).pattern("gpg").pattern("b b").define('p', getTag("forge", "ingots/psimetal")).define('g', getTag("forge", "gems/psigem")).define('b', getTag("forge", "ingots/silicon_bronze")).unlockedBy("has_item", has(getTag("forge", "gems/psigem"))).save(psiLoaded, modResource(armorFolder + "exosuit_helmet"));
    ShapedRecipeBuilder.shaped(MaterialisResources.PSIMETAL_EXOSUIT.get(ArmorSlotType.CHESTPLATE)).pattern("p p").pattern("gpg").pattern("bpb").define('p', getTag("forge", "ingots/psimetal")).define('g', getTag("forge", "gems/psigem")).define('b', getTag("forge", "ingots/silicon_bronze")).unlockedBy("has_item", has(getTag("forge", "gems/psigem"))).save(psiLoaded, modResource(armorFolder + "exosuit_chestplate"));
    ShapedRecipeBuilder.shaped(MaterialisResources.PSIMETAL_EXOSUIT.get(ArmorSlotType.LEGGINGS)).pattern("pgp").pattern("b b").pattern("p p").define('p', getTag("forge", "ingots/psimetal")).define('g', getTag("forge", "gems/psigem")).define('b', getTag("forge", "ingots/silicon_bronze")).unlockedBy("has_item", has(getTag("forge", "gems/psigem"))).save(psiLoaded, modResource(armorFolder + "exosuit_leggings"));
    ShapedRecipeBuilder.shaped(MaterialisResources.PSIMETAL_EXOSUIT.get(ArmorSlotType.BOOTS)).pattern("g g").pattern("b b").define('g', getTag("forge", "gems/psigem")).define('b', getTag("forge", "ingots/silicon_bronze")).unlockedBy("has_item", has(getTag("forge", "gems/psigem"))).save(psiLoaded, modResource(armorFolder + "exosuit_boots"));
    SpecializedRepairRecipeBuilder.repair(Ingredient.of(MaterialisResources.PSIMETAL_EXOSUIT.values().stream().map(ItemStack::new)), MaterialisMaterials.psimetal).buildRepairKit(psiLoaded, modResource(armorRepairFolder + "exosuit_repair_kit")).build(psiLoaded, modResource(armorRepairFolder + "exosuit_station"));
    metalTagCasting(consumer, MaterialisResources.PSIMETAL_FLUID.OBJECT, "psimetal", castingFolder, false);
    metalMelting(consumer, MaterialisResources.PSIMETAL_FLUID.FLUID.get(), "psimetal", false, meltingFolder, true);
    metalTagCasting(consumer, MaterialisResources.EBONY_PSIMETAL_FLUID.OBJECT, "ebony_psimetal", castingFolder, false);
    metalMelting(consumer, MaterialisResources.EBONY_PSIMETAL_FLUID.FLUID.get(), "ebony_psimetal", false, meltingFolder, true);
    metalTagCasting(consumer, MaterialisResources.IVORY_PSIMETAL_FLUID.OBJECT, "ivory_psimetal", castingFolder, false);
    metalMelting(consumer, MaterialisResources.IVORY_PSIMETAL_FLUID.FLUID.get(), "ivory_psimetal", false, meltingFolder, true);
    toolMelting(withCondition(consumer, new AndCondition(new ModLoadedCondition("psi"), new NotCondition(new ModLoadedCondition("magipsi")))), new NameFluid("psimetal", MaterialisResources.PSIMETAL_FLUID.FLUID.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT * 2), false), new ToolValue("psi:psimetal_axe", 2), new ToolValue("psi:psimetal_pickaxe", 2), new ToolValue("psi:psimetal_shovel", 1));
    toolMelting(withCondition(consumer, new AndCondition(new ModLoadedCondition("psi"), new NotCondition(new ModLoadedCondition("magipsi")))), new NameFluid("psimetal", MaterialisResources.PSIMETAL_FLUID.FLUID.get(), new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.INGOT), false), new ToolValue("psi:psimetal_sword", 1));
    toolMelting(withCondition(consumer, new ModLoadedCondition("magipsi")), new NameFluid("psimetal_magical", MaterialisResources.PSIMETAL_FLUID.FLUID.get(), new FluidStack(TinkerFluids.moltenGold.get(), FluidValues.INGOT), false), new ToolValue("psi:psimetal_axe", 2), new ToolValue("psi:psimetal_pickaxe", 2), new ToolValue("psi:psimetal_shovel", 1), new ToolValue("psi:psimetal_sword", 1));
    toolMelting(psiLoaded, new NameFluid("psimetal", MaterialisResources.PSIMETAL_FLUID.FLUID.get()), new ToolValue("psi:psimetal_exosuit_helmet", 3), new ToolValue("psi:psimetal_exosuit_chestplate", 6), new ToolValue("psi:psimetal_exosuit_leggings", 5), new ToolValue("psi:psimetal_exosuit_boots", 2));
    // occultism stuff
    metalTagCasting(consumer, MaterialisResources.IESNIUM_FLUID.OBJECT, "iesnium", castingFolder, false);
    metalMelting(consumer, MaterialisResources.IESNIUM_FLUID.FLUID.get(), "iesnium", true, meltingFolder, true, MaterialisByproduct.SILVER);
    toolMelting(withCondition(consumer, new ModLoadedCondition("occultism")), new NameFluid("iesnium", MaterialisResources.IESNIUM_FLUID.FLUID.get()), new ToolValue("occultism:iesnium_pickaxe", 3));
    // botania stuff
    metalTagCasting(consumer, MaterialisResources.MANASTEEL_FLUID.OBJECT, "manasteel", castingFolder, false);
    metalMelting(consumer, MaterialisResources.MANASTEEL_FLUID.FLUID.get(), "manasteel", false, meltingFolder, true);
    metalTagCasting(consumer, MaterialisResources.ELEMENTIUM_FLUID.OBJECT, "elementium", castingFolder, false);
    metalMelting(consumer, MaterialisResources.ELEMENTIUM_FLUID.FLUID.get(), "elementium", false, meltingFolder, true);
    metalTagCasting(consumer, MaterialisResources.TERRASTEEL_FLUID.OBJECT, "terrasteel", castingFolder, false);
    metalMelting(consumer, MaterialisResources.TERRASTEEL_FLUID.FLUID.get(), "terrasteel", false, meltingFolder, true);
    multipleToolMelting(withCondition(consumer, new ModLoadedCondition("botania")), "botania", new NameFluid[] { new NameFluid("manasteel", MaterialisResources.MANASTEEL_FLUID.FLUID.get()), new NameFluid("elementium", MaterialisResources.ELEMENTIUM_FLUID.FLUID.get()) }, // new ToolValue("_pickaxe", 3), //botania is inconsistent with these names >:(
    new ToolValue("_axe", 3), new ToolValue("_shovel", 1), new ToolValue("_hoe", 2), new ToolValue("_sword", 2), new ToolValue("_shears", 2), new ToolValue("_helmet", 5), new ToolValue("_chestplate", 8), new ToolValue("_leggings", 7), new ToolValue("_boots", 4));
    toolMelting(withCondition(consumer, new ModLoadedCondition("botania")), new NameFluid("manasteel", MaterialisResources.MANASTEEL_FLUID.FLUID.get()), new ToolValue("botania:manasteel_pick", 3));
    toolMelting(withCondition(consumer, new ModLoadedCondition("botania")), new NameFluid("elementium", MaterialisResources.ELEMENTIUM_FLUID.FLUID.get()), new ToolValue("botania:elementium_pickaxe", 3));
    toolMelting(withCondition(consumer, new ModLoadedCondition("botania")), new NameFluid("terrasteel", MaterialisResources.MANASTEEL_FLUID.FLUID.get(), new FluidStack(MaterialisResources.TERRASTEEL_FLUID.FLUID.get(), FluidValues.INGOT * 3), true), new ToolValue("botania:terrasteel_helmet", 5), new ToolValue("botania:terrasteel_chestplate", 8), new ToolValue("botania:terrasteel_leggings", 7), new ToolValue("botania:terrasteel_boots", 4));
    toolMelting(withCondition(consumer, new ModLoadedCondition("botania")), new NameFluid("terrasteel", MaterialisResources.TERRASTEEL_FLUID.FLUID.get()), new ToolValue("botania:terra_pick", 4), new ToolValue("botania:terra_axe", 4), new ToolValue("botania:terra_sword", 2));
    // mythicbotany stuff
    metalTagCasting(consumer, MaterialisResources.ALFSTEEL_FLUID.OBJECT, "alfsteel", castingFolder, false);
    metalMelting(consumer, MaterialisResources.ALFSTEEL_FLUID.FLUID.get(), "alfsteel", false, meltingFolder, true);
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(new ResourceLocation("mythicbotany", "alfsteel_armor_upgrade")), MaterialisResources.ALFSTEEL_FLUID.FLUID.get(), FluidValues.INGOT * 2, 1.0f).build(withCondition(consumer, new ModLoadedCondition("mythicbotany")), modResource(meltingFolder + "alfsteel_double_ingot"));
    toolMelting(withCondition(consumer, new ModLoadedCondition("mythicbotany")), new NameFluid("alfsteel", MaterialisResources.TERRASTEEL_FLUID.FLUID.get(), new FluidStack(MaterialisResources.ALFSTEEL_FLUID.FLUID.get(), FluidValues.INGOT * 2), true), new ToolValue("mythicbotany:alfsteel_helmet", 3), new ToolValue("mythicbotany:alfsteel_chestplate", 3), new ToolValue("mythicbotany:alfsteel_leggings", 3), new ToolValue("mythicbotany:alfsteel_boots", 3));
    toolMelting(withCondition(consumer, new ModLoadedCondition("mythicbotany")), new NameFluid("alfsteel", MaterialisResources.TERRASTEEL_FLUID.FLUID.get(), new FluidStack(MaterialisResources.ALFSTEEL_FLUID.FLUID.get(), FluidValues.INGOT), true), new ToolValue("mythicbotany:alfsteel_pick", 4), new ToolValue("mythicbotany:alfsteel_axe", 4), new ToolValue("mythicbotany:alfsteel_sword", 2));
    // draconic evolution stuff
    metalTagCasting(consumer, MaterialisResources.DRACONIUM_FLUID.OBJECT, "draconium", castingFolder, false);
    metalMelting(consumer, MaterialisResources.DRACONIUM_FLUID.FLUID.get(), "draconium", true, meltingFolder, true, MaterialisByproduct.PLATINUM, MaterialisByproduct.COBALT);
    metalTagCasting(consumer, MaterialisResources.AWAKENED_DRACONIUM_FLUID.OBJECT, "draconium_awakened", castingFolder, false);
    metalMelting(consumer, MaterialisResources.AWAKENED_DRACONIUM_FLUID.FLUID.get(), "draconium_awakened", false, meltingFolder, true);
    // redstone arsenal stuff
    metalTagCasting(consumer, MaterialisResources.FLUX_INFUSED_FLUID.OBJECT, "flux_infused", castingFolder, false);
    metalMelting(consumer, MaterialisResources.FLUX_INFUSED_FLUID.FLUID.get(), "flux_infused", false, meltingFolder, true);
    // materials
    metalMaterialRecipe(consumer, MaterialisMaterials.fairy, materialFolder, "fairy", false);
    metalMaterialRecipe(consumer, MaterialisMaterials.brass, materialFolder, "brass", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.aluminum, materialFolder, "aluminum", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.nickel, materialFolder, "nickel", true);
    // metalMaterialRecipe(consumer, MaterialisMaterials.platinum, materialFolder, "platinum", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.uranium, materialFolder, "uranium", true);
    // metalMaterialRecipe(consumer, MaterialisMaterials.tungsten, materialFolder, "tungsten", true);
    // metalMaterialRecipe(consumer, MaterialisMaterials.invar, materialFolder, "invar", true);
    materialRecipe(withCondition(consumer, new ModLoadedCondition("create")), MaterialisMaterials.roseQuartz, ItemNameIngredient.from(new ResourceLocation("create", "rose_quartz"), new ResourceLocation("create", "polished_rose_quartz")), 1, 1, materialFolder + "rose_quartz");
    metalMaterialRecipe(consumer, MaterialisMaterials.refinedRadiance, materialFolder, "refined_radiance", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.shadowSteel, materialFolder, "shadow_steel", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.pewter, materialFolder, "pewter", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.arcaneGold, materialFolder, "arcane_gold", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.neptunium, materialFolder, "neptunium", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.quicksilver, materialFolder, "quicksilver", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.starmetal, materialFolder, "starmetal", true);
    materialRecipe(withCondition(consumer, tagCondition("plastic")), MaterialisMaterials.plastic, Ingredient.of(ItemTags.bind("forge:plastic")), 1, 1, materialFolder + "plastic");
    metalMaterialRecipe(consumer, MaterialisMaterials.pinkSlime, materialFolder, "pink_slime", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.cloggrum, materialFolder, "cloggrum", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.froststeel, materialFolder, "froststeel", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.utherium, materialFolder, "utherium", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.forgottenMetal, materialFolder, "forgotten_metal", true);
    // metalMaterialRecipe(consumer, MaterialisMaterials.osmium, materialFolder, "osmium", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.refinedObsidian, materialFolder, "refined_obsidian", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.refinedGlowstone, materialFolder, "refined_glowstone", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.psimetal, materialFolder, "psimetal", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.ebonyPsimetal, materialFolder, "ebony_psimetal", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.ivoryPsimetal, materialFolder, "ivory_psimetal", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.iesnium, materialFolder, "iesnium", true);
    materialRecipe(withCondition(consumer, new ModLoadedCondition("botania")), MaterialisMaterials.livingwood, ItemNameIngredient.from(new ResourceLocation("botania", "livingwood")), 1, 1, materialFolder + "livingwood");
    materialRecipe(withCondition(consumer, new ModLoadedCondition("botania")), MaterialisMaterials.livingwood, ItemNameIngredient.from(new ResourceLocation("botania", "livingwood_twig")), 2, 1, materialFolder + "livingwood_twig");
    materialRecipe(withCondition(consumer, new ModLoadedCondition("botania")), MaterialisMaterials.dreamwood, ItemNameIngredient.from(new ResourceLocation("botania", "dreamwood")), 1, 1, materialFolder + "dreamwood");
    materialRecipe(withCondition(consumer, new ModLoadedCondition("botania")), MaterialisMaterials.dreamwood, ItemNameIngredient.from(new ResourceLocation("botania", "dreamwood_twig")), 2, 1, materialFolder + "dreamwood_twig");
    metalMaterialRecipe(consumer, MaterialisMaterials.manasteel, materialFolder, "manasteel", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.elementium, materialFolder, "elementium", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.terrasteel, materialFolder, "terrasteel", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.alfsteel, materialFolder, "alfsteel", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.draconium, materialFolder, "draconium", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.awakenedDraconium, materialFolder, "draconium_awakened", true);
    metalMaterialRecipe(consumer, MaterialisMaterials.fluxInfused, materialFolder, "flux_infused", true);
    // material casting
    materialMeltingCasting(consumer, MaterialisMaterials.fairy, MaterialisResources.FAIRY_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.brass, TinkerFluids.moltenBrass, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.aluminum, TinkerFluids.moltenAluminum, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.nickel, TinkerFluids.moltenNickel, materialFolder);
    // materialMeltingCasting(consumer, MaterialisMaterials.platinum, TinkerFluids.moltenPlatinum, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.uranium, TinkerFluids.moltenUranium, materialFolder);
    // materialMeltingCasting(consumer, MaterialisMaterials.tungsten, TinkerFluids.moltenTungsten, materialFolder);
    // materialMeltingCasting(consumer, MaterialisMaterials.invar, TinkerFluids.moltenInvar, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.refinedRadiance, MaterialisResources.REFINED_RADIANCE_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.shadowSteel, MaterialisResources.SHADOW_STEEL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.pewter, TinkerFluids.moltenPewter, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.arcaneGold, MaterialisResources.ARCANE_GOLD_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.neptunium, MaterialisResources.NEPTUNIUM_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.quicksilver, MaterialisResources.QUICKSILVER_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.starmetal, MaterialisResources.STARMETAL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.pinkSlime, MaterialisResources.PINK_SLIME_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.cloggrum, MaterialisResources.CLOGGRUM_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.froststeel, MaterialisResources.FROSTSTEEL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.utherium, MaterialisResources.UTHERIUM_FLUID.OBJECT, materialFolder);
    materialComposite(withCondition(consumer, new AndCondition(tagCondition("ingots/cloggrum"), tagCondition("ingots/forgotten_metal"))), MaterialisMaterials.cloggrum, MaterialisMaterials.forgottenMetal, MaterialisResources.FORGOTTEN_FLUID.OBJECT, FluidValues.NUGGET * 3, false, compositeFolder);
    MaterialMeltingRecipeBuilder.material(MaterialisMaterials.forgottenMetal, new FluidStack(MaterialisResources.FORGOTTEN_FLUID.FLUID.get(), FluidValues.NUGGET * 3)).build(withCondition(consumer, new AndCondition(tagCondition("ingots/cloggrum"), tagCondition("ingots/forgotten_metal"))), modResource(materialFolder + "melting/forgotten_metal"));
    // materialMeltingCasting(consumer, MaterialisMaterials.osmium, TinkerFluids.moltenOsmium, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.refinedObsidian, TinkerFluids.moltenRefinedObsidian, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.refinedGlowstone, TinkerFluids.moltenRefinedGlowstone, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.psimetal, MaterialisResources.PSIMETAL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.ebonyPsimetal, MaterialisResources.EBONY_PSIMETAL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.ivoryPsimetal, MaterialisResources.IVORY_PSIMETAL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.iesnium, MaterialisResources.IESNIUM_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.manasteel, MaterialisResources.MANASTEEL_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.elementium, MaterialisResources.ELEMENTIUM_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.terrasteel, MaterialisResources.TERRASTEEL_FLUID.OBJECT, materialFolder);
    materialComposite(withCondition(consumer, new ModLoadedCondition("mythicbotany")), MaterialisMaterials.terrasteel, MaterialisMaterials.alfsteel, MaterialisResources.ALFSTEEL_FLUID.OBJECT, FluidValues.NUGGET * 3, false, compositeFolder);
    MaterialMeltingRecipeBuilder.material(MaterialisMaterials.alfsteel, new FluidStack(MaterialisResources.ALFSTEEL_FLUID.FLUID.get(), FluidValues.NUGGET * 3)).build(withCondition(consumer, new ModLoadedCondition("mythicbotany")), modResource(materialFolder + "melting/alfsteel"));
    materialMeltingCasting(consumer, MaterialisMaterials.draconium, MaterialisResources.DRACONIUM_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.awakenedDraconium, MaterialisResources.AWAKENED_DRACONIUM_FLUID.OBJECT, materialFolder);
    materialMeltingCasting(consumer, MaterialisMaterials.fluxInfused, MaterialisResources.FLUX_INFUSED_FLUID.OBJECT, materialFolder);
    // modifiers
    ModifierRecipeBuilder.modifier(MaterialisModifiers.reapingModifier.get()).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("eidolon", "tattered_cloth")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("eidolon", "unholy_symbol")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("eidolon", "tattered_cloth")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("eidolon", "soul_shard")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("eidolon", "soul_shard")))).addSalvage(RandomItem.range(ItemNameOutput.fromName(new ResourceLocation("eidolon", "soul_shard"), 2), 0)).addSalvage(RandomItem.range(ItemNameOutput.fromName(new ResourceLocation("eidolon", "tattered_cloth"), 2), 0)).setTools(TinkerTags.Items.MELEE).setMaxLevel(1).setSlots(SlotType.ABILITY, 1).setGroup("materialis:eidolon").includeUnarmed().buildSalvage(consumer, prefix(MaterialisModifiers.reapingModifier, salvageFolder)).build(withCondition(consumer, new ModLoadedCondition("eidolon")), prefix(MaterialisModifiers.reapingModifier, modifierFolder));
    OverslimeModifierRecipeBuilder.modifier(MaterialisResources.PINK_SLIME_CRYSTAL.get(), 70).build(withCondition(consumer, new ModLoadedCondition("industrialforegoing")), prefix(TinkerModifiers.overslime, modifierFolder));
    SwappableModifierRecipeBuilder.modifier(MaterialisModifiers.runedModifier.get(), "rune").addInput(getTag("quark", "runes")).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("quark", "blank_rune")), 0.5f)).setTools(TinkerTags.Items.MODIFIABLE).setRequirements(ModifierMatch.entry(TinkerModifiers.shiny.get())).setRequirementsError("recipe.materialis.modifier.runed_requirements").setGroup("materialis:quark").buildSalvage(consumer, prefix(MaterialisModifiers.runedModifier, salvageFolder)).build(ConsumerWrapperBuilder.wrap(MaterialisResources.runeModifierSerializer.get()).addCondition(new ModLoadedCondition("quark")).build(consumer), prefix(MaterialisModifiers.runedModifier, modifierFolder));
    Ingredient interactableWithDurability = new IngredientIntersection(Ingredient.of(TinkerTags.Items.DURABILITY), Ingredient.of(TinkerTags.Items.INTERACTABLE));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.wrenchingModifier.get()).setTools(new IngredientWithout(interactableWithDurability, Ingredient.of(MaterialisItemTags.WRENCHING))).addInput(SizedIngredient.of(MaterialIngredient.fromItem(MaterialisResources.WRENCH_HEAD.get()))).addInput(TinkerTags.Items.INGOTS_NETHERITE_SCRAP).addInput(SizedIngredient.of(MaterialIngredient.fromItem(TinkerToolParts.toolBinding.get()))).addSalvage(Items.NETHERITE_SCRAP, 0.35f).setMaxLevel(1).setSlots(SlotType.ABILITY, 1).buildSalvage(consumer, prefix(MaterialisModifiers.wrenchingModifier, salvageFolder)).build(consumer, prefix(MaterialisModifiers.wrenchingModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.galvanizedModifier.get()).setTools(MaterialisItemTags.GALVANIZABLE).addInput(Items.PHANTOM_MEMBRANE).addInput(Tags.Items.INGOTS_IRON).addSalvage(Items.IRON_INGOT, 0.7f).addSalvage(Items.PHANTOM_MEMBRANE, 0.3f).setSlots(SlotType.UPGRADE, 2).buildSalvage(consumer, prefix(MaterialisModifiers.galvanizedModifier, salvageFolder)).build(consumer, prefix(MaterialisModifiers.galvanizedModifier, modifierFolder));
    ModifierMatch wrenching = ModifierMatch.list(1, ModifierMatch.entry(MaterialisModifiers.wrenchingModifier.get()), ModifierMatch.entry(MaterialisModifiers.wrenchingModifierHidden.get()));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.thermalWrenchingModifier.get()).setTools(interactableWithDurability).addInput(getTag("forge", "gears/nickel")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("thermal", "wrench")))).addInput(getTag("forge", "gears/nickel")).addSalvage(getTag("forge", "gears/nickel"), 0, 2).setRequirements(wrenching).setRequirementsError("recipe.materialis.modifier.thermal_wrenching_requirements").setMaxLevel(1).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:thermal").buildSalvage(consumer, prefix(MaterialisModifiers.thermalWrenchingModifier, salvageFolder)).build(withCondition(consumer, new ModLoadedCondition("thermal")), prefix(MaterialisModifiers.thermalWrenchingModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.createWrenchingModifier.get()).setTools(interactableWithDurability).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("create", "cogwheel")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("create", "wrench")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("create", "cogwheel")))).addSalvage(RandomItem.range(ItemNameOutput.fromName(new ResourceLocation("create", "cogwheel"), 2), 0)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("create", "wrench")), 0.9f)).setRequirements(wrenching).setRequirementsError("recipe.materialis.modifier.create_wrenching_requirements").setMaxLevel(1).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:create").buildSalvage(consumer, prefix(MaterialisModifiers.createWrenchingModifier, salvageFolder)).build(withCondition(consumer, new ModLoadedCondition("create")), prefix(MaterialisModifiers.createWrenchingModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.immersiveWrenchingModifier.get()).setTools(interactableWithDurability).addInput(getTag("forge", "plates/copper")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("immersiveengineering", "hammer")))).addInput(getTag("forge", "plates/copper")).addSalvage(getTag("forge", "plates/copper"), 0, 2).setRequirements(wrenching).setRequirementsError("recipe.materialis.modifier.immersive_wrenching_requirements").setMaxLevel(1).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:immersiveengineering").buildSalvage(consumer, prefix(MaterialisModifiers.immersiveWrenchingModifier, salvageFolder)).build(withCondition(consumer, new ModLoadedCondition("immersiveengineering")), prefix(MaterialisModifiers.immersiveWrenchingModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.pipeWrenchingModifier.get()).setTools(interactableWithDurability).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("prettypipes", "pipe")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("prettypipes", "wrench")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("prettypipes", "pipe")))).addSalvage(RandomItem.range(ItemNameOutput.fromName(new ResourceLocation("prettypipes", "pipe"), 2), 0)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("prettypipes", "wrench")), 0.9f)).setRequirements(wrenching).setRequirementsError("recipe.materialis.modifier.pipe_wrenching_requirements").setMaxLevel(1).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:prettypipes").buildSalvage(consumer, prefix(MaterialisModifiers.pipeWrenchingModifier, salvageFolder)).build(withCondition(consumer, new ModLoadedCondition("prettypipes")), prefix(MaterialisModifiers.pipeWrenchingModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.psionizingRadiationModifier.get()).addInput(getTag("forge", "ingots/psimetal")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("psi", "cad_socket_basic")))).addInput(getTag("forge", "ingots/psimetal")).addInput(getTag("forge", "gems/psigem")).addInput(getTag("forge", "gems/psigem")).addSalvage(RandomItem.range(ItemNameOutput.fromName(new ResourceLocation("psi", "psimetal"), 2), 0)).addSalvage(RandomItem.range(ItemNameOutput.fromName(new ResourceLocation("psi", "psigem"), 2), 0)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "cad_socket_basic")), 0.5f)).setTools(TinkerTags.Items.HELD).setSlots(SlotType.ABILITY, 1).setGroup("materialis:psi").buildSalvage(consumer, prefix(MaterialisModifiers.psionizingRadiationModifier, salvageFolder)).build(psiLoaded, prefix(MaterialisModifiers.psionizingRadiationModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.spellCastingModifier.get()).addInput(getTag("forge", "ingots/ebony_psimetal")).addInput(getTag("forge", "gems/psigem")).addInput(getTag("forge", "ingots/ivory_psimetal")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("psi", "cad_battery_ultradense")))).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("psi", "cad_assembly_psimetal")))).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "ebony_psimetal")), 0.4f)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "ivory_psimetal")), 0.4f)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "psigem")), 0.2f)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "cad_battery_ultradense")), 0.3f)).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "cad_assembly_psimetal")), 0.6f)).setRequirements(ModifierMatch.list(1, ModifierMatch.entry(MaterialisModifiers.psionizingRadiationModifier.get()), ModifierMatch.entry(MaterialisModifiers.lesserPsionizingRadiationModifier.get()))).setRequirementsError("recipe.materialis.modifier.casting_requirements").setTools(TinkerTags.Items.HELD).setSlots(SlotType.ABILITY, 1).setGroup("materialis:psi").buildSalvage(consumer, prefix(MaterialisModifiers.spellCastingModifier, salvageFolder)).build(psiLoaded, prefix(MaterialisModifiers.spellCastingModifier, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.spellSocketModifier.get()).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("psi", "cad_socket_basic")))).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "cad_socket_basic")), 0.4f)).setTools(TinkerTags.Items.MODIFIABLE).setMaxLevel(5).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:psi").buildSalvage(consumer, prefix(MaterialisModifiers.spellSocketModifier, salvageFolder)).build(psiLoaded, prefix(MaterialisModifiers.spellSocketModifier, modifierFolder));
    SwappableModifierRecipeBuilder.modifier(MaterialisModifiers.colorizedModifier.get(), "colorizer").addInput(getTag("psi", "colorizers")).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("psi", "psidust")), 0.3f)).addSalvage(Items.IRON_INGOT, 0.7f).setTools(TinkerTags.Items.MODIFIABLE).setGroup("materialis:psi").buildSalvage(consumer, prefix(MaterialisModifiers.colorizedModifier, salvageFolder)).build(ConsumerWrapperBuilder.wrap(MaterialisResources.colorizerModifierSerializer.get()).addCondition(new ModLoadedCondition("psi")).build(consumer), prefix(MaterialisModifiers.colorizedModifier, modifierFolder));
    ICondition capacitorIsUseful = new OrCondition(new ModLoadedCondition("draconicevolution"), new ModLoadedCondition("redstone_arsenal"));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.capacitorModifier.get()).addInput(getTag("forge", "ingots/lead")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("thermal", "rf_coil")))).addInput(getTag("forge", "ingots/lead")).addSalvage(getTag("forge", "dusts/redstone"), 0, 1).setTools(TinkerTags.Items.MODIFIABLE).setMaxLevel(5).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:flux").buildSalvage(consumer, prefix(MaterialisModifiers.capacitorModifier, salvageFolder)).build(withCondition(consumer, new AndCondition(capacitorIsUseful, new ModLoadedCondition("thermal"))), prefix(MaterialisModifiers.capacitorModifier, modifierFolder + "thermal_"));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.capacitorModifier.get()).addInput(getTag("forge", "ingots/lead")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("immersiveengineering", "wirecoil_copper")))).addInput(getTag("forge", "dusts/redstone")).setTools(TinkerTags.Items.MODIFIABLE).setMaxLevel(5).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:flux").build(withCondition(consumer, new AndCondition(capacitorIsUseful, new ModLoadedCondition("immersiveengineering"))), prefix(MaterialisModifiers.capacitorModifier, modifierFolder + "immersiveengineering_"));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.capacitorModifier.get()).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("mekanism", "alloy_infused")))).addInput(getTag("forge", "ingots/gold")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("mekanism", "alloy_infused")))).setTools(TinkerTags.Items.MODIFIABLE).setMaxLevel(5).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:flux").build(withCondition(consumer, new AndCondition(capacitorIsUseful, new ModLoadedCondition("mekanism"))), prefix(MaterialisModifiers.capacitorModifier, modifierFolder + "mekanism_"));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.capacitorModifier.get()).addInput(getTag("forge", "dusts/redstone")).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("draconicevolution", "draconium_core")))).addInput(getTag("forge", "dusts/redstone")).setTools(TinkerTags.Items.MODIFIABLE).setMaxLevel(5).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:flux").build(withCondition(consumer, capacitorIsUseful), prefix(MaterialisModifiers.capacitorModifier, modifierFolder + "draconicevolution_"));
    SwappableModifierRecipeBuilder.modifier(MaterialisModifiers.psionizingRadiationModifierSensor.get(), "sensor").setTools(MaterialisItemTags.SENSOR_SLOTTABLE).addInput(MaterialisItemTags.SENSOR).addSalvage(getTag("forge", "ingots/psimetal"), 0, 2).setSlots(MaterialisResources.SENSOR_SLOT, 1).buildSalvage(psiLoaded, prefix(MaterialisModifiers.psionizingRadiationModifierSensor, salvageFolder)).build(ConsumerWrapperBuilder.wrap(MaterialisResources.sensorModifierSerializer.get()).addCondition(new ModLoadedCondition("psi")).build(consumer), prefix(MaterialisModifiers.psionizingRadiationModifierSensor, modifierFolder));
    ModifierRecipeBuilder.modifier(MaterialisModifiers.engineersGogglesModifier.get()).setTools(TinkerTags.Items.HELMETS).addInput(SizedIngredient.of(ItemNameIngredient.from(new ResourceLocation("create", "goggles")))).addSalvage(RandomItem.chance(ItemNameOutput.fromName(new ResourceLocation("create", "goggles")), 0.9f)).setMaxLevel(1).setSlots(SlotType.UPGRADE, 1).setGroup("materialis:create").buildSalvage(consumer, prefix(MaterialisModifiers.engineersGogglesModifier, salvageFolder)).build(withCondition(consumer, new ModLoadedCondition("create")), prefix(MaterialisModifiers.engineersGogglesModifier, modifierFolder));
    // texture recipes
    Ingredient exosuit = Ingredient.of(MaterialisResources.PSIMETAL_EXOSUIT.values().stream().map(ItemStack::new));
    List<Item> armorItems = new ArrayList<Item>();
    armorItems.addAll(TinkerTools.plateArmor.values());
    armorItems.addAll(MaterialisResources.PSIMETAL_EXOSUIT.values());
    Ingredient armor = Ingredient.of(armorItems.stream().map(ItemStack::new));
    plateTexture(psiLoaded, exosuit, MaterialIds.iron, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.copper, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.slimesteel, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.roseGold, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.pigIron, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.manyullyn, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.hepatizon, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.netherite, false, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.osmium, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.tungsten, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.platinum, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.silver, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.lead, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.aluminum, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.nickel, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.tin, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.zinc, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.uranium, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.steel, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.bronze, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.constantan, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.invar, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.electrum, true, slotlessFolder);
    plateTexture(psiLoaded, exosuit, MaterialIds.brass, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.fairy, false, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.refinedRadiance, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.shadowSteel, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.pewter, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.arcaneGold, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.neptunium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.quicksilver, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.starmetal, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.pinkSlime, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.cloggrum, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.froststeel, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.utherium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.regalium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.forgottenMetal, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.refinedObsidian, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.refinedGlowstone, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.psimetal, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.ebonyPsimetal, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.ivoryPsimetal, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.iesnium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.manasteel, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.elementium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.terrasteel, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.alfsteel, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.draconium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.awakenedDraconium, true, slotlessFolder);
    plateTexture(consumer, armor, MaterialisMaterials.fluxInfused, true, slotlessFolder);
    Ingredient slimesuit = Ingredient.of(TinkerTools.slimesuit.values().stream().map(ItemStack::new));
    SwappableModifierRecipeBuilder.modifier(TinkerModifiers.embellishment.get(), MaterialisMaterials.pinkSlimeball.toString()).setTools(slimesuit).addInput(Ingredient.of(MaterialisItemTags.PINK_SLIME)).addInput(Ingredient.of(MaterialisItemTags.PINK_SLIME)).addInput(Ingredient.of(MaterialisItemTags.PINK_SLIME)).addInput(Ingredient.of(MaterialisItemTags.PINK_SLIME)).addInput(Ingredient.of(MaterialisItemTags.PINK_SLIME)).build(industrialForegoingLoaded, wrap(TinkerModifiers.embellishment, slotlessFolder, "_pink_slimeball"));
}
Also used : IngredientIntersection(slimeknights.mantle.recipe.ingredient.IngredientIntersection) IngredientWithout(slimeknights.mantle.recipe.ingredient.IngredientWithout) ModifierMatch(slimeknights.tconstruct.library.recipe.modifiers.ModifierMatch) NotCondition(net.minecraftforge.common.crafting.conditions.NotCondition) FluidStack(net.minecraftforge.fluids.FluidStack) ArrayList(java.util.ArrayList) AndCondition(net.minecraftforge.common.crafting.conditions.AndCondition) Item(net.minecraft.item.Item) RandomItem(slimeknights.tconstruct.library.recipe.RandomItem) EffectSpillingEffect(slimeknights.tconstruct.library.recipe.modifiers.spilling.effects.EffectSpillingEffect) IngotWithBlockNNugget(com.rcx.materialis.MaterialisResources.IngotWithBlockNNugget) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) EntityIngredient(slimeknights.mantle.recipe.EntityIngredient) ItemNameIngredient(slimeknights.mantle.recipe.data.ItemNameIngredient) MaterialIngredient(slimeknights.tconstruct.library.recipe.ingredient.MaterialIngredient) SizedIngredient(slimeknights.mantle.recipe.SizedIngredient) Ingredient(net.minecraft.item.crafting.Ingredient) ResourceLocation(net.minecraft.util.ResourceLocation) IFinishedRecipe(net.minecraft.data.IFinishedRecipe) OrCondition(net.minecraftforge.common.crafting.conditions.OrCondition) ItemStack(net.minecraft.item.ItemStack) ICondition(net.minecraftforge.common.crafting.conditions.ICondition)

Example 3 with ModLoadedCondition

use of net.minecraftforge.common.crafting.conditions.ModLoadedCondition in project trofers by ochotonida.

the class Trophies method run.

@Override
public void run(DirectoryCache cache) {
    addTrophies();
    Path outputFolder = generator.getOutputFolder();
    Set<ResourceLocation> resourceLocations = Sets.newHashSet();
    for (String modid : trophies.keySet()) {
        for (Trophy trophy : trophies.get(modid)) {
            if (!resourceLocations.add(trophy.id())) {
                throw new IllegalStateException("Duplicate trophy " + trophy.id());
            } else {
                Path path = createPath(outputFolder, trophy);
                try {
                    JsonObject object;
                    if (Trofers.MODID.equals(modid)) {
                        object = trophy.toJson();
                    } else {
                        object = trophy.toJson(new ModLoadedCondition(modid));
                    }
                    IDataProvider.save(GSON, cache, object, path);
                } catch (IOException ioexception) {
                    Trofers.LOGGER.error("Couldn't save trophy {}", path, ioexception);
                }
            }
        }
    }
}
Also used : Path(java.nio.file.Path) Trophy(trofers.common.trophy.Trophy) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) ResourceLocation(net.minecraft.util.ResourceLocation) JsonObject(com.google.gson.JsonObject) IOException(java.io.IOException)

Example 4 with ModLoadedCondition

use of net.minecraftforge.common.crafting.conditions.ModLoadedCondition in project TinkersConstruct by SlimeKnights.

the class SmelteryRecipeProvider method addFoundryRecipes.

private void addFoundryRecipes(Consumer<FinishedRecipe> consumer) {
    String folder = "smeltery/scorched/";
    // grout crafting
    ShapelessRecipeBuilder.shapeless(TinkerSmeltery.netherGrout, 2).requires(Items.MAGMA_CREAM).requires(Ingredient.of(Blocks.SOUL_SAND, Blocks.SOUL_SOIL)).requires(Blocks.GRAVEL).unlockedBy("has_item", has(Items.MAGMA_CREAM)).save(consumer, prefix(TinkerSmeltery.netherGrout, folder));
    // scorched bricks from grout
    SimpleCookingRecipeBuilder.smelting(Ingredient.of(TinkerSmeltery.netherGrout), TinkerSmeltery.scorchedBrick, 0.3f, 200).unlockedBy("has_item", has(TinkerSmeltery.netherGrout)).save(consumer, prefix(TinkerSmeltery.scorchedBrick, folder));
    Consumer<Consumer<FinishedRecipe>> fastGrout = c -> SimpleCookingRecipeBuilder.blasting(Ingredient.of(TinkerSmeltery.netherGrout), TinkerSmeltery.scorchedBrick, 0.3f, 100).unlockedBy("has_item", has(TinkerSmeltery.netherGrout)).save(c);
    ConditionalRecipe.builder().addCondition(new ModLoadedCondition("ceramics")).addRecipe(c -> fastGrout.accept(ConsumerWrapperBuilder.wrap(new ResourceLocation("ceramics", "kiln")).build(c))).addCondition(TrueCondition.INSTANCE).addRecipe(fastGrout).generateAdvancement().build(consumer, wrap(TinkerSmeltery.scorchedBrick, folder, "_kiln"));
    // block from bricks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedBricks).define('b', TinkerSmeltery.scorchedBrick).pattern("bb").pattern("bb").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, wrap(TinkerSmeltery.scorchedBricks, folder, "_from_brick"));
    // ladder from bricks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedLadder, 4).define('b', TinkerSmeltery.scorchedBrick).define('B', TinkerTags.Items.SCORCHED_BLOCKS).pattern("b b").pattern("b b").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, prefix(TinkerSmeltery.scorchedLadder, folder));
    // stone -> polished
    ShapedRecipeBuilder.shaped(TinkerSmeltery.polishedScorchedStone, 4).define('b', TinkerSmeltery.scorchedStone).pattern("bb").pattern("bb").unlockedBy("has_item", has(TinkerSmeltery.scorchedStone)).save(consumer, wrap(TinkerSmeltery.polishedScorchedStone, folder, "_crafting"));
    // polished -> bricks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedBricks, 4).define('b', TinkerSmeltery.polishedScorchedStone).pattern("bb").pattern("bb").unlockedBy("has_item", has(TinkerSmeltery.polishedScorchedStone)).save(consumer, wrap(TinkerSmeltery.scorchedBricks, folder, "_crafting"));
    // stone -> road
    SimpleCookingRecipeBuilder.smelting(Ingredient.of(TinkerSmeltery.scorchedStone), TinkerSmeltery.scorchedRoad, 0.1f, 200).unlockedBy("has_item", has(TinkerSmeltery.scorchedStone)).save(consumer, wrap(TinkerSmeltery.scorchedRoad, folder, "_smelting"));
    // brick slabs -> chiseled
    ShapedRecipeBuilder.shaped(TinkerSmeltery.chiseledScorchedBricks).define('s', TinkerSmeltery.scorchedBricks.getSlab()).pattern("s").pattern("s").unlockedBy("has_item", has(TinkerSmeltery.scorchedBricks.getSlab())).save(consumer, wrap(TinkerSmeltery.chiseledScorchedBricks, folder, "_crafting"));
    // stonecutting
    this.scorchedStonecutter(consumer, TinkerSmeltery.polishedScorchedStone, folder);
    this.scorchedStonecutter(consumer, TinkerSmeltery.scorchedBricks, folder);
    this.scorchedStonecutter(consumer, TinkerSmeltery.chiseledScorchedBricks, folder);
    // scorched glass
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedGlass).define('b', TinkerSmeltery.scorchedBrick).define('G', Tags.Items.GEMS_QUARTZ).pattern(" b ").pattern("bGb").pattern(" b ").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, prefix(TinkerSmeltery.scorchedGlass, folder));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedGlassPane, 16).define('#', TinkerSmeltery.scorchedGlass).pattern("###").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.scorchedGlass)).save(consumer, prefix(TinkerSmeltery.scorchedGlassPane, folder));
    // stairs, slabs, and fences
    this.slabStairsCrafting(consumer, TinkerSmeltery.scorchedBricks, folder, true);
    this.slabStairsCrafting(consumer, TinkerSmeltery.scorchedRoad, folder, true);
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedBricks.getFence(), 6).define('B', TinkerSmeltery.scorchedBricks).define('b', TinkerSmeltery.scorchedBrick).pattern("BbB").pattern("BbB").unlockedBy("has_item", has(TinkerSmeltery.scorchedBricks)).save(consumer, prefix(TinkerSmeltery.scorchedBricks.getFence(), folder));
    // tanks
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedTank.get(TankType.FUEL_TANK)).define('#', TinkerSmeltery.scorchedBrick).define('B', Tags.Items.GEMS_QUARTZ).pattern("###").pattern("#B#").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "fuel_tank"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedTank.get(TankType.FUEL_GAUGE)).define('#', TinkerSmeltery.scorchedBrick).define('B', Tags.Items.GEMS_QUARTZ).pattern("#B#").pattern("BBB").pattern("#B#").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "fuel_gauge"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedTank.get(TankType.INGOT_TANK)).define('#', TinkerSmeltery.scorchedBrick).define('B', Tags.Items.GEMS_QUARTZ).pattern("#B#").pattern("#B#").pattern("#B#").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "ingot_tank"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedTank.get(TankType.INGOT_GAUGE)).define('#', TinkerSmeltery.scorchedBrick).define('B', Tags.Items.GEMS_QUARTZ).pattern("B#B").pattern("#B#").pattern("B#B").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "ingot_gauge"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedLantern.get(), 3).define('C', Tags.Items.INGOTS_IRON).define('B', TinkerSmeltery.scorchedBrick).define('P', TinkerSmeltery.scorchedGlassPane).pattern(" C ").pattern("PPP").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "lantern"));
    // fluid transfer
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedFaucet.get(), 3).define('#', TinkerSmeltery.scorchedBrick).pattern("# #").pattern(" # ").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "faucet"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedChannel.get(), 5).define('#', TinkerSmeltery.scorchedBrick).pattern("# #").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "channel"));
    // casting
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedBasin.get()).define('#', TinkerSmeltery.scorchedBrick).pattern("# #").pattern("# #").pattern("###").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "basin"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedTable.get()).define('#', TinkerSmeltery.scorchedBrick).pattern("###").pattern("# #").pattern("# #").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "table"));
    // peripherals
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedDrain).define('#', TinkerSmeltery.scorchedBrick).define('C', TinkerCommons.obsidianPane).pattern("# #").pattern("C C").pattern("# #").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "drain"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedChute).define('#', TinkerSmeltery.scorchedBrick).define('C', TinkerCommons.obsidianPane).pattern("#C#").pattern("   ").pattern("#C#").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "chute"));
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedDuct).define('#', TinkerSmeltery.scorchedBrick).define('C', TinkerMaterials.cobalt.getIngotTag()).pattern("# #").pattern("C C").pattern("# #").unlockedBy("has_item", has(TinkerMaterials.cobalt.getIngotTag())).save(consumer, modResource(folder + "duct"));
    // controllers
    ShapedRecipeBuilder.shaped(TinkerSmeltery.scorchedAlloyer).define('G', Ingredient.of(TinkerSmeltery.scorchedTank.get(TankType.INGOT_GAUGE), TinkerSmeltery.scorchedTank.get(TankType.FUEL_GAUGE))).define('B', TinkerSmeltery.scorchedBrick).pattern("BGB").pattern("BBB").unlockedBy("has_item", has(TinkerSmeltery.scorchedBrick)).save(consumer, modResource(folder + "alloyer"));
    // casting
    String castingFolder = "smeltery/casting/scorched/";
    ItemCastingRecipeBuilder.basinRecipe(TinkerSmeltery.scorchedStone).setFluidAndTime(TinkerFluids.scorchedStone, false, FluidValues.BRICK_BLOCK).save(consumer, modResource(castingFolder + "stone_from_scorched"));
    this.ingotCasting(consumer, TinkerFluids.scorchedStone, FluidValues.BRICK, TinkerSmeltery.scorchedBrick, castingFolder + "brick");
    ItemCastingRecipeBuilder.basinRecipe(TinkerSmeltery.scorchedGlass).setFluidAndTime(TinkerFluids.moltenQuartz, false, FluidValues.GEM).setCast(TinkerSmeltery.scorchedBricks, true).save(consumer, modResource(castingFolder + "glass"));
    // discount for casting panes
    ItemCastingRecipeBuilder.tableRecipe(TinkerSmeltery.scorchedGlassPane).setFluidAndTime(TinkerFluids.moltenQuartz, false, FluidValues.GEM_SHARD).setCast(TinkerSmeltery.scorchedBrick, true).save(consumer, modResource(castingFolder + "glass_pane"));
    // craft scorched stone from magma and basalt
    // flint is almost a brick
    ItemCastingRecipeBuilder.tableRecipe(TinkerSmeltery.scorchedBrick).setFluidAndTime(TinkerFluids.magma, true, FluidValues.SLIMEBALL / 2).setCast(Items.FLINT, true).save(consumer, modResource(castingFolder + "brick_composite"));
    scorchedCasting(consumer, TinkerSmeltery.scorchedStone, Ingredient.of(Blocks.BASALT, Blocks.GRAVEL), castingFolder + "stone_from_magma");
    scorchedCasting(consumer, TinkerSmeltery.polishedScorchedStone, Ingredient.of(Blocks.POLISHED_BASALT), castingFolder + "polished_from_magma");
    // foundry controller
    ItemCastingRecipeBuilder.basinRecipe(TinkerSmeltery.foundryController).setCast(TinkerSmeltery.scorchedBricks, // TODO: can I find a "heater" for the nether?
    true).setFluidAndTime(TinkerFluids.moltenObsidian, false, FluidValues.GLASS_BLOCK).save(consumer, prefix(TinkerSmeltery.foundryController, castingFolder));
    // melting
    String meltingFolder = "smeltery/melting/scorched/";
    // double efficiency when using smeltery for grout
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.netherGrout), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 2, 1.5f).save(consumer, modResource(meltingFolder + "grout"));
    // scorched stone
    // stairs are here since the cheapest stair recipe is stone cutter, 1 to 1
    MeltingRecipeBuilder.melting(CompoundIngredient.from(Ingredient.of(TinkerTags.Items.SCORCHED_BLOCKS), Ingredient.of(TinkerSmeltery.scorchedLadder, TinkerSmeltery.scorchedBricks.getStairs(), TinkerSmeltery.scorchedRoad.getStairs())), TinkerFluids.scorchedStone.get(), FluidValues.BRICK_BLOCK, 2.0f).save(consumer, modResource(meltingFolder + "block"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedBricks.getSlab(), TinkerSmeltery.scorchedBricks.getSlab(), TinkerSmeltery.scorchedRoad.getSlab()), TinkerFluids.scorchedStone.get(), FluidValues.BRICK_BLOCK / 2, 1.5f).save(consumer, modResource(meltingFolder + "slab"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedBrick), TinkerFluids.scorchedStone.get(), FluidValues.BRICK, 1.0f).save(consumer, modResource(meltingFolder + "brick"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedBricks.getFence()), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 3, 1.0f).save(consumer, modResource(meltingFolder + "fence"));
    // melt down foundry components
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedFaucet, TinkerSmeltery.scorchedChannel), TinkerFluids.scorchedStone.get(), FluidValues.BRICK, 1.5f).save(consumer, modResource(meltingFolder + "faucet"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedBasin, TinkerSmeltery.scorchedTable), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 7, 2.5f).save(consumer, modResource(meltingFolder + "casting"));
    // tanks
    MeltingRecipeBuilder.melting(NBTIngredient.from(new ItemStack(TinkerSmeltery.scorchedTank.get(TankType.FUEL_TANK))), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 8, 3f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM)).save(consumer, modResource(meltingFolder + "fuel_tank"));
    MeltingRecipeBuilder.melting(NBTIngredient.from(new ItemStack(TinkerSmeltery.scorchedTank.get(TankType.INGOT_TANK))), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 6, 2.5f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM * 3)).save(consumer, modResource(meltingFolder + "ingot_tank"));
    MeltingRecipeBuilder.melting(CompoundIngredient.from(NBTIngredient.from(new ItemStack(TinkerSmeltery.scorchedTank.get(TankType.FUEL_GAUGE))), NBTIngredient.from(new ItemStack(TinkerSmeltery.scorchedTank.get(TankType.INGOT_GAUGE)))), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 4, 2f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM * 5)).save(consumer, modResource(meltingFolder + "gauge"));
    MeltingRecipeBuilder.melting(NBTIngredient.from(new ItemStack(TinkerSmeltery.scorchedLantern)), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 2, 1.0f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM_SHARD)).addByproduct(new FluidStack(TinkerFluids.moltenIron.get(), FluidValues.NUGGET * 3)).save(consumer, modResource(meltingFolder + "lantern"));
    // glass
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedGlass), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 4, 2f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM)).save(consumer, modResource(meltingFolder + "glass"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedGlassPane), TinkerFluids.scorchedStone.get(), FluidValues.BRICK, 1.0f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM_SHARD)).save(consumer, modResource(meltingFolder + "pane"));
    // controllers
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedAlloyer), TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 9, 3.5f).addByproduct(new FluidStack(TinkerFluids.moltenQuartz.get(), FluidValues.GEM * 5)).save(consumer, modResource(meltingFolder + "melter"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.foundryController), TinkerFluids.moltenObsidian.get(), FluidValues.GLASS_BLOCK, 3.5f).addByproduct(new FluidStack(TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 4)).save(consumer, modResource("smeltery/melting/obsidian/foundry_controller"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedDrain, TinkerSmeltery.scorchedChute), TinkerFluids.moltenObsidian.get(), FluidValues.GLASS_PANE * 2, 2.5f).addByproduct(new FluidStack(TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 4)).save(consumer, modResource("smeltery/melting/obsidian/foundry_io"));
    MeltingRecipeBuilder.melting(Ingredient.of(TinkerSmeltery.scorchedDuct), TinkerFluids.moltenCobalt.get(), FluidValues.INGOT * 2, 2.5f).addByproduct(new FluidStack(TinkerFluids.scorchedStone.get(), FluidValues.BRICK * 4)).save(consumer, modResource("smeltery/melting/metal/cobalt/scorched_duct"));
}
Also used : ResourceLocation(net.minecraft.resources.ResourceLocation) EntityTypeTags(net.minecraft.tags.EntityTypeTags) Tags(net.minecraftforge.common.Tags) Items(net.minecraft.world.item.Items) SingleItemRecipeBuilder(net.minecraft.data.recipes.SingleItemRecipeBuilder) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) ForgeMod(net.minecraftforge.common.ForgeMod) ItemNameIngredient(slimeknights.mantle.recipe.data.ItemNameIngredient) ICondition(net.minecraftforge.common.crafting.conditions.ICondition) GeodeItemObject(slimeknights.tconstruct.common.registration.GeodeItemObject) TinkerHeadType(slimeknights.tconstruct.world.TinkerHeadType) TinkerWorld(slimeknights.tconstruct.world.TinkerWorld) FluidAttributes(net.minecraftforge.fluids.FluidAttributes) MoldingRecipeBuilder(slimeknights.tconstruct.library.recipe.molding.MoldingRecipeBuilder) TinkerGadgets(slimeknights.tconstruct.gadgets.TinkerGadgets) EntityMeltingRecipeBuilder(slimeknights.tconstruct.library.recipe.entitymelting.EntityMeltingRecipeBuilder) ISmelteryRecipeHelper(slimeknights.tconstruct.library.data.recipe.ISmelteryRecipeHelper) OreRateType(slimeknights.tconstruct.library.recipe.melting.IMeltingContainer.OreRateType) ItemCastingRecipeBuilder(slimeknights.tconstruct.library.recipe.casting.ItemCastingRecipeBuilder) TankType(slimeknights.tconstruct.smeltery.block.component.SearedTankBlock.TankType) ItemTags(net.minecraft.tags.ItemTags) ICommonRecipeHelper(slimeknights.tconstruct.library.data.recipe.ICommonRecipeHelper) SlimeType(slimeknights.tconstruct.shared.block.SlimeType) ItemNameOutput(slimeknights.mantle.recipe.data.ItemNameOutput) TinkerTags(slimeknights.tconstruct.common.TinkerTags) Blocks(net.minecraft.world.level.block.Blocks) ConfigEnabledCondition(slimeknights.tconstruct.common.json.ConfigEnabledCondition) FluidValues(slimeknights.tconstruct.library.recipe.FluidValues) FluidStack(net.minecraftforge.fluids.FluidStack) ItemStack(net.minecraft.world.item.ItemStack) SimpleCookingRecipeBuilder(net.minecraft.data.recipes.SimpleCookingRecipeBuilder) IngredientIntersection(slimeknights.mantle.recipe.ingredient.IngredientIntersection) ShapedRecipeBuilder(net.minecraft.data.recipes.ShapedRecipeBuilder) EntityType(net.minecraft.world.entity.EntityType) ContainerFillingRecipeBuilder(slimeknights.tconstruct.library.recipe.casting.container.ContainerFillingRecipeBuilder) MeltingRecipeBuilder(slimeknights.tconstruct.library.recipe.melting.MeltingRecipeBuilder) TinkerModifiers(slimeknights.tconstruct.tools.TinkerModifiers) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Ingredient(net.minecraft.world.item.crafting.Ingredient) CompoundIngredient(slimeknights.mantle.recipe.data.CompoundIngredient) FluidIngredient(slimeknights.mantle.recipe.ingredient.FluidIngredient) ItemLike(net.minecraft.world.level.ItemLike) ShapelessRecipeBuilder(net.minecraft.data.recipes.ShapelessRecipeBuilder) FluidTagEmptyCondition(slimeknights.mantle.recipe.helper.FluidTagEmptyCondition) BiConsumer(java.util.function.BiConsumer) Fluid(net.minecraft.world.level.material.Fluid) ConditionalRecipe(net.minecraftforge.common.crafting.ConditionalRecipe) Fluids(net.minecraft.world.level.material.Fluids) TinkerMaterials(slimeknights.tconstruct.shared.TinkerMaterials) DataGenerator(net.minecraft.data.DataGenerator) TinkerCommons(slimeknights.tconstruct.shared.TinkerCommons) IngredientDifference(slimeknights.mantle.recipe.ingredient.IngredientDifference) ConsumerWrapperBuilder(slimeknights.mantle.recipe.data.ConsumerWrapperBuilder) IMeltingRecipe(slimeknights.tconstruct.library.recipe.melting.IMeltingRecipe) TinkerFluids(slimeknights.tconstruct.fluids.TinkerFluids) FluidTags(net.minecraft.tags.FluidTags) FinishedRecipe(net.minecraft.data.recipes.FinishedRecipe) EntityIngredient(slimeknights.mantle.recipe.ingredient.EntityIngredient) Consumer(java.util.function.Consumer) TinkerSmeltery(slimeknights.tconstruct.smeltery.TinkerSmeltery) BaseRecipeProvider(slimeknights.tconstruct.common.data.BaseRecipeProvider) BudSize(slimeknights.tconstruct.common.registration.GeodeItemObject.BudSize) NBTIngredient(slimeknights.mantle.recipe.data.NBTIngredient) FluidObject(slimeknights.mantle.registration.object.FluidObject) NotCondition(net.minecraftforge.common.crafting.conditions.NotCondition) TrueCondition(net.minecraftforge.common.crafting.conditions.TrueCondition) NBTNameIngredient(slimeknights.mantle.recipe.data.NBTNameIngredient) AlloyRecipeBuilder(slimeknights.tconstruct.library.recipe.alloying.AlloyRecipeBuilder) Block(net.minecraft.world.level.block.Block) ItemOutput(slimeknights.mantle.recipe.helper.ItemOutput) MeltingFuelBuilder(slimeknights.tconstruct.library.recipe.fuel.MeltingFuelBuilder) BiConsumer(java.util.function.BiConsumer) Consumer(java.util.function.Consumer) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) FluidStack(net.minecraftforge.fluids.FluidStack) ResourceLocation(net.minecraft.resources.ResourceLocation) ItemStack(net.minecraft.world.item.ItemStack)

Example 5 with ModLoadedCondition

use of net.minecraftforge.common.crafting.conditions.ModLoadedCondition in project TinkersConstruct by SlimeKnights.

the class SmelteryRecipeProvider method addCompatRecipes.

private void addCompatRecipes(Consumer<FinishedRecipe> consumer) {
    String folder = "compat/";
    // create - cast andesite alloy
    ItemOutput andesiteAlloy = ItemNameOutput.fromName(new ResourceLocation("create", "andesite_alloy"));
    Consumer<FinishedRecipe> createConsumer = withCondition(consumer, new ModLoadedCondition("create"));
    ItemCastingRecipeBuilder.basinRecipe(andesiteAlloy).setCast(Blocks.ANDESITE, true).setFluidAndTime(TinkerFluids.moltenIron, true, FluidValues.NUGGET).save(createConsumer, modResource(folder + "create/andesite_alloy_iron"));
    ItemCastingRecipeBuilder.basinRecipe(andesiteAlloy).setCast(Blocks.ANDESITE, true).setFluidAndTime(TinkerFluids.moltenZinc, true, FluidValues.NUGGET).save(createConsumer, modResource(folder + "create/andesite_alloy_zinc"));
    // immersive engineering - casting treated wood
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(new ResourceLocation("immersiveengineering", "treated_wood_horizontal"))).setCast(ItemTags.PLANKS, true).setFluid(FluidTags.bind("forge:creosote"), 125).setCoolingTime(100).save(withCondition(consumer, new ModLoadedCondition("immersiveengineering")), modResource(folder + "immersiveengineering/treated_wood"));
    // ceramics compat: a lot of melting and some casting
    String ceramics = "ceramics";
    String ceramicsFolder = folder + ceramics + "/";
    Function<String, ResourceLocation> ceramicsId = name -> new ResourceLocation(ceramics, name);
    Consumer<FinishedRecipe> ceramicsConsumer = withCondition(consumer, new ModLoadedCondition(ceramics));
    // fill clay and cracked clay buckets
    ContainerFillingRecipeBuilder.tableRecipe(ceramicsId.apply("clay_bucket"), FluidAttributes.BUCKET_VOLUME).save(ceramicsConsumer, modResource(ceramicsFolder + "filling_clay_bucket"));
    ContainerFillingRecipeBuilder.tableRecipe(ceramicsId.apply("cracked_clay_bucket"), FluidAttributes.BUCKET_VOLUME).save(ceramicsConsumer, modResource(ceramicsFolder + "filling_cracked_clay_bucket"));
    // porcelain for ceramics
    AlloyRecipeBuilder.alloy(TinkerFluids.moltenPorcelain.get(), FluidValues.BRICK * 4).addInput(TinkerFluids.moltenClay.getLocalTag(), FluidValues.BRICK * 3).addInput(TinkerFluids.moltenQuartz.getLocalTag(), FluidValues.GEM).save(ceramicsConsumer, modResource(ceramicsFolder + "alloy_porcelain"));
    // melting clay
    String clayFolder = ceramicsFolder + "clay/";
    // unfired clay
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("unfired_clay_plate")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL), 0.5f).save(ceramicsConsumer, modResource(clayFolder + "clay_1"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("clay_faucet"), ceramicsId.apply("clay_channel")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 2), 0.65f).save(ceramicsConsumer, modResource(clayFolder + "clay_2"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("unfired_clay_bucket"), ceramicsId.apply("clay_cistern")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 3), 0.9f).save(ceramicsConsumer, modResource(clayFolder + "clay_3"));
    // 2 bricks
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("dark_bricks_slab"), ceramicsId.apply("dragon_bricks_slab"), ceramicsId.apply("terracotta_faucet"), ceramicsId.apply("terracotta_channel")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 2), 1.33f).save(ceramicsConsumer, modResource(clayFolder + "bricks_2"));
    // 3 bricks
    MeltingRecipeBuilder.melting(CompoundIngredient.from(Ingredient.of(ItemTags.createOptional(ceramicsId.apply("terracotta_cisterns"))), NBTNameIngredient.from(ceramicsId.apply("clay_bucket")), NBTNameIngredient.from(ceramicsId.apply("cracked_clay_bucket"))), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 3), 1.67f).save(ceramicsConsumer, modResource(clayFolder + "bricks_3"));
    // 4 bricks
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("dark_bricks"), ceramicsId.apply("dark_bricks_stairs"), ceramicsId.apply("dark_bricks_wall"), ceramicsId.apply("dragon_bricks"), ceramicsId.apply("dragon_bricks_stairs"), ceramicsId.apply("dragon_bricks_wall")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 4), 2.0f).save(ceramicsConsumer, modResource(clayFolder + "block"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("kiln")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIME_CONGEALED * 3 + FluidValues.SLIMEBALL * 5), 4.0f).save(ceramicsConsumer, modResource(clayFolder + "kiln"));
    // lava bricks, lava byproduct
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("lava_bricks_slab")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 2), 1.33f).addByproduct(new FluidStack(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 20)).save(ceramicsConsumer, modResource(clayFolder + "lava_bricks_slab"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("lava_bricks"), ceramicsId.apply("lava_bricks_stairs"), ceramicsId.apply("lava_bricks_wall")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 4), 2f).addByproduct(new FluidStack(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 10)).save(ceramicsConsumer, modResource(clayFolder + "lava_bricks_block"));
    // gauge, partially glass
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("terracotta_gauge")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL), 1f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_PANE / 4)).save(ceramicsConsumer, modResource(clayFolder + "gauge"));
    // clay armor
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("clay_helmet")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 5), 2.25f).setDamagable().save(ceramicsConsumer, modResource(clayFolder + "clay_helmet"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("clay_chestplate")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 8), 3f).setDamagable().save(ceramicsConsumer, modResource(clayFolder + "clay_chestplate"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("clay_leggings")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 7), 2.75f).setDamagable().save(ceramicsConsumer, modResource(clayFolder + "clay_leggings"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("clay_boots")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 4), 2f).setDamagable().save(ceramicsConsumer, modResource(clayFolder + "clay_boots"));
    // melting porcelain
    String porcelainFolder = ceramicsFolder + "porcelain/";
    // unfired
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("unfired_porcelain")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL), 0.5f).save(ceramicsConsumer, modResource(porcelainFolder + "unfired_1"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("unfired_faucet"), ceramicsId.apply("unfired_channel")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 2), 0.65f).save(ceramicsConsumer, modResource(porcelainFolder + "unfired_2"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("unfired_cistern")), new FluidStack(TinkerFluids.moltenClay.get(), FluidValues.SLIMEBALL * 3), 0.9f).save(ceramicsConsumer, modResource(porcelainFolder + "unfired_3"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("unfired_porcelain_block")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIME_CONGEALED), 1f).save(ceramicsConsumer, modResource(porcelainFolder + "unfired_4"));
    // 1 brick
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("porcelain_brick")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL), 1f).save(ceramicsConsumer, modResource(porcelainFolder + "bricks_1"));
    // 2 bricks
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("porcelain_bricks_slab"), ceramicsId.apply("monochrome_bricks_slab"), ceramicsId.apply("marine_bricks_slab"), ceramicsId.apply("rainbow_bricks_slab"), ceramicsId.apply("porcelain_faucet"), ceramicsId.apply("porcelain_channel")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL * 2), 1.33f).save(ceramicsConsumer, modResource(porcelainFolder + "bricks_2"));
    // 3 bricks
    MeltingRecipeBuilder.melting(Ingredient.of(ItemTags.bind(ceramics + ":porcelain_cisterns")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL * 3), 1.67f).save(ceramicsConsumer, modResource(porcelainFolder + "bricks_3"));
    // 4 bricks
    MeltingRecipeBuilder.melting(CompoundIngredient.from(Ingredient.of(ItemTags.bind(ceramics + ":porcelain_block")), Ingredient.of(ItemTags.bind(ceramics + ":rainbow_porcelain")), ItemNameIngredient.from(ceramicsId.apply("porcelain_bricks"), ceramicsId.apply("porcelain_bricks_stairs"), ceramicsId.apply("porcelain_bricks_wall"), ceramicsId.apply("monochrome_bricks"), ceramicsId.apply("monochrome_bricks_stairs"), ceramicsId.apply("monochrome_bricks_wall"), ceramicsId.apply("marine_bricks"), ceramicsId.apply("marine_bricks_stairs"), ceramicsId.apply("marine_bricks_wall"), ceramicsId.apply("rainbow_bricks"), ceramicsId.apply("rainbow_bricks_stairs"), ceramicsId.apply("rainbow_bricks_wall"))), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL * 4), 2.0f).save(ceramicsConsumer, modResource(porcelainFolder + "blocks"));
    // gold bricks, gold byproduct
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("golden_bricks_slab")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL * 2), 1.33f).addByproduct(// yep, exactly 1mb, such recycling
    new FluidStack(TinkerFluids.moltenGold.get(), FluidValues.NUGGET / 16)).save(ceramicsConsumer, modResource(porcelainFolder + "golden_bricks_slab"));
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("golden_bricks"), ceramicsId.apply("golden_bricks_stairs"), ceramicsId.apply("golden_bricks_wall")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL * 4), 2f).addByproduct(// 2mb is slightly better, but still not great
    new FluidStack(TinkerFluids.moltenGold.get(), FluidValues.NUGGET / 8)).save(ceramicsConsumer, modResource(porcelainFolder + "golden_bricks_block"));
    // gauge, partially glass
    MeltingRecipeBuilder.melting(ItemNameIngredient.from(ceramicsId.apply("porcelain_gauge")), new FluidStack(TinkerFluids.moltenPorcelain.get(), FluidValues.SLIMEBALL), 1f).addByproduct(new FluidStack(TinkerFluids.moltenGlass.get(), FluidValues.GLASS_PANE / 4)).save(ceramicsConsumer, modResource(porcelainFolder + "gauge"));
    // casting bricks
    String castingFolder = ceramicsFolder + "casting/";
    castingWithCast(ceramicsConsumer, TinkerFluids.moltenPorcelain, FluidValues.SLIMEBALL, TinkerSmeltery.ingotCast, ItemNameOutput.fromName(ceramicsId.apply("porcelain_brick")), castingFolder + "porcelain_brick");
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("white_porcelain"))).setFluidAndTime(TinkerFluids.moltenPorcelain, false, FluidValues.SLIME_CONGEALED).save(ceramicsConsumer, modResource(castingFolder + "porcelain"));
    // lava bricks
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("lava_bricks"))).setCast(Blocks.BRICKS, true).setFluidAndTime(new FluidStack(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 10)).save(ceramicsConsumer, modResource(castingFolder + "lava_bricks"));
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("lava_bricks_slab"))).setCast(Blocks.BRICK_SLAB, true).setFluidAndTime(new FluidStack(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 20)).save(ceramicsConsumer, modResource(castingFolder + "lava_bricks_slab"));
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("lava_bricks_stairs"))).setCast(Blocks.BRICK_STAIRS, true).setFluidAndTime(new FluidStack(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 10)).save(ceramicsConsumer, modResource(castingFolder + "lava_bricks_stairs"));
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("lava_bricks_wall"))).setCast(Blocks.BRICK_WALL, true).setFluidAndTime(new FluidStack(Fluids.LAVA, FluidAttributes.BUCKET_VOLUME / 10)).save(ceramicsConsumer, modResource(castingFolder + "lava_bricks_wall"));
    // golden bricks
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("golden_bricks"))).setCast(ItemNameIngredient.from(ceramicsId.apply("porcelain_bricks")), true).setFluidAndTime(TinkerFluids.moltenGold, true, FluidValues.NUGGET / 8).save(ceramicsConsumer, modResource(castingFolder + "golden_bricks"));
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("golden_bricks_slab"))).setCast(ItemNameIngredient.from(ceramicsId.apply("porcelain_bricks_slab")), true).setFluidAndTime(TinkerFluids.moltenGold, true, FluidValues.NUGGET / 16).save(ceramicsConsumer, modResource(castingFolder + "golden_bricks_slab"));
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("golden_bricks_stairs"))).setCast(ItemNameIngredient.from(ceramicsId.apply("porcelain_bricks_stairs")), true).setFluidAndTime(TinkerFluids.moltenGold, true, FluidValues.NUGGET / 8).save(ceramicsConsumer, modResource(castingFolder + "golden_bricks_stairs"));
    ItemCastingRecipeBuilder.basinRecipe(ItemNameOutput.fromName(ceramicsId.apply("golden_bricks_wall"))).setCast(ItemNameIngredient.from(ceramicsId.apply("porcelain_bricks_wall")), true).setFluidAndTime(TinkerFluids.moltenGold, true, FluidValues.NUGGET / 8).save(ceramicsConsumer, modResource(castingFolder + "golden_bricks_wall"));
    // refined glowstone composite
    Consumer<FinishedRecipe> wrapped = withCondition(consumer, tagCondition("ingots/refined_glowstone"), tagCondition("ingots/osmium"));
    ItemCastingRecipeBuilder.tableRecipe(ItemOutput.fromTag(ItemTags.bind("forge:ingots/refined_glowstone"), 1)).setCast(Tags.Items.DUSTS_GLOWSTONE, true).setFluidAndTime(TinkerFluids.moltenOsmium, FluidValues.INGOT).save(wrapped, modResource(folder + "refined_glowstone_ingot"));
    wrapped = withCondition(consumer, tagCondition("ingots/refined_obsidian"), tagCondition("ingots/osmium"));
    ItemCastingRecipeBuilder.tableRecipe(ItemOutput.fromTag(ItemTags.bind("forge:ingots/refined_obsidian"), 1)).setCast(ItemTags.bind("forge:dusts/refined_obsidian"), true).setFluidAndTime(TinkerFluids.moltenOsmium, FluidValues.INGOT).save(wrapped, modResource(folder + "refined_obsidian_ingot"));
    ItemCastingRecipeBuilder.tableRecipe(TinkerMaterials.necroniumBone).setFluidAndTime(TinkerFluids.moltenUranium, true, FluidValues.INGOT).setCast(TinkerTags.Items.WITHER_BONES, true).save(withCondition(consumer, tagCondition("ingots/uranium")), modResource(folder + "necronium_bone"));
}
Also used : ResourceLocation(net.minecraft.resources.ResourceLocation) EntityTypeTags(net.minecraft.tags.EntityTypeTags) Tags(net.minecraftforge.common.Tags) Items(net.minecraft.world.item.Items) SingleItemRecipeBuilder(net.minecraft.data.recipes.SingleItemRecipeBuilder) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) ForgeMod(net.minecraftforge.common.ForgeMod) ItemNameIngredient(slimeknights.mantle.recipe.data.ItemNameIngredient) ICondition(net.minecraftforge.common.crafting.conditions.ICondition) GeodeItemObject(slimeknights.tconstruct.common.registration.GeodeItemObject) TinkerHeadType(slimeknights.tconstruct.world.TinkerHeadType) TinkerWorld(slimeknights.tconstruct.world.TinkerWorld) FluidAttributes(net.minecraftforge.fluids.FluidAttributes) MoldingRecipeBuilder(slimeknights.tconstruct.library.recipe.molding.MoldingRecipeBuilder) TinkerGadgets(slimeknights.tconstruct.gadgets.TinkerGadgets) EntityMeltingRecipeBuilder(slimeknights.tconstruct.library.recipe.entitymelting.EntityMeltingRecipeBuilder) ISmelteryRecipeHelper(slimeknights.tconstruct.library.data.recipe.ISmelteryRecipeHelper) OreRateType(slimeknights.tconstruct.library.recipe.melting.IMeltingContainer.OreRateType) ItemCastingRecipeBuilder(slimeknights.tconstruct.library.recipe.casting.ItemCastingRecipeBuilder) TankType(slimeknights.tconstruct.smeltery.block.component.SearedTankBlock.TankType) ItemTags(net.minecraft.tags.ItemTags) ICommonRecipeHelper(slimeknights.tconstruct.library.data.recipe.ICommonRecipeHelper) SlimeType(slimeknights.tconstruct.shared.block.SlimeType) ItemNameOutput(slimeknights.mantle.recipe.data.ItemNameOutput) TinkerTags(slimeknights.tconstruct.common.TinkerTags) Blocks(net.minecraft.world.level.block.Blocks) ConfigEnabledCondition(slimeknights.tconstruct.common.json.ConfigEnabledCondition) FluidValues(slimeknights.tconstruct.library.recipe.FluidValues) FluidStack(net.minecraftforge.fluids.FluidStack) ItemStack(net.minecraft.world.item.ItemStack) SimpleCookingRecipeBuilder(net.minecraft.data.recipes.SimpleCookingRecipeBuilder) IngredientIntersection(slimeknights.mantle.recipe.ingredient.IngredientIntersection) ShapedRecipeBuilder(net.minecraft.data.recipes.ShapedRecipeBuilder) EntityType(net.minecraft.world.entity.EntityType) ContainerFillingRecipeBuilder(slimeknights.tconstruct.library.recipe.casting.container.ContainerFillingRecipeBuilder) MeltingRecipeBuilder(slimeknights.tconstruct.library.recipe.melting.MeltingRecipeBuilder) TinkerModifiers(slimeknights.tconstruct.tools.TinkerModifiers) Function(java.util.function.Function) Supplier(java.util.function.Supplier) Ingredient(net.minecraft.world.item.crafting.Ingredient) CompoundIngredient(slimeknights.mantle.recipe.data.CompoundIngredient) FluidIngredient(slimeknights.mantle.recipe.ingredient.FluidIngredient) ItemLike(net.minecraft.world.level.ItemLike) ShapelessRecipeBuilder(net.minecraft.data.recipes.ShapelessRecipeBuilder) FluidTagEmptyCondition(slimeknights.mantle.recipe.helper.FluidTagEmptyCondition) BiConsumer(java.util.function.BiConsumer) Fluid(net.minecraft.world.level.material.Fluid) ConditionalRecipe(net.minecraftforge.common.crafting.ConditionalRecipe) Fluids(net.minecraft.world.level.material.Fluids) TinkerMaterials(slimeknights.tconstruct.shared.TinkerMaterials) DataGenerator(net.minecraft.data.DataGenerator) TinkerCommons(slimeknights.tconstruct.shared.TinkerCommons) IngredientDifference(slimeknights.mantle.recipe.ingredient.IngredientDifference) ConsumerWrapperBuilder(slimeknights.mantle.recipe.data.ConsumerWrapperBuilder) IMeltingRecipe(slimeknights.tconstruct.library.recipe.melting.IMeltingRecipe) TinkerFluids(slimeknights.tconstruct.fluids.TinkerFluids) FluidTags(net.minecraft.tags.FluidTags) FinishedRecipe(net.minecraft.data.recipes.FinishedRecipe) EntityIngredient(slimeknights.mantle.recipe.ingredient.EntityIngredient) Consumer(java.util.function.Consumer) TinkerSmeltery(slimeknights.tconstruct.smeltery.TinkerSmeltery) BaseRecipeProvider(slimeknights.tconstruct.common.data.BaseRecipeProvider) BudSize(slimeknights.tconstruct.common.registration.GeodeItemObject.BudSize) NBTIngredient(slimeknights.mantle.recipe.data.NBTIngredient) FluidObject(slimeknights.mantle.registration.object.FluidObject) NotCondition(net.minecraftforge.common.crafting.conditions.NotCondition) TrueCondition(net.minecraftforge.common.crafting.conditions.TrueCondition) NBTNameIngredient(slimeknights.mantle.recipe.data.NBTNameIngredient) AlloyRecipeBuilder(slimeknights.tconstruct.library.recipe.alloying.AlloyRecipeBuilder) Block(net.minecraft.world.level.block.Block) ItemOutput(slimeknights.mantle.recipe.helper.ItemOutput) MeltingFuelBuilder(slimeknights.tconstruct.library.recipe.fuel.MeltingFuelBuilder) FinishedRecipe(net.minecraft.data.recipes.FinishedRecipe) ItemOutput(slimeknights.mantle.recipe.helper.ItemOutput) ModLoadedCondition(net.minecraftforge.common.crafting.conditions.ModLoadedCondition) FluidStack(net.minecraftforge.fluids.FluidStack) ResourceLocation(net.minecraft.resources.ResourceLocation)

Aggregations

ModLoadedCondition (net.minecraftforge.common.crafting.conditions.ModLoadedCondition)6 NotCondition (net.minecraftforge.common.crafting.conditions.NotCondition)5 ICondition (net.minecraftforge.common.crafting.conditions.ICondition)4 FluidStack (net.minecraftforge.fluids.FluidStack)4 ItemNameIngredient (slimeknights.mantle.recipe.data.ItemNameIngredient)4 BiConsumer (java.util.function.BiConsumer)3 Consumer (java.util.function.Consumer)3 Function (java.util.function.Function)3 Supplier (java.util.function.Supplier)3 DataGenerator (net.minecraft.data.DataGenerator)3 FinishedRecipe (net.minecraft.data.recipes.FinishedRecipe)3 ShapedRecipeBuilder (net.minecraft.data.recipes.ShapedRecipeBuilder)3 ShapelessRecipeBuilder (net.minecraft.data.recipes.ShapelessRecipeBuilder)3 SimpleCookingRecipeBuilder (net.minecraft.data.recipes.SimpleCookingRecipeBuilder)3 SingleItemRecipeBuilder (net.minecraft.data.recipes.SingleItemRecipeBuilder)3 ResourceLocation (net.minecraft.resources.ResourceLocation)3 EntityTypeTags (net.minecraft.tags.EntityTypeTags)3 FluidTags (net.minecraft.tags.FluidTags)3 ItemTags (net.minecraft.tags.ItemTags)3 EntityType (net.minecraft.world.entity.EntityType)3