@@ -79,18 +79,17 @@ public Integer[] numArgs() {
7979 public String docs () {
8080 return "boolean {recipeArray} Adds a recipe to the server and returns whether it was added or not. ----"
8181 + " The recipeArray can contain the following keys:"
82- + " <pre>"
83- + " type: (required) The type of recipe. Expected to be 'BLASTING', 'CAMPFIRE', 'FURNACE', 'SHAPED',"
84- + " 'SHAPELESS', 'SMOKING', or 'STONECUTTING'.\n "
85- + " key: (required) A unique string id for this recipe.\n "
86- + " result: (required) The result item array of the recipe.\n "
87- + " group: (optional) A group id for grouping recipes in the recipe book.\n "
88- + " shape: (shaped) The shape of the recipe. Represented as a 3 index normal array.\n "
89- + " ingredients: (shaped and shapeless recipes) Ingredients array of the recipe. See examples.\n "
90- + " input: (cooking and stonecutting) The input item type or array of types for this recipe.\n "
91- + " cookingtime: (cooking) The amount of time in ticks for the input item to cook.\n "
92- + " experience: (cooking) The amount of experience generated by this recipe."
93- + " </pre>"
82+ + "'''type''' : (required) The type of recipe. Expected to be 'BLASTING', 'CAMPFIRE', 'FURNACE',"
83+ + " 'SHAPED', 'SHAPELESS', 'SMOKING', or 'STONECUTTING'.\n "
84+ + "'''key''' : (required) A unique string id for this recipe.\n "
85+ + "'''result''' : (required) The result item array of the recipe.\n "
86+ + "'''group''' : (optional) A group id for grouping recipes in the recipe book.\n "
87+ + "'''shape''' : (shaped) The shape of the recipe. Represented as a 3 index normal array.\n "
88+ + "'''ingredients''' : (shaped and shapeless recipes) Ingredients array of the recipe. See examples.\n "
89+ + "'''input''' : (cooking and stonecutting) The input item type or array of types for this recipe.\n "
90+ + "'''cookingtime''' : (cooking) The amount of time in ticks for the input item to cook.\n "
91+ + "'''experience''' : (cooking) The amount of experience generated by this recipe.\n "
92+ + "\n "
9493 + " Shaped Recipe Data. Turns 9 stone into obsidian."
9594 + " <pre>{\n "
9695 + " key: 'stone_to_obsidian',\n "
@@ -158,14 +157,14 @@ public ExampleScript[] examples() throws ConfigCompileException {
158157 "add_recipe(array(\n "
159158 + "\t 'key': 'regen_extended',\n "
160159 + "\t 'type': 'SHAPED',\n "
161- + "\t 'result': array('name': 'POTION', 'meta': array('base ': array('type': 'REGEN', 'extended': true) )),\n "
160+ + "\t 'result': array('name': 'POTION', 'meta': array('potiontype ': 'LONG_REGENERATION' )),\n "
162161 + "\t 'shape': array(\n "
163162 + "\t \t 'RRR',\n "
164163 + "\t \t 'RPR',\n "
165164 + "\t \t 'RRR'),\n "
166165 + "\t 'ingredients': array(\n "
167166 + "\t \t 'R': 'REDSTONE',\n "
168- + "\t \t 'P': array('name': 'POTION', 'meta': array('base ': array('type': 'REGEN') )))));" ,
167+ + "\t \t 'P': array('name': 'POTION', 'meta': array('potiontype ': 'REGENERATION' )))));" ,
169168 "Turns a normal regen potion surrounded by redstone into an extended regen potion." ),
170169
171170 new ExampleScript ("Demonstrates a shaped recipe with multiple ingredient choices."
@@ -178,6 +177,19 @@ public ExampleScript[] examples() throws ConfigCompileException {
178177 + "\t 'shape': array('X', 'X', 'X'),\n "
179178 + "\t 'ingredients': array('X': array('RED_MUSHROOM', 'BROWN_MUSHROOM'))));" ,
180179 "Crafts a mushroom stem block." ),
180+
181+ new ExampleScript ("Demonstrates a shapeless recipe with exact ingredients."
182+ + " This is only possible on Paper servers. On Spigot, only the item material will be considered."
183+ + " Each element in the ingredients array may be a single item/material or an array of item/material"
184+ + " choices (like how different types of planks can create a stick)." ,
185+ "add_recipe(array(\n "
186+ + "\t 'key': 'debug_stick',\n "
187+ + "\t 'type': 'SHAPELESS',\n "
188+ + "\t 'result': array('name': 'DEBUG_STICK'),\n "
189+ + "\t 'ingredients': array(\n "
190+ + "\t \t array('name': 'NETHER_STAR'),\n "
191+ + "\t \t array('name': 'STICK', 'meta': array('repair': 1, 'enchants': array('silk_touch': 1))))));" ,
192+ "Turns a nether star and a stick enchanted with silk touch into a debug stick." ),
181193 };
182194 }
183195 }
0 commit comments