Class MechanicalCraftingRecipeBuilder
java.lang.Object
com.simibubi.create.api.data.recipe.MechanicalCraftingRecipeBuilder
The builder for building Mechanical Crafting recipes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMechanicalCraftingRecipeBuilder(net.minecraft.world.level.ItemLike result, int resultCount) -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(net.minecraft.data.recipes.RecipeOutput output) Builds this recipe into aRecipeOutput.voidBuilds this recipe into aRecipeOutput.voidbuild(net.minecraft.data.recipes.RecipeOutput output, net.minecraft.resources.ResourceLocation id) Builds this recipe into aRecipeOutput.Prevents the crafters from matching a vertically flipped version of the recipeAdds a new unique key to the recipe key for use in the patternAdds a new unique key to the recipe key for use in the patternAdds a new unique key to the recipe key for use in the patternpatternLine(String line) Adds a new line to the pattern for this recipe.shapedRecipe(net.minecraft.world.level.ItemLike result) Creates a new builder for a shaped recipe with the specified result with a count of 1shapedRecipe(net.minecraft.world.level.ItemLike result, int resultCount) Creates a new builder for a shaped recipe with the specified result and count.whenModLoaded(String modid) Add a new condition so this recipe is only enabled when the specified mod is loaded.whenModMissing(String modid) Add a new condition so this recipe is only enabled when the specified mod is not loaded.withCondition(net.neoforged.neoforge.common.conditions.ICondition condition) Add a new condition so this recipe is only enabled when the condition is true.
-
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
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
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
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 aRecipeOutput. -
build
Builds this recipe into aRecipeOutput. Usebuild(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 aRecipeOutput. -
whenModLoaded
Add a new condition so this recipe is only enabled when the specified mod is loaded. -
whenModMissing
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.
-