If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
Adds a recipe based on a provided IData. The provided IData should represent a DataPack json, this effectively allows you to register recipes for any DataPack supporting RecipeType systems.
Parameters:
name: stringType: string
- name of the recipe
mapData: MapDataType: MapData
- data representing the json file
addRecipe(name as string, output as IItemStack, input as IIngredient, xp as float, cookTime as int)
Adds a recipe based on given params. Note: A cookTime of 0 will cause the recipe to never complete, it will burn and use fuel, but no progress will be made on the recipe, it needs to be at-least 1 or more. Saying that, if you would like to make a recipe that will never complete (for example being able to give the player an infinitely burning furnace for whatever reason), you can still use a cookTime of 0.
xp: floatType: float
- how much xp the player gets
cookTime: intType: int
- how long it takes to cook
addRecipe(name as string, category as CookingBookCategory, output as IItemStack, input as IIngredient, xp as float, cookTime as int)
Adds a recipe based on given params. Note: A cookTime of 0 will cause the recipe to never complete, it will burn and use fuel, but no progress will be made on the recipe, it needs to be at-least 1 or more. Saying that, if you would like to make a recipe that will never complete (for example being able to give the player an infinitely burning furnace for whatever reason), you can still use a cookTime of 0.