Mortar (Advanced Mortars)
Description
Uses any number of specific types of Mortars to convert multiple items into a single output with a possible chance output after a number of player interactions.
Identifier
Refer to this via any of the following:
mods.advancedmortars.mortar/* Used as page default */
mods.advancedmortars.Mortar
Adding Recipes
Adds recipes in the format
types
,output
,duration
,secondaryOutput
,secondaryOutputChance
,inputs
:groovymods.advancedmortars.mortar.add(List<String>, ItemStack, int, ItemStack, float, List<IIngredient>)
Adds recipes in the format
types
,output
,duration
,inputs
:groovymods.advancedmortars.mortar.add(List<String>, ItemStack, int, List<IIngredient>)
Example
mods.advancedmortars.mortar.add(['iron', 'wood'], item('minecraft:tnt') * 5, 4, item('minecraft:tnt'), 0.7, [ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), ore('ingotIron'),ore('ingotIron'), ore('ingotIron'), ore('ingotIron'), ore('ingotIron')])
mods.advancedmortars.mortar.add(['stone'], item('minecraft:diamond') * 4, 4, [ore('ingotGold')])
mods.advancedmortars.mortar.add(['stone'], item('minecraft:tnt'), 4, [ore('ingotGold')])
Recipe Builder
Just like other recipe types, the Mortar also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.advancedmortars.mortar.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 0 and less than or equal to 8.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
List<String>
. Sets what types of Mortar are allowed to craft the recipe. Requires a list of Strings that areEnumMortarType
entries.groovygold() iron() type(String...) type(List<String>) wood() stone() diamond() emerald() obsidian()
int
. Sets how many interactions are required to process the recipe. (Default0
).groovyduration(int)
ItemStack
. Sets the additional output itemstack. (DefaultItemStack.EMPTY
).groovysecondaryOutput(ItemStack) secondaryOutput(ItemStack, float)
float
. Sets the chance of the additional output itemstack being output. (Default1.0f
).groovysecondaryOutput(ItemStack, float) secondaryOutputChance(float)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orcom.codetaylor.mc.advancedmortars.modules.mortar.recipe.RecipeMortar
).groovyregister()
Example
mods.advancedmortars.mortar.recipeBuilder()
.type('stone')
.duration(2)
.output(item('minecraft:grass'))
.input(item('minecraft:dirt'))
.register()
mods.advancedmortars.mortar.recipeBuilder()
.type('emerald')
.duration(4)
.output(item('minecraft:wheat_seeds') * 16)
.secondaryOutput(item('minecraft:melon_seeds'))
.input(ore('cropWheat'))
.register()
mods.advancedmortars.mortar.recipeBuilder()
.type('obsidian')
.duration(8)
.output(item('minecraft:wheat_seeds') * 16)
.secondaryOutput(item('minecraft:melon_seeds'), 0.5)
.input(ore('cropWheat'))
.register()