Search in sources :

Example 11 with EnumColor

use of mekanism.api.text.EnumColor in project Mekanism by mekanism.

the class AdditionsRecipeProvider method registerGlowPanel.

private void registerGlowPanel(Consumer<IFinishedRecipe> consumer, BlockRegistryObject<? extends IColoredBlock, ?> result, String basePath) {
    EnumColor color = result.getBlock().getColor();
    DyeColor dye = color.getDyeColor();
    if (dye != null) {
        ExtendedShapedRecipeBuilder.shapedRecipe(result, 2).pattern(GLOW_PANEL).key(PLASTIC_SHEET_CHAR, MekanismItems.HDPE_SHEET).key(GLASS_PANES_CHAR, Tags.Items.GLASS_PANES).key(Pattern.GLOWSTONE, Tags.Items.DUSTS_GLOWSTONE).key(Pattern.DYE, dye.getTag()).build(consumer, MekanismAdditions.rl(basePath + color.getRegistryPrefix()));
    }
    PlasticBlockRecipeProvider.registerRecolor(consumer, result, AdditionsTags.Items.GLOW_PANELS, color, basePath);
}
Also used : EnumColor(mekanism.api.text.EnumColor) DyeColor(net.minecraft.item.DyeColor)

Example 12 with EnumColor

use of mekanism.api.text.EnumColor 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 13 with EnumColor

use of mekanism.api.text.EnumColor in project Mekanism by mekanism.

the class PlasticBlockRecipeProvider method registerSlickPlastic.

private void registerSlickPlastic(Consumer<IFinishedRecipe> consumer, BlockRegistryObject<? extends IColoredBlock, ?> result, IItemProvider plastic, String basePath) {
    EnumColor color = result.getBlock().getColor();
    String colorString = color.getRegistryPrefix();
    ExtendedShapedRecipeBuilder.shapedRecipe(result, 4).pattern(SLICK_PLASTIC).key(Pattern.CONSTANT, plastic).key(AdditionsRecipeProvider.SLIME_CHAR, Tags.Items.SLIMEBALLS).build(consumer, MekanismAdditions.rl(basePath + colorString));
    // Enriching recipes
    ItemStackToItemStackRecipeBuilder.enriching(ItemStackIngredient.from(plastic), result.getItemStack()).build(consumer, MekanismAdditions.rl(basePath + "enriching/" + colorString));
    // Recolor recipes
    registerRecolor(consumer, result, AdditionsTags.Items.PLASTIC_BLOCKS_SLICK, color, basePath);
}
Also used : EnumColor(mekanism.api.text.EnumColor)

Example 14 with EnumColor

use of mekanism.api.text.EnumColor in project Mekanism by mekanism.

the class PlasticBlockRecipeProvider method registerPlasticTransparent.

private void registerPlasticTransparent(Consumer<IFinishedRecipe> consumer, BlockRegistryObject<? extends IColoredBlock, ?> result, String basePath) {
    EnumColor color = result.getBlock().getColor();
    DyeColor dye = color.getDyeColor();
    if (dye != null) {
        ExtendedShapedRecipeBuilder.shapedRecipe(result, 8).pattern(PLASTIC_TRANSPARENT).key(Pattern.CONSTANT, MekanismItems.HDPE_SHEET).key(Pattern.DYE, dye.getTag()).build(consumer, MekanismAdditions.rl(basePath + color.getRegistryPrefix()));
    }
    registerTransparentRecolor(consumer, result, AdditionsTags.Items.PLASTIC_BLOCKS_TRANSPARENT, color, basePath);
}
Also used : EnumColor(mekanism.api.text.EnumColor) DyeColor(net.minecraft.item.DyeColor)

Example 15 with EnumColor

use of mekanism.api.text.EnumColor in project Mekanism by mekanism.

the class PlasticBlockRecipeProvider method registerReinforcedPlastic.

private void registerReinforcedPlastic(Consumer<IFinishedRecipe> consumer, BlockRegistryObject<? extends IColoredBlock, ?> result, IItemProvider plastic, String basePath) {
    EnumColor color = result.getBlock().getColor();
    ExtendedShapedRecipeBuilder.shapedRecipe(result, 4).pattern(REINFORCED_PLASTIC).key(Pattern.OSMIUM, MekanismTags.Items.PROCESSED_RESOURCES.get(ResourceType.DUST, PrimaryResource.OSMIUM)).key(Pattern.CONSTANT, plastic).build(consumer, MekanismAdditions.rl(basePath + color.getRegistryPrefix()));
    registerRecolor(consumer, result, AdditionsTags.Items.PLASTIC_BLOCKS_REINFORCED, color, basePath);
}
Also used : EnumColor(mekanism.api.text.EnumColor)

Aggregations

EnumColor (mekanism.api.text.EnumColor)33 Map (java.util.Map)6 DyeColor (net.minecraft.item.DyeColor)6 ItemStack (net.minecraft.item.ItemStack)5 ISideConfiguration (mekanism.common.tile.interfaces.ISideConfiguration)4 DataType (mekanism.common.tile.component.config.DataType)3 ArrayList (java.util.ArrayList)2 IPigmentProvider (mekanism.api.providers.IPigmentProvider)2 ItemConfigurator (mekanism.common.item.ItemConfigurator)2 PigmentRegistryObject (mekanism.common.registration.impl.PigmentRegistryObject)2 ITextComponent (net.minecraft.util.text.ITextComponent)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 MatrixStack (com.mojang.blaze3d.matrix.MatrixStack)1 IVertexBuilder (com.mojang.blaze3d.vertex.IVertexBuilder)1 Long2ObjectMap (it.unimi.dsi.fastutil.longs.Long2ObjectMap)1 Object2ObjectOpenHashMap (it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap)1 EnumMap (java.util.EnumMap)1 HashMap (java.util.HashMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Consumer (java.util.function.Consumer)1