Class MechanicalCraftingRecipeBuilder

java.lang.Object
com.simibubi.create.api.data.recipe.MechanicalCraftingRecipeBuilder

public class MechanicalCraftingRecipeBuilder extends Object
The builder for building Mechanical Crafting recipes.
See Also:
  • Constructor Details

    • MechanicalCraftingRecipeBuilder

      public MechanicalCraftingRecipeBuilder(net.minecraft.world.level.ItemLike result, int resultCount)
  • Method Details

    • shapedRecipe

      public static MechanicalCraftingRecipeBuilder shapedRecipe(net.minecraft.world.level.ItemLike result)
      Creates a new builder for a shaped recipe with the specified result with a count of 1
    • shapedRecipe

      public static MechanicalCraftingRecipeBuilder shapedRecipe(net.minecraft.world.level.ItemLike result, int resultCount)
      Creates a new builder for a shaped recipe with the specified result and count.
    • key

      public MechanicalCraftingRecipeBuilder key(Character c, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag)
      Adds a new unique key to the recipe key for use in the pattern
    • key

      public MechanicalCraftingRecipeBuilder key(Character c, net.minecraft.world.level.ItemLike item)
      Adds a new unique key to the recipe key for use in the pattern
    • key

      public MechanicalCraftingRecipeBuilder key(Character c, net.minecraft.world.item.crafting.Ingredient ingredient)
      Adds a new unique key to the recipe key for use in the pattern
    • patternLine

      public MechanicalCraftingRecipeBuilder patternLine(String line)
      Adds a new line to the pattern for this recipe. All lines for a pattern must be the same length, pad with spaces (empty slots) if necessary.
    • disallowMirrored

      public MechanicalCraftingRecipeBuilder disallowMirrored()
      Prevents the crafters from matching a vertically flipped version of the recipe
    • build

      public void build(net.minecraft.data.recipes.RecipeOutput output)
      Builds this recipe into a RecipeOutput.
    • build

      public void build(net.minecraft.data.recipes.RecipeOutput output, String id)
      Builds this recipe into a RecipeOutput. Use build(RecipeOutput) if the recipe id is the same as the result item id
    • build

      public void build(net.minecraft.data.recipes.RecipeOutput output, net.minecraft.resources.ResourceLocation id)
      Builds this recipe into a RecipeOutput.
    • whenModLoaded

      public MechanicalCraftingRecipeBuilder whenModLoaded(String modid)
      Add a new condition so this recipe is only enabled when the specified mod is loaded.
    • whenModMissing

      public MechanicalCraftingRecipeBuilder whenModMissing(String modid)
      Add a new condition so this recipe is only enabled when the specified mod is not loaded.
    • withCondition

      public MechanicalCraftingRecipeBuilder withCondition(net.neoforged.neoforge.common.conditions.ICondition condition)
      Add a new condition so this recipe is only enabled when the condition is true.