Search in sources :

Example 1 with IncenseRecipe

use of moriyashiine.bewitchment.common.recipe.IncenseRecipe in project bewitchment by MoriyaShiine.

the class IncenseProcessor method setup.

@Override
public void setup(IVariableProvider variables) {
    String recipeId = variables.get("recipe").asString();
    RecipeManager manager = MinecraftClient.getInstance().world.getRecipeManager();
    recipe = (IncenseRecipe) manager.get(new Identifier(recipeId)).filter(recipe -> recipe.getType().equals(BWRecipeTypes.INCENSE_RECIPE_TYPE)).orElseThrow(IllegalArgumentException::new);
}
Also used : BWRecipeTypes(moriyashiine.bewitchment.common.registry.BWRecipeTypes) IVariableProvider(vazkii.patchouli.api.IVariableProvider) ItemStack(net.minecraft.item.ItemStack) IVariable(vazkii.patchouli.api.IVariable) IncenseRecipe(moriyashiine.bewitchment.common.recipe.IncenseRecipe) Identifier(net.minecraft.util.Identifier) IComponentProcessor(vazkii.patchouli.api.IComponentProcessor) MinecraftClient(net.minecraft.client.MinecraftClient) RecipeManager(net.minecraft.recipe.RecipeManager) Identifier(net.minecraft.util.Identifier) RecipeManager(net.minecraft.recipe.RecipeManager)

Aggregations

IncenseRecipe (moriyashiine.bewitchment.common.recipe.IncenseRecipe)1 BWRecipeTypes (moriyashiine.bewitchment.common.registry.BWRecipeTypes)1 MinecraftClient (net.minecraft.client.MinecraftClient)1 ItemStack (net.minecraft.item.ItemStack)1 RecipeManager (net.minecraft.recipe.RecipeManager)1 Identifier (net.minecraft.util.Identifier)1 IComponentProcessor (vazkii.patchouli.api.IComponentProcessor)1 IVariable (vazkii.patchouli.api.IVariable)1 IVariableProvider (vazkii.patchouli.api.IVariableProvider)1