Search in sources :

Example 1 with Slurry

use of mekanism.api.chemical.slurry.Slurry in project Mekanism by mekanism.

the class MekanismCrTExampleProvider method addRecipeExamples.

private void addRecipeExamples() {
    exampleBuilder("mekanism_crystallizer").comment("Adds two Crystallizing Recipes that do the following:", "1) Adds a recipe that produces one Carrot out of 150 mB of Nutritional Paste.", "2) Adds a recipe that produces one Gold Nugget out of 9 mB of the Gold Infuse Type.").blankLine().recipe(ChemicalCrystallizerRecipeManager.INSTANCE).addExample("paste_to_carrots", GasStackIngredient.from(MekanismGases.NUTRITIONAL_PASTE, 150), new ItemStack(Items.CARROT)).addExample("gold_infusion_to_gold", InfusionStackIngredient.from(MekanismTags.InfuseTypes.GOLD, 9), new ItemStack(Items.GOLD_NUGGET)).end().comment("Removes two Crystallizing Recipes:", "1) The recipe for producing Lithium Dust.", "2) The recipe for producing Antimatter Pellets.").blankLine().removeRecipes(ChemicalCrystallizerRecipeManager.INSTANCE, Mekanism.rl("crystallizing/lithium"), Mekanism.rl("processing/lategame/antimatter_pellet/from_gas"));
    exampleBuilder("mekanism_dissolution").comment("Adds a Dissolution Recipe that uses 100 mB of Sulfuric Acid (1 mB per tick) to convert Salt into 10 mB of Hydrogen Chloride.").blankLine().recipe(ChemicalDissolutionRecipeManager.INSTANCE).addExample("salt_to_hydrogen_chloride", ItemStackIngredient.from(MekanismItems.SALT), GasStackIngredient.from(MekanismGases.SULFURIC_ACID, 1), MekanismGases.HYDROGEN_CHLORIDE.getStack(10)).end().comment("Removes two Dissolution Recipes:", "1) The recipe for producing Hydrofluoric Acid from Fluorite.", "2) The recipe for producing Dirty Lead Slurry from Lead Ore.").blankLine().removeRecipes(ChemicalDissolutionRecipeManager.INSTANCE, Mekanism.rl("processing/uranium/hydrofluoric_acid"), Mekanism.rl("processing/lead/slurry/dirty"));
    exampleBuilder("mekanism_chemical_infusing").comment("Adds a Chemical Infusing Recipe that uses 1 mB of Hydrogen Chloride and 1 mB of Water Vapor to produce 2 mB of Gaseous Brine.").blankLine().recipe(ChemicalInfuserRecipeManager.INSTANCE).addExample("gaseous_brine", GasStackIngredient.from(MekanismGases.HYDROGEN_CHLORIDE, 1), GasStackIngredient.from(MekanismGases.WATER_VAPOR, 1), MekanismGases.BRINE.getStack(2)).end().comment("Removes the Chemical Infusing Recipe for producing Sulfur Trioxide from Oxygen and Sulfur Dioxide.").blankLine().removeRecipes(ChemicalInfuserRecipeManager.INSTANCE, Mekanism.rl("chemical_infusing/sulfur_trioxide"));
    exampleBuilder("mekanism_combining").comment("Adds two Combining Recipes that do the following:", "1) Adds a recipe that combines three Books and six Planks into a Bookshelf.", "2) Adds a recipe that combines eight Prismarine Shards and one Black Dye into a block of Dark Prismarine.").blankLine().recipe(CombinerRecipeManager.INSTANCE).addExample("combining/bookshelf", ItemStackIngredient.from(Items.BOOK, 3), ItemStackIngredient.from(ItemTags.PLANKS, 6), new ItemStack(Blocks.BOOKSHELF)).addExample("combining/dark_prismarine", ItemStackIngredient.from(Items.PRISMARINE_SHARD, 8), ItemStackIngredient.from(Tags.Items.DYES_BLACK), new ItemStack(Blocks.DARK_PRISMARINE)).end().comment("Removes two Combining Recipes:", "1) The recipe for producing Fluorite Ore.", "2) The recipe for producing Light Blue Dye from Blue Dye and White Dye.").blankLine().removeRecipes(CombinerRecipeManager.INSTANCE, Mekanism.rl("processing/fluorite/to_ore"), Mekanism.rl("combining/dye/light_blue"));
    exampleBuilder("mekanism_separating").comment("Adds two Separating Recipes that do the following:", "1) Adds a recipe that separates 2 mB of Liquid Sulfur Trioxide into 1 mB of Oxygen and 2 mB of Sulfur Dioxide.", "2) Adds a recipe that separates 1 mB of Liquid Sulfur Acid into 1 mB of Water Vapor and 1 mB of Sulfur Trioxide, " + "using one and a half times as much energy as it takes to separate Oxygen and Hydrogen from Water.").blankLine().recipe(ElectrolysisRecipeManager.INSTANCE).addExample("separator/sulfur_trioxide", FluidStackIngredient.from(MekanismTags.Fluids.SULFUR_TRIOXIDE, 2), MekanismGases.OXYGEN.getStack(1), MekanismGases.SULFUR_DIOXIDE.getStack(2)).addExample("separator/sulfuric_acid", FluidStackIngredient.from(MekanismTags.Fluids.SULFURIC_ACID, 1), MekanismGases.WATER_VAPOR.getStack(1), MekanismGases.SULFUR_TRIOXIDE.getStack(1), FloatingLong.createConst(1.5)).end().comment("Removes the Separating Recipe for separating Brine into Sodium and Chlorine.").blankLine().removeRecipes(ElectrolysisRecipeManager.INSTANCE, Mekanism.rl("separator/brine"));
    SlurryRegistryObject<Slurry, Slurry> uraniumSlurryRO = MekanismSlurries.PROCESSED_RESOURCES.get(PrimaryResource.URANIUM);
    exampleBuilder("mekanism_washing").comment("Removes the Washing Recipe for cleaning Dirty Uranium Slurry.").blankLine().removeRecipes(ChemicalWasherRecipeManager.INSTANCE, Mekanism.rl("processing/uranium/slurry/clean")).comment("Add back the Washing Recipe that was removed above, this time having it require 10 mB of water to clean 1 mB of Dirty Uranium Slurry instead of 5 mB:").blankLine().recipe(ChemicalWasherRecipeManager.INSTANCE).addExample("cleaning_uranium_slurry", FluidStackIngredient.from(FluidTags.WATER, 10), SlurryStackIngredient.from(uraniumSlurryRO.getDirtySlurry(), 1), uraniumSlurryRO.getCleanSlurry().getStack(1)).end();
    exampleBuilder("mekanism_evaporating").comment("Adds an Evaporating Recipe that evaporates 10 mB of Lithium and produces 1 mB of Chlorine.").blankLine().recipe(EvaporatingRecipeManager.INSTANCE).addExample("evaporate_lithium", FluidStackIngredient.from(MekanismTags.Fluids.LITHIUM, 10), MekanismFluids.CHLORINE.getFluidStack(1)).end().comment("Removes the Evaporating Recipe for producing Lithium from Brine.").blankLine().removeRecipes(EvaporatingRecipeManager.INSTANCE, Mekanism.rl("evaporating/lithium"));
    exampleBuilder("mekanism_activating").comment("Adds an Activating Recipe that converts 1 mB of Water Vapor to 1 mB of Gaseous Brine.").blankLine().recipe(SolarNeutronActivatorRecipeManager.INSTANCE).addExample("activate_water_vapor", GasStackIngredient.from(MekanismGases.WATER_VAPOR, 1), MekanismGases.BRINE.getStack(1)).end().comment("Removes the Activating Recipe for producing Polonium from Nuclear Waste.").blankLine().removeRecipes(SolarNeutronActivatorRecipeManager.INSTANCE, Mekanism.rl("processing/lategame/polonium"));
    exampleBuilder("mekanism_centrifuging").comment("Adds a Centrifuging Recipe that converts 1 mB of Gaseous Brine into 1 mB of Hydrogen Chloride.").blankLine().recipe(IsotopicCentrifugeRecipeManager.INSTANCE).addExample("centrifuge_brine", GasStackIngredient.from(MekanismGases.BRINE, 1), MekanismGases.HYDROGEN_CHLORIDE.getStack(1)).end().comment("Removes the Centrifuging Recipe for producing Plutonium from Nuclear Waste.").blankLine().removeRecipes(IsotopicCentrifugeRecipeManager.INSTANCE, Mekanism.rl("processing/lategame/plutonium"));
    exampleBuilder("mekanism_compressing").comment("Adds a Compressing Recipe that compresses Emerald Dust into an Emerald.").blankLine().recipe(OsmiumCompressorRecipeManager.INSTANCE).addExample("compress_emerald", ItemStackIngredient.from(MekanismTags.Items.DUSTS_EMERALD), GasStackIngredient.from(MekanismGases.LIQUID_OSMIUM, 1), new ItemStack(Items.EMERALD)).end().comment("Removes the Compressing Recipe that creates Refined Obsidian Ingots.").blankLine().removeRecipes(OsmiumCompressorRecipeManager.INSTANCE, Mekanism.rl("processing/refined_obsidian/ingot/from_dust"));
    exampleBuilder("mekanism_injecting").comment("Adds an Injecting Recipe that injects 1,000 mB of Water Vapor (5 mB per tick) into a Dry Sponge to make it Wet.").blankLine().recipe(ChemicalInjectionRecipeManager.INSTANCE).addExample("inject_water_to_sponge", ItemStackIngredient.from(Blocks.SPONGE), GasStackIngredient.from(MekanismTags.Gases.WATER_VAPOR, 5), new ItemStack(Blocks.WET_SPONGE)).end().comment("Removes the Injecting Recipe that creates Gold Shards from Gold Ore.").blankLine().removeRecipes(ChemicalInjectionRecipeManager.INSTANCE, Mekanism.rl("processing/gold/shard/from_ore"));
    exampleBuilder("mekanism_purifying").comment("Adds a Purifying Recipe that uses 200 mB of Oxygen (1 mB per tick) Basalt into Polished Basalt.").blankLine().recipe(PurificationRecipeManager.INSTANCE).addExample("purify_basalt", ItemStackIngredient.from(Blocks.BASALT), GasStackIngredient.from(MekanismGases.OXYGEN, 1), new ItemStack(Blocks.POLISHED_BASALT)).end().comment("Removes the Purifying Recipe that creates Gold Clumps from Gold Ore.").blankLine().removeRecipes(PurificationRecipeManager.INSTANCE, Mekanism.rl("processing/gold/clump/from_ore"));
    exampleBuilder("mekanism_metallurgic_infusing").comment("Adds a Metallurgic Infusing Recipe that uses 10 mB of Fungi Infuse Type to convert any Oak Planks into Crimson Planks.").blankLine().recipe(MetallurgicInfuserRecipeManager.INSTANCE).addExample("infuse_planks", ItemStackIngredient.from(Blocks.OAK_PLANKS), InfusionStackIngredient.from(MekanismInfuseTypes.FUNGI, 10), new ItemStack(Blocks.CRIMSON_PLANKS)).end().comment("Removes the Metallurgic Infusing Recipe that allows creating Dirt from Sand.").blankLine().removeRecipes(MetallurgicInfuserRecipeManager.INSTANCE, Mekanism.rl("metallurgic_infusing/sand_to_dirt"));
    exampleBuilder("mekanism_painting").comment("Adds a Painting Recipe that uses 256 mB Red Pigment to convert Clear Sand into Red Sand.").blankLine().recipe(PaintingRecipeManager.INSTANCE).addExample("paint_sand", ItemStackIngredient.from(Tags.Items.SAND_COLORLESS), PigmentStackIngredient.from(MekanismPigments.PIGMENT_COLOR_LOOKUP.get(EnumColor.RED), 256), new ItemStack(Blocks.RED_SAND)).end().comment("Removes the Painting Recipe that allows creating White Dye.").blankLine().removeRecipes(PaintingRecipeManager.INSTANCE, Mekanism.rl("painting/dye/white"));
    exampleBuilder("mekanism_energy_conversion").comment("Adds an Energy Conversion Recipe that allows converting Redstone Ore into 45 kJ of power.").blankLine().recipe(EnergyConversionRecipeManager.INSTANCE).addExample("redstone_ore_to_power", ItemStackIngredient.from(Tags.Items.ORES_REDSTONE), FloatingLong.createConst(45_000)).end().comment("Removes the Energy Conversion Recipe that allows converting Redstone Blocks into Power.").blankLine().removeRecipes(EnergyConversionRecipeManager.INSTANCE, Mekanism.rl("energy_conversion/redstone_block"));
    exampleBuilder("mekanism_gas_conversion").comment("Adds a Gas Conversion Recipe that allows converting Osmium Nuggets into 22 mB of Osmium.").blankLine().recipe(GasConversionRecipeManager.INSTANCE).addExample("gas_conversion/osmium_from_nugget", ItemStackIngredient.from(MekanismTags.Items.PROCESSED_RESOURCES.get(ResourceType.NUGGET, PrimaryResource.OSMIUM)), MekanismGases.LIQUID_OSMIUM.getStack(22)).end().comment("Removes the Gas Conversion Recipe that allows converting Osmium Blocks into Osmium.").blankLine().removeRecipes(GasConversionRecipeManager.INSTANCE, Mekanism.rl("gas_conversion/osmium_from_block"));
    exampleBuilder("mekanism_oxidizing").comment("Adds an Oxidizing Recipe that allows converting Salt Blocks into 60 mB of Gaseous Brine.").blankLine().recipe(ChemicalOxidizerRecipeManager.INSTANCE).addExample("oxidize_salt_block", ItemStackIngredient.from(MekanismBlocks.SALT_BLOCK), MekanismGases.BRINE.getStack(60)).end().comment("Removes the Oxidizing Recipe that allows Sulfur Dioxide from Sulfur Dust.").blankLine().removeRecipes(ChemicalOxidizerRecipeManager.INSTANCE, Mekanism.rl("oxidizing/sulfur_dioxide"));
    exampleBuilder("mekanism_infusion_conversion").comment("Adds an Infusion Conversion Recipe that allows converting Gold Ingots into 10 mB Gold Infuse Type.").blankLine().recipe(InfusionConversionRecipeManager.INSTANCE).addExample("infusion_conversion/gold/from_ingot", ItemStackIngredient.from(Tags.Items.INGOTS_GOLD), MekanismInfuseTypes.GOLD.getStack(10)).end().comment("Removes the Infusion Conversion Recipe that allows converting Bio Fuel into the Bio Infuse Type.").blankLine().removeRecipes(InfusionConversionRecipeManager.INSTANCE, Mekanism.rl("infusion_conversion/bio/from_bio_fuel"));
    exampleBuilder("mekanism_crushing").comment("Adds a Crushing Recipe to crush Brick Blocks into four Bricks.").blankLine().recipe(CrusherRecipeManager.INSTANCE).addExample("crush_bricks", ItemStackIngredient.from(Blocks.BRICKS), new ItemStack(Items.BRICK, 4)).end().comment("Removes the Crushing Recipe that produces String from Wool.").blankLine().removeRecipes(CrusherRecipeManager.INSTANCE, Mekanism.rl("crushing/wool_to_string"));
    exampleBuilder("mekanism_enriching").comment("Adds an Enriching Recipe to convert 20 Oak Leaves into an Oak Sapling.").blankLine().recipe(EnrichmentChamberRecipeManager.INSTANCE).addExample("oak_leaves_to_saplings", ItemStackIngredient.from(Blocks.OAK_LEAVES, 20), new ItemStack(Blocks.OAK_SAPLING)).end().comment("Removes the Enriching Recipe that creates Gold Dust from Gold Ore.").blankLine().removeRecipes(EnrichmentChamberRecipeManager.INSTANCE, Mekanism.rl("processing/gold/dust/from_ore"));
    exampleBuilder("mekanism_smelting").comment("Adds a Smelting Recipe that works in Mekanism machines but won't work in a regular furnace to smelt Stone Slabs into Smooth Stone Slabs.").blankLine().recipe(EnergizedSmelterRecipeManager.INSTANCE).addExample("smelt_stone_slab", ItemStackIngredient.from(Blocks.STONE_SLAB), new ItemStack(Blocks.SMOOTH_STONE_SLAB)).end();
    exampleBuilder("mekanism_pigment_extracting").comment("Adds a Pigment Extracting Recipe that extracts 6,912 mB of Blue Pigment from a Lapis Lazuli Block.").blankLine().recipe(PigmentExtractingRecipeManager.INSTANCE).addExample("extract_lapis_block_pigment", ItemStackIngredient.from(Tags.Items.STORAGE_BLOCKS_LAPIS), MekanismPigments.PIGMENT_COLOR_LOOKUP.get(EnumColor.DARK_BLUE).getStack(6_912)).end().comment("Removes the Pigment Extracting Recipe that extracts Brown Pigment from Brown Dye.").blankLine().removeRecipes(PigmentExtractingRecipeManager.INSTANCE, Mekanism.rl("pigment_extracting/dye/brown"));
    exampleBuilder("mekanism_nucleosynthesizing").comment("Adds a Nucleosynthesizing Recipe that converts a Block of Coal to a Block of Diamond in 9,000 ticks (7 minutes 30 seconds).").blankLine().recipe(NucleosynthesizingRecipeManager.INSTANCE).addExample("coal_block_to_diamond_block", ItemStackIngredient.from(Tags.Items.STORAGE_BLOCKS_COAL), GasStackIngredient.from(MekanismGases.ANTIMATTER, 36), new ItemStack(Blocks.DIAMOND_BLOCK), 9_000).end().comment("Removes the Nucleosynthesizing Recipe that converts Tin Ingots into Iron Ingots.").blankLine().removeRecipes(NucleosynthesizingRecipeManager.INSTANCE, Mekanism.rl("nucleosynthesizing/iron"));
    exampleBuilder("mekanism_pigment_mixing").comment("Adds a Pigment Mixing Recipe that mixes 1 mB of White Pigment with 4 mB of Dark Red Pigment to produce 5 mB of Red Pigment.").blankLine().recipe(PigmentMixingRecipeManager.INSTANCE).addExample("pigment_mixing/white_dark_red_to_red", PigmentStackIngredient.from(MekanismPigments.PIGMENT_COLOR_LOOKUP.get(EnumColor.WHITE), 1), PigmentStackIngredient.from(MekanismPigments.PIGMENT_COLOR_LOOKUP.get(EnumColor.DARK_RED), 4), MekanismPigments.PIGMENT_COLOR_LOOKUP.get(EnumColor.RED).getStack(5)).end().comment("Removes the Pigment Mixing Recipe that produces Dark Red Pigment from Black and Red Pigment.").blankLine().removeRecipes(PigmentMixingRecipeManager.INSTANCE, Mekanism.rl("pigment_mixing/black_red_to_dark_red"));
    exampleBuilder("mekanism_reaction").comment("Adds six Reaction Recipes that do the following:", "1) Adds a recipe that uses 350 mB of Water, 50 mB of Hydrogen Chloride, and a piece of Sawdust to create two pieces of Paper in 45 ticks, using an extra 25 Joules.", "2) Adds a recipe that uses 100 mB of Liquid Chlorine, 100 mB of Hydrogen, and a Block of Sand to create a Salt Block in 300 ticks.", "3) Adds a recipe that uses 50 mB of Water, 50 mB of Oxygen, and eight Wooden Pressure Plates to create 50 mB of Hydrogen in 74 ticks, using an extra 100 Joules.", "4) Adds a recipe that uses 25 mB of Water, 25 mB of Oxygen, and eight Wooden Buttons to create 25 mB of Hydrogen in 37 ticks.", "5) Adds a recipe that uses 400 mB of Water, 400 mB of Oxygen, and twenty Wooden Fence to create a Charcoal Dust and 400 mB of Hydrogen in 600 ticks, using an extra 300 Joules.", "6) Adds a recipe that uses 400 mB of Water, 400 mB of Oxygen, and four Boats to create a Charcoal Dust and 400 mB of Hydrogen in 600 ticks.").blankLine().recipe(PressurizedReactionRecipeManager.INSTANCE).addExample("reaction/sawdust", ItemStackIngredient.from(MekanismTags.Items.SAWDUST), FluidStackIngredient.from(FluidTags.WATER, 350), GasStackIngredient.from(MekanismGases.HYDROGEN_CHLORIDE, 50), 45, new ItemStack(Items.PAPER, 2), FloatingLong.createConst(25)).addExample("reaction/sand", ItemStackIngredient.from(Tags.Items.SAND), FluidStackIngredient.from(MekanismTags.Fluids.CHLORINE, 100), GasStackIngredient.from(MekanismGases.HYDROGEN, 100), 300, MekanismBlocks.SALT_BLOCK.getItemStack()).addExample("reaction/wooden_buttons", ItemStackIngredient.from(ItemTags.WOODEN_BUTTONS, 8), FluidStackIngredient.from(FluidTags.WATER, 25), GasStackIngredient.from(MekanismGases.OXYGEN, 25), 37, MekanismGases.HYDROGEN.getStack(25)).addExample("reaction/wooden_pressure_plates", ItemStackIngredient.from(ItemTags.WOODEN_PRESSURE_PLATES, 8), FluidStackIngredient.from(FluidTags.WATER, 50), GasStackIngredient.from(MekanismGases.OXYGEN, 50), 74, MekanismGases.HYDROGEN.getStack(50), FloatingLong.createConst(100)).addExample("reaction/wooden_fences", ItemStackIngredient.from(ItemTags.WOODEN_FENCES, 20), FluidStackIngredient.from(FluidTags.WATER, 400), GasStackIngredient.from(MekanismGases.OXYGEN, 400), 600, MekanismItems.CHARCOAL_DUST.getItemStack(), MekanismGases.HYDROGEN.getStack(400), FloatingLong.createConst(300)).addExample("reaction/boat", ItemStackIngredient.from(ItemTags.BOATS, 4), FluidStackIngredient.from(FluidTags.WATER, 400), GasStackIngredient.from(MekanismGases.OXYGEN, 400), 600, MekanismItems.CHARCOAL_DUST.getItemStack(), MekanismGases.HYDROGEN.getStack(400)).end().comment("Removes the Reaction Recipe for producing Substrate from Bio Fuel.").blankLine().removeRecipes(PressurizedReactionRecipeManager.INSTANCE, Mekanism.rl("reaction/substrate/water_hydrogen"));
    exampleBuilder("mekanism_rotary").comment("Removes three Rotary Recipes:", "1) The recipe for converting between Liquid Lithium and Lithium.", "2) The recipe for converting between Liquid Sulfur Dioxide and Sulfur Dioxide.", "3) The recipe for converting between Liquid Sulfur Trioxide and Sulfur Trioxide.").blankLine().removeRecipes(RotaryRecipeManager.INSTANCE, Mekanism.rl("rotary/lithium"), Mekanism.rl("rotary/sulfur_dioxide"), Mekanism.rl("rotary/sulfur_trioxide")).comment("Adds back three Rotary Recipes that correspond to the ones removed above:", "1) Adds a recipe to condensentrate Lithium to Liquid Lithium.", "2) Adds a recipe to decondensentrate Liquid Sulfur Dioxide to Sulfur Dioxide.", "3) Adds a recipe to convert between Liquid Sulfur Trioxide and Sulfur Trioxide.").blankLine().recipe(RotaryRecipeManager.INSTANCE).addExample("condensentrate_lithium", GasStackIngredient.from(MekanismGases.LITHIUM, 1), MekanismFluids.LITHIUM.getFluidStack(1)).addExample("decondensentrate_sulfur_dioxide", FluidStackIngredient.from(MekanismTags.Fluids.SULFUR_DIOXIDE, 1), MekanismGases.SULFUR_DIOXIDE.getStack(1)).addExample("rotary_sulfur_trioxide", FluidStackIngredient.from(MekanismTags.Fluids.SULFUR_TRIOXIDE, 1), GasStackIngredient.from(MekanismGases.SULFUR_TRIOXIDE, 1), MekanismGases.SULFUR_TRIOXIDE.getStack(1), MekanismFluids.SULFUR_TRIOXIDE.getFluidStack(1)).end();
    exampleBuilder("mekanism_sawing").comment("Adds five Sawing Recipes that do the following:", "1) Adds a recipe for sawing Melon Slices into Melon Seeds.", "2) Adds a recipe for sawing fifteen Leaves into a 5% chance of Sawdust.", "3) Adds a recipe for sawing five Saplings into a 75% chance of Sawdust.", "4) Adds a recipe for sawing a Shield into four Planks and a 50% chance of four additional Planks.", "5) Adds a recipe for sawing a Crafting Table into five Oak Planks and a 25% chance of Sawdust.", "6) Adds a recipe for sawing Books into Paper and Leather.").blankLine().recipe(SawmillRecipeManager.INSTANCE).addExample("sawing/melon_to_seeds", ItemStackIngredient.from(Items.MELON_SLICE), new WeightedItemStack(Items.MELON_SEEDS)).addExample("sawing/leaves", ItemStackIngredient.from(ItemTags.LEAVES, 15), new WeightedItemStack(MekanismItems.SAWDUST, 0.5)).addExample("sawing/saplings", ItemStackIngredient.from(ItemTags.SAPLINGS, 5), MekanismItems.SAWDUST.getItemStack(), 0.75).addExample("sawing/shield", ItemStackIngredient.from(Items.SHIELD), new WeightedItemStack(new ItemStack(Items.OAK_PLANKS, 4), 1.5)).addExample("sawing/workbench", ItemStackIngredient.from(Blocks.CRAFTING_TABLE), new ItemStack(Items.OAK_PLANKS, 5), new WeightedItemStack(MekanismItems.SAWDUST, 0.25)).addExample("sawing/book", ItemStackIngredient.from(Items.BOOK), new ItemStack(Items.PAPER, 3), new ItemStack(Items.LEATHER, 6), 1.0).end().comment("Removes the Sawing Recipe for producing Oak Planks from Oak Logs.").blankLine().removeRecipes(SawmillRecipeManager.INSTANCE, Mekanism.rl("sawing/log/oak"));
}
Also used : Slurry(mekanism.api.chemical.slurry.Slurry) ItemStack(net.minecraft.item.ItemStack)

Example 2 with Slurry

use of mekanism.api.chemical.slurry.Slurry in project Mekanism by mekanism.

the class CrTSlurryBuilder method build.

@Override
protected void build(ResourceLocation registryName) {
    Slurry slurry;
    if (colorRepresentation == null) {
        slurry = new Slurry(getInternal());
    } else {
        int color = colorRepresentation;
        slurry = new Slurry(getInternal()) {

            @Override
            public int getColorRepresentation() {
                return color;
            }
        };
    }
    CrTContentUtils.queueSlurryForRegistration(registryName, slurry);
}
Also used : Slurry(mekanism.api.chemical.slurry.Slurry)

Example 3 with Slurry

use of mekanism.api.chemical.slurry.Slurry in project Mekanism by mekanism.

the class GuiChemicalCrystallizer method updateSlotContents.

private void updateSlotContents() {
    BoxedChemicalStack boxedChemical = oreInfo.getInputChemical();
    if (!boxedChemical.isEmpty() && boxedChemical.getChemicalType() == ChemicalType.SLURRY) {
        Slurry inputSlurry = (Slurry) boxedChemical.getChemicalStack().getType();
        if (prevSlurry != inputSlurry) {
            prevSlurry = inputSlurry;
            iterStacks.clear();
            if (!prevSlurry.isEmptyType() && !prevSlurry.isIn(MekanismTags.Slurries.DIRTY)) {
                ITag<Item> oreTag = prevSlurry.getOreTag();
                if (oreTag != null) {
                    for (Item ore : oreTag.getValues()) {
                        iterStacks.add(new ItemStack(ore));
                    }
                }
            }
            slotDisplay.updateStackList();
        }
    } else if (!prevSlurry.isEmptyType()) {
        prevSlurry = MekanismAPI.EMPTY_SLURRY;
        iterStacks.clear();
        slotDisplay.updateStackList();
    }
}
Also used : Item(net.minecraft.item.Item) Slurry(mekanism.api.chemical.slurry.Slurry) ItemStack(net.minecraft.item.ItemStack) BoxedChemicalStack(mekanism.api.chemical.merged.BoxedChemicalStack)

Example 4 with Slurry

use of mekanism.api.chemical.slurry.Slurry in project Mekanism by mekanism.

the class ChemicalCrystallizerRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayout recipeLayout, ChemicalCrystallizerRecipe recipe, IIngredients ingredients) {
    IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks();
    initItem(itemStacks, 0, false, output, recipe.getOutputDefinition());
    IChemicalStackIngredient<?, ?> input = recipe.getInput();
    if (input instanceof GasStackIngredient) {
        initChemical(recipeLayout, recipe, MekanismJEI.TYPE_GAS, (GasStackIngredient) input, null);
    } else if (input instanceof InfusionStackIngredient) {
        initChemical(recipeLayout, recipe, MekanismJEI.TYPE_INFUSION, (InfusionStackIngredient) input, null);
    } else if (input instanceof PigmentStackIngredient) {
        initChemical(recipeLayout, recipe, MekanismJEI.TYPE_PIGMENT, (PigmentStackIngredient) input, null);
    } else if (input instanceof SlurryStackIngredient) {
        SlurryStackIngredient slurryInput = (SlurryStackIngredient) input;
        Set<ITag<Item>> tags = new HashSet<>();
        for (SlurryStack slurryStack : slurryInput.getRepresentations()) {
            Slurry slurry = slurryStack.getType();
            if (!slurry.isIn(MekanismTags.Slurries.DIRTY)) {
                ITag<Item> oreTag = slurry.getOreTag();
                if (oreTag != null) {
                    tags.add(oreTag);
                }
            }
        }
        if (tags.size() == 1) {
            initChemical(recipeLayout, recipe, MekanismJEI.TYPE_SLURRY, slurryInput, itemStacks);
            // TODO: Eventually come up with a better way to do this to allow for if there outputs based on the input and multiple input types
            tags.stream().findFirst().ifPresent(tag -> initItem(itemStacks, 1, false, slurryOreSlot, tag.getValues().stream().map(ItemStack::new).collect(Collectors.toList())));
        } else {
            initChemical(recipeLayout, recipe, MekanismJEI.TYPE_SLURRY, slurryInput, null);
        }
    }
}
Also used : IOreInfo(mekanism.client.gui.machine.GuiChemicalCrystallizer.IOreInfo) ChemicalStack(mekanism.api.chemical.ChemicalStack) Item(net.minecraft.item.Item) IIngredients(mezz.jei.api.ingredients.IIngredients) ChemicalCrystallizerRecipe(mekanism.api.recipes.ChemicalCrystallizerRecipe) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) IGuiHelper(mezz.jei.api.helpers.IGuiHelper) SlurryStack(mekanism.api.chemical.slurry.SlurryStack) HashSet(java.util.HashSet) GuiGauge(mekanism.client.gui.element.gauge.GuiGauge) ItemStack(net.minecraft.item.ItemStack) Map(java.util.Map) Slurry(mekanism.api.chemical.slurry.Slurry) Nonnull(javax.annotation.Nonnull) MekanismBlocks(mekanism.common.registries.MekanismBlocks) IRecipeLayout(mezz.jei.api.gui.IRecipeLayout) MatrixStack(com.mojang.blaze3d.matrix.MatrixStack) WeakHashMap(java.util.WeakHashMap) Nullable(javax.annotation.Nullable) BaseRecipeCategory(mekanism.client.jei.BaseRecipeCategory) SlotOverlay(mekanism.common.inventory.container.slot.SlotOverlay) SlotType(mekanism.client.gui.element.slot.SlotType) DataType(mekanism.common.tile.component.config.DataType) Set(java.util.Set) ITag(net.minecraft.tags.ITag) PigmentStackIngredient(mekanism.api.recipes.inputs.chemical.PigmentStackIngredient) GuiChemicalCrystallizer(mekanism.client.gui.machine.GuiChemicalCrystallizer) Collectors(java.util.stream.Collectors) MekanismJEI(mekanism.client.jei.MekanismJEI) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup) GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) IGuiIngredient(mezz.jei.api.gui.ingredient.IGuiIngredient) ProgressType(mekanism.client.gui.element.progress.ProgressType) SlurryStackIngredient(mekanism.api.recipes.inputs.chemical.SlurryStackIngredient) GasStackIngredient(mekanism.api.recipes.inputs.chemical.GasStackIngredient) IIngredientType(mezz.jei.api.ingredients.IIngredientType) GaugeType(mekanism.client.gui.element.gauge.GaugeType) IGuiIngredientGroup(mezz.jei.api.gui.ingredient.IGuiIngredientGroup) MekanismTags(mekanism.common.tags.MekanismTags) VanillaTypes(mezz.jei.api.constants.VanillaTypes) Collections(java.util.Collections) IChemicalStackIngredient(mekanism.api.recipes.inputs.chemical.IChemicalStackIngredient) BoxedChemicalStack(mekanism.api.chemical.merged.BoxedChemicalStack) InfusionStackIngredient(mekanism.api.recipes.inputs.chemical.InfusionStackIngredient) GuiSlot(mekanism.client.gui.element.slot.GuiSlot) HashSet(java.util.HashSet) Set(java.util.Set) PigmentStackIngredient(mekanism.api.recipes.inputs.chemical.PigmentStackIngredient) IGuiItemStackGroup(mezz.jei.api.gui.ingredient.IGuiItemStackGroup) GasStackIngredient(mekanism.api.recipes.inputs.chemical.GasStackIngredient) Item(net.minecraft.item.Item) ITag(net.minecraft.tags.ITag) Slurry(mekanism.api.chemical.slurry.Slurry) SlurryStackIngredient(mekanism.api.recipes.inputs.chemical.SlurryStackIngredient) ItemStack(net.minecraft.item.ItemStack) SlurryStack(mekanism.api.chemical.slurry.SlurryStack) InfusionStackIngredient(mekanism.api.recipes.inputs.chemical.InfusionStackIngredient)

Aggregations

Slurry (mekanism.api.chemical.slurry.Slurry)4 BoxedChemicalStack (mekanism.api.chemical.merged.BoxedChemicalStack)2 ItemStack (net.minecraft.item.ItemStack)2 MatrixStack (com.mojang.blaze3d.matrix.MatrixStack)1 Collections (java.util.Collections)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1 WeakHashMap (java.util.WeakHashMap)1 Collectors (java.util.stream.Collectors)1 Nonnull (javax.annotation.Nonnull)1 Nullable (javax.annotation.Nullable)1 ChemicalStack (mekanism.api.chemical.ChemicalStack)1 SlurryStack (mekanism.api.chemical.slurry.SlurryStack)1 ChemicalCrystallizerRecipe (mekanism.api.recipes.ChemicalCrystallizerRecipe)1 GasStackIngredient (mekanism.api.recipes.inputs.chemical.GasStackIngredient)1 IChemicalStackIngredient (mekanism.api.recipes.inputs.chemical.IChemicalStackIngredient)1 InfusionStackIngredient (mekanism.api.recipes.inputs.chemical.InfusionStackIngredient)1 PigmentStackIngredient (mekanism.api.recipes.inputs.chemical.PigmentStackIngredient)1 SlurryStackIngredient (mekanism.api.recipes.inputs.chemical.SlurryStackIngredient)1