Search in sources :

Example 1 with WoodenBlockType

use of yamahari.ilikewood.registry.objecttype.WoodenBlockType in project Mekanism by mekanism.

the class ILikeWoodRecipeProvider method addBedRecipe.

private static void addBedRecipe(Consumer<IFinishedRecipe> consumer, ICondition condition, IItemProvider planks, IWoodType woodType, EnumColor color, String basePath) {
    DyeColor dye = color.getDyeColor();
    if (dye != null) {
        WoodenBlockType bedType = getBedType(dye);
        Block bed = ILikeWood.getBlock(woodType, bedType);
        RecipeProviderUtil.addPrecisionSawmillBedRecipe(consumer, basePath, bed, planks, dye, condition);
        ItemStackChemicalToItemStackRecipeBuilder.painting(ItemStackIngredient.from(Ingredient.of(WoodenBlockType.getBeds().filter(b -> !b.equals(bedType)).map(b -> new ItemStack(ILikeWood.getBlock(woodType, b))))), PigmentStackIngredient.from(MekanismPigments.PIGMENT_COLOR_LOOKUP.get(color), PigmentExtractingRecipeProvider.DYE_RATE), new ItemStack(bed)).addCondition(condition).build(consumer, Mekanism.rl(basePath + "painting/" + color.getRegistryPrefix()));
    }
}
Also used : EnumColor(mekanism.api.text.EnumColor) RecipeProviderUtil(mekanism.common.recipe.RecipeProviderUtil) Ingredient(net.minecraft.item.crafting.Ingredient) Item(net.minecraft.item.Item) ItemStackIngredient(mekanism.api.recipes.inputs.ItemStackIngredient) ICondition(net.minecraftforge.common.crafting.conditions.ICondition) ParametersAreNonnullByDefault(javax.annotation.ParametersAreNonnullByDefault) DyeColor(net.minecraft.item.DyeColor) ItemStack(net.minecraft.item.ItemStack) Block(net.minecraft.block.Block) WoodenItemType(yamahari.ilikewood.registry.objecttype.WoodenItemType) PigmentExtractingRecipeProvider(mekanism.common.recipe.impl.PigmentExtractingRecipeProvider) IFinishedRecipe(net.minecraft.data.IFinishedRecipe) WoodenBlockType(yamahari.ilikewood.registry.objecttype.WoodenBlockType) MekanismItems(mekanism.common.registries.MekanismItems) VanillaWoodTypes(yamahari.ilikewood.plugin.vanilla.VanillaWoodTypes) Mekanism(mekanism.common.Mekanism) EnumUtils(mekanism.common.util.EnumUtils) IWoodType(yamahari.ilikewood.registry.woodtype.IWoodType) PigmentStackIngredient(mekanism.api.recipes.inputs.chemical.PigmentStackIngredient) Items(net.minecraft.item.Items) ItemStackChemicalToItemStackRecipeBuilder(mekanism.api.datagen.recipe.builder.ItemStackChemicalToItemStackRecipeBuilder) ModVersionLoadedCondition(mekanism.common.recipe.condition.ModVersionLoadedCondition) Blocks(net.minecraft.block.Blocks) Consumer(java.util.function.Consumer) IItemProvider(net.minecraft.util.IItemProvider) ILikeWood(yamahari.ilikewood.ILikeWood) SawmillRecipeBuilder(mekanism.api.datagen.recipe.builder.SawmillRecipeBuilder) MekanismPigments(mekanism.common.registries.MekanismPigments) Block(net.minecraft.block.Block) WoodenBlockType(yamahari.ilikewood.registry.objecttype.WoodenBlockType) DyeColor(net.minecraft.item.DyeColor) ItemStack(net.minecraft.item.ItemStack)

Aggregations

Consumer (java.util.function.Consumer)1 ParametersAreNonnullByDefault (javax.annotation.ParametersAreNonnullByDefault)1 ItemStackChemicalToItemStackRecipeBuilder (mekanism.api.datagen.recipe.builder.ItemStackChemicalToItemStackRecipeBuilder)1 SawmillRecipeBuilder (mekanism.api.datagen.recipe.builder.SawmillRecipeBuilder)1 ItemStackIngredient (mekanism.api.recipes.inputs.ItemStackIngredient)1 PigmentStackIngredient (mekanism.api.recipes.inputs.chemical.PigmentStackIngredient)1 EnumColor (mekanism.api.text.EnumColor)1 Mekanism (mekanism.common.Mekanism)1 RecipeProviderUtil (mekanism.common.recipe.RecipeProviderUtil)1 ModVersionLoadedCondition (mekanism.common.recipe.condition.ModVersionLoadedCondition)1 PigmentExtractingRecipeProvider (mekanism.common.recipe.impl.PigmentExtractingRecipeProvider)1 MekanismItems (mekanism.common.registries.MekanismItems)1 MekanismPigments (mekanism.common.registries.MekanismPigments)1 EnumUtils (mekanism.common.util.EnumUtils)1 Block (net.minecraft.block.Block)1 Blocks (net.minecraft.block.Blocks)1 IFinishedRecipe (net.minecraft.data.IFinishedRecipe)1 DyeColor (net.minecraft.item.DyeColor)1 Item (net.minecraft.item.Item)1 ItemStack (net.minecraft.item.ItemStack)1