Extreme Crafting (Avaritia)
Description
A normal crafting table, by 9x9 instead.
Identifier
Refer to this via any of the following:
mods.avaritia.extreme_crafting/* Used as page default */
mods.avaritia.extremecrafting
mods.avaritia.extremeCrafting
mods.avaritia.ExtremeCraftingAdding Recipes
Adds a shaped crafting recipe in the format
output,input:groovymods.avaritia.extreme_crafting.addShaped(ItemStack, List<List<IIngredient>>)Adds a shapeless crafting recipe in the format
output,input:groovymods.avaritia.extreme_crafting.addShapeless(ItemStack, List<IIngredient>)
Recipe Builder
Just like other recipe types, the Extreme Crafting also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.avaritia.extreme_crafting.shapedBuilder()
ResourceLocation. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)String[]. Sets the items required in each slot of the grid as char. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyrow(String) shape(String...) matrix(String...)List<List<IIngredient>>. Sets the items required in each slot in the grid as IIngredients. Requires greater than or equal to 1 and less than or equal to 81. Requires either the key-based matrix or the ingredient-based matrix can be defined, not both.groovyshape(List<List<IIngredient>>) matrix(List<List<IIngredient>>)Char2ObjectOpenHashMap<IIngredient>. Sets the item the given char corresponds to. (Default' ' = IIngredient.EMPTY).groovykey(String, IIngredient)ItemStack. Sets the item output. Requires not null.groovyoutput(ItemStack)byte. Sets if the recipe is removed. A value of 1 removes by the output, and a value of 2 removes by the resource location. (Default0).groovyreplace()boolean. Sets if the recipe is horizontally mirrored. (Defaultfalse).groovymirrored() mirrored(boolean)Closure<ItemStack>. Sets an operation that modifies the input items or output item.groovyrecipeFunction(Closure<ItemStack>)Closure<Void>. Sets an operation that happens when the recipe is crafted.groovyrecipeAction(Closure<Void>)First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullormorph.avaritia.recipe.extreme.IExtremeRecipe).groovyregister()
Example
mods.avaritia.extreme_crafting.shapedBuilder()
.matrix([[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')],
[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')],
[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')],
[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')],
[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')],
[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')],
[item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot'),item('minecraft:gold_ingot')]])
.output(item('minecraft:gold_block'))
.register()
mods.avaritia.extreme_crafting.shapedBuilder()
.output(item('minecraft:stone') * 64)
.matrix('DLLLLLDDD',
' DNIGIND',
'DDDNIGIND',
' DLLLLLD')
.key('D', item('minecraft:diamond'))
.key('L', item('minecraft:redstone'))
.key('N', item('minecraft:stone').reuse())
.key('I', item('minecraft:iron_ingot'))
.key('G', item('minecraft:gold_ingot'))
.register()mods.avaritia.extreme_crafting.shapelessBuilder()
ResourceLocation. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)List<IIngredient>. Sets the items required for the recipe. Requires greater than or equal to 1 and less than or equal to 81.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)ItemStack. Sets the item output. Requires not null.groovyoutput(ItemStack)byte. Sets if the recipe is removed. A value of 1 removes by the output, and a value of 2 removes by the resource location. (Default0).groovyreplace()Closure<ItemStack>. Sets an operation that modifies the input items or output item.groovyrecipeFunction(Closure<ItemStack>)Closure<Void>. Sets an operation that happens when the recipe is crafted.groovyrecipeAction(Closure<Void>)First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullormorph.avaritia.recipe.extreme.IExtremeRecipe).groovyregister()
Example
mods.avaritia.extreme_crafting.shapelessBuilder()
.output(item('minecraft:stone') * 64)
.input(item('minecraft:stone'), item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'), item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'), item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'), item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'), item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'),item('minecraft:stone'))
.register()Removing Recipes
Removes all recipes that match the given output:
groovymods.avaritia.extreme_crafting.removeByOutput(ItemStack)Removes all registered recipes:
groovymods.avaritia.extreme_crafting.removeAll()
Example
mods.avaritia.extreme_crafting.removeByOutput(item('avaritia:resource', 6))
mods.avaritia.extreme_crafting.removeAll()Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.avaritia.extreme_crafting.streamRecipes()
