/* * Decompiled with CFR 0.152. */ package net.minecraft.data.recipes; import java.util.function.Function; import net.minecraft.core.registries.Registries; import net.minecraft.data.recipes.RecipeOutput; import net.minecraft.resources.Identifier; import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.crafting.CraftingBookCategory; import net.minecraft.world.item.crafting.Recipe; public class SpecialRecipeBuilder { private final Function> factory; public SpecialRecipeBuilder(Function> factory) { this.factory = factory; } public static SpecialRecipeBuilder special(Function> factory) { return new SpecialRecipeBuilder(factory); } public void save(RecipeOutput output, String name) { this.save(output, ResourceKey.create(Registries.RECIPE, Identifier.parse(name))); } public void save(RecipeOutput output, ResourceKey> id) { output.accept(id, this.factory.apply(CraftingBookCategory.MISC), null); } }