Search in sources :

Example 1 with PigmentRegistryObject

use of mekanism.common.registration.impl.PigmentRegistryObject in project Mekanism by mekanism.

the class PigmentExtractingPlasticRecipeProvider method addRecipes.

@Override
public void addRecipes(Consumer<IFinishedRecipe> consumer) {
    String basePath = "pigment_extracting/plastic/";
    for (Map.Entry<EnumColor, PigmentRegistryObject<Pigment>> entry : MekanismPigments.PIGMENT_COLOR_LOOKUP.entrySet()) {
        EnumColor color = entry.getKey();
        IPigmentProvider pigment = entry.getValue();
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_BLOCKS, pigment, PLASTIC_BLOCK_RATE, basePath + "block/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.SLICK_PLASTIC_BLOCKS, pigment, SLICK_PLASTIC_BLOCK_RATE, basePath + "slick/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_GLOW_BLOCKS, pigment, PLASTIC_GLOW_BLOCK_RATE, basePath + "glow/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.REINFORCED_PLASTIC_BLOCKS, pigment, REINFORCED_PLASTIC_BLOCK_RATE, basePath + "reinforced/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_ROADS, pigment, PLASTIC_ROAD_RATE, basePath + "road/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.TRANSPARENT_PLASTIC_BLOCKS, pigment, TRANSPARENT_PLASTIC_BLOCK_RATE, basePath + "transparent/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_STAIRS, pigment, PLASTIC_STAIRS_RATE, basePath + "stairs/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_SLABS, pigment, PLASTIC_SLAB_RATE, basePath + "slab/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_GLOW_STAIRS, pigment, PLASTIC_GLOW_STAIRS_RATE, basePath + "stairs/glow/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.PLASTIC_GLOW_SLABS, pigment, PLASTIC_GLOW_SLAB_RATE, basePath + "slab/glow/");
        addExtractionRecipe(consumer, color, AdditionsBlocks.TRANSPARENT_PLASTIC_STAIRS, pigment, TRANSPARENT_PLASTIC_STAIRS_RATE, basePath + "stairs/transparent");
        addExtractionRecipe(consumer, color, AdditionsBlocks.TRANSPARENT_PLASTIC_SLABS, pigment, TRANSPARENT_PLASTIC_SLAB_RATE, basePath + "slab/transparent");
    }
}
Also used : EnumColor(mekanism.api.text.EnumColor) IPigmentProvider(mekanism.api.providers.IPigmentProvider) Map(java.util.Map) PigmentRegistryObject(mekanism.common.registration.impl.PigmentRegistryObject)

Example 2 with PigmentRegistryObject

use of mekanism.common.registration.impl.PigmentRegistryObject in project Mekanism by mekanism.

the class PigmentExtractingRecipeProvider method addExtractionRecipes.

private static void addExtractionRecipes(Consumer<IFinishedRecipe> consumer, String basePath) {
    for (Map.Entry<EnumColor, PigmentRegistryObject<Pigment>> entry : MekanismPigments.PIGMENT_COLOR_LOOKUP.entrySet()) {
        EnumColor color = entry.getKey();
        IPigmentProvider pigment = entry.getValue();
        DyeColor dye = color.getDyeColor();
        if (dye != null) {
            ItemStackToChemicalRecipeBuilder.pigmentExtracting(ItemStackIngredient.from(dye.getTag()), pigment.getStack(DYE_RATE)).build(consumer, Mekanism.rl(basePath + "dye/" + color.getRegistryPrefix()));
            // TODO: Eventually we may want to consider taking patterns into account
            ItemStackToChemicalRecipeBuilder.pigmentExtracting(ItemStackIngredient.from(BannerBlock.byColor(dye)), pigment.getStack(BANNER_RATE)).build(consumer, Mekanism.rl(basePath + "banner/" + color.getRegistryPrefix()));
            addExtractionRecipe(consumer, color, CONCRETE, pigment, CONCRETE_RATE, basePath + "concrete/");
            addExtractionRecipe(consumer, color, CONCRETE_POWDER, pigment, CONCRETE_POWDER_RATE, basePath + "concrete_powder/");
            addExtractionRecipe(consumer, color, CARPETS, pigment, CARPET_RATE, basePath + "carpet/");
            addExtractionRecipe(consumer, color, TERRACOTTA, pigment, CONCRETE_RATE, basePath + "terracotta/");
            addTagExtractionRecipe(consumer, color, STAINED_GLASS, pigment, STAINED_GLASS_RATE, basePath + "stained_glass/");
            addTagExtractionRecipe(consumer, color, STAINED_GLASS_PANES, pigment, STAINED_GLASS_PANE_RATE, basePath + "stained_glass_pane/");
            addExtractionRecipe(consumer, color, WOOL, pigment, WOOL_RATE, basePath + "wool/");
        }
    }
}
Also used : EnumColor(mekanism.api.text.EnumColor) IPigmentProvider(mekanism.api.providers.IPigmentProvider) DyeColor(net.minecraft.item.DyeColor) EnumMap(java.util.EnumMap) Map(java.util.Map) PigmentRegistryObject(mekanism.common.registration.impl.PigmentRegistryObject)

Aggregations

Map (java.util.Map)2 IPigmentProvider (mekanism.api.providers.IPigmentProvider)2 EnumColor (mekanism.api.text.EnumColor)2 PigmentRegistryObject (mekanism.common.registration.impl.PigmentRegistryObject)2 EnumMap (java.util.EnumMap)1 DyeColor (net.minecraft.item.DyeColor)1