<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Datageneration%2FRecipes%2F1.18</id>
	<title>Datageneration/Recipes/1.18 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://forge.gemwire.uk/index.php?action=history&amp;feed=atom&amp;title=Datageneration%2FRecipes%2F1.18"/>
	<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Datageneration/Recipes/1.18&amp;action=history"/>
	<updated>2026-05-01T18:23:40Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://forge.gemwire.uk/index.php?title=Datageneration/Recipes/1.18&amp;diff=3170&amp;oldid=prev</id>
		<title>ShrimpBot: Copy Datageneration/Recipes to MC1.18 archive</title>
		<link rel="alternate" type="text/html" href="https://forge.gemwire.uk/index.php?title=Datageneration/Recipes/1.18&amp;diff=3170&amp;oldid=prev"/>
		<updated>2022-06-10T07:44:11Z</updated>

		<summary type="html">&lt;p&gt;Copy &lt;a href=&quot;/wiki/Datageneration/Recipes&quot; title=&quot;Datageneration/Recipes&quot;&gt;Datageneration/Recipes&lt;/a&gt; to MC1.18 archive&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Recipes can be generated by creating an extension of Minecraft's &amp;lt;code&amp;gt;RecipeProvider&amp;lt;/code&amp;gt; class. From there, recipes can be registered by overriding &amp;lt;code&amp;gt;RecipeProvider#buildCraftingRecipes&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Colored box|title=Info|content=Remove the &amp;lt;code&amp;gt;super&amp;lt;/code&amp;gt; call within the method. Otherwise, you will generate all recipes from Minecraft as well.}}&lt;br /&gt;
&lt;br /&gt;
== Recipe Builders ==&lt;br /&gt;
&lt;br /&gt;
All recipes need to be formatted as an &amp;lt;code&amp;gt;FinishedRecipe&amp;lt;/code&amp;gt;. Each vanilla recipe has a static constructor builder that can be used to create a finished recipe. These can be built by passing the required parameters and then calling &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#save&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Colored box|title=important|content=All recipes must have a different path. If two recipes have the same result, use &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#save(Consumer&amp;lt;FinishedRecipe&amp;gt;, ResourceLocation)&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; instead. This will allow you to specify a different name for the recipe such that it will not override the other.}}&lt;br /&gt;
&lt;br /&gt;
There are six vanilla recipe builders: &amp;lt;code&amp;gt;ShapedRecipeBuilder&amp;lt;/code&amp;gt; for shaped recipes, &amp;lt;code&amp;gt;ShapelessRecipeBuilder&amp;lt;/code&amp;gt; for shapeless recipes, &amp;lt;code&amp;gt;SimpleCookingRecipeBuilder&amp;lt;/code&amp;gt; for furnace type recipes, &amp;lt;code&amp;gt;SpecialRecipeBuilder&amp;lt;/code&amp;gt; for nondeterministic logic, &amp;lt;code&amp;gt;SingleItemRecipeBuilder&amp;lt;/code&amp;gt; for stonecutting recipes, and &amp;lt;code&amp;gt;UpgradeRecipeBuilder&amp;lt;/code&amp;gt; for smithing recipes.&lt;br /&gt;
&lt;br /&gt;
For any recipe to be valid, a criterion must be met to obtain the recipe within the recipe book. This can be attached via &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;#unlocks&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;RecipeProvider&amp;lt;/code&amp;gt; class has some basic criteria creators to check whether a player's inventory has a certain item or whether a player has entered into a specific block.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;code&amp;gt;ConditionalRecipe&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
To specify if a recipe should be loaded at runtime, a &amp;lt;code&amp;gt;ConditionalRecipe&amp;lt;/code&amp;gt; can be used in conjunction with a recipe builder. Conditions must be added before the recipe via &amp;lt;code&amp;gt;ConditionalRecipe$Builder#addCondition&amp;lt;/code&amp;gt;. Then, once a recipe is added, all previous conditions are cleared for the next to be added. There are a few helper methods for conditions that can be implemented via &amp;lt;code&amp;gt;IConditionBuilder&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Data Generation/1.18|Category:Data Generation]]&lt;/div&gt;</summary>
		<author><name>ShrimpBot</name></author>
	</entry>
</feed>