Table Crafting (Extended Crafting)
Description
A normal crafting recipe, but requiring either a specific tier, or at least a given tier, from 3x3 to 9x9.
Identifier
Refer to this via any of the following:
mods.extendedcrafting.table_crafting/* Used as page default */
mods.extendedcrafting.tablecrafting
mods.extendedcrafting.tableCrafting
mods.extendedcrafting.TableCrafting
Adding Recipes
Add the given recipe to the recipe list:
groovymods.extendedcrafting.table_crafting.add(ITieredRecipe)
Adds a shaped crafting recipe in the format
tier
,output
,input
:groovymods.extendedcrafting.table_crafting.addShaped(int, ItemStack, List<List<IIngredient>>)
Adds a shaped crafting recipe in the format
output
,input
:groovymods.extendedcrafting.table_crafting.addShaped(ItemStack, List<List<IIngredient>>)
Adds a shapeless crafting recipe in the format
tier
,output
,input
:groovymods.extendedcrafting.table_crafting.addShapeless(int, ItemStack, List<IIngredient>)
Adds a shapeless crafting recipe in the format
output
,input
:groovymods.extendedcrafting.table_crafting.addShapeless(ItemStack, List<IIngredient>)
Recipe Builder
Just like other recipe types, the Table Crafting also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.extendedcrafting.table_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, less than or equal to 81, and 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(char, IIngredient) key(String, IIngredient) key(Map<String, IIngredient>)
ItemStack
. Sets the item output. Requires not null.groovyoutput(ItemStack)
int
. Sets the tier of table required, with 0 indicating any table size that can fit the recipe. Requires greater than or equal to 0 and less than or equal to 4. (Default0
).groovytier(int) tierAny() tierBasic() tierElite() tierAdvanced() tierUltimate()
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
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orcom.blakebr0.extendedcrafting.crafting.table.ITieredRecipe
).groovyregister()
Example
mods.extendedcrafting.table_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'))
.key('I', item('minecraft:iron_ingot'))
.key('G', item('minecraft:gold_ingot'))
.tierUltimate()
.register()
mods.extendedcrafting.table_crafting.shapedBuilder()
.tierAdvanced()
.output(item('minecraft:stone') * 8)
.matrix('BXX')
.mirrored()
.key('B', item('minecraft:stone'))
.key('X', item('minecraft:gold_ingot'))
.register()
mods.extendedcrafting.table_crafting.shapedBuilder()
.tierAny()
.output(item('minecraft:diamond'))
.matrix('BXXXBX')
.mirrored()
.key('B', item('minecraft:stone'))
.key('X', item('minecraft:gold_ingot'))
.register()
mods.extendedcrafting.table_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_ingot') * 64)
.tier(4)
.register()
mods.extendedcrafting.table_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')]])
.output(item('minecraft:gold_ingot') * 64)
.register()
mods.extendedcrafting.table_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)
int
. Sets the tier of table required, with 0 indicating any table size that can fit the recipe. Requires greater than or equal to 0 and less than or equal to 4. (Default0
).groovytier(int) tierAny() tierBasic() tierElite() tierAdvanced() tierUltimate()
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
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orcom.blakebr0.extendedcrafting.crafting.table.ITieredRecipe
).groovyregister()
Example
mods.extendedcrafting.table_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 the given recipe from the recipe list:
groovymods.extendedcrafting.table_crafting.remove(ITieredRecipe)
Removes all recipes that match the given output:
groovymods.extendedcrafting.table_crafting.removeByOutput(ItemStack)
Removes all registered recipes:
groovymods.extendedcrafting.table_crafting.removeAll()
Example
mods.extendedcrafting.table_crafting.removeByOutput(item('extendedcrafting:singularity_ultimate'))
mods.extendedcrafting.table_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.extendedcrafting.table_crafting.streamRecipes()