Skip to content

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:

groovy
mods.extendedcrafting.table_crafting/* Used as page default */
mods.extendedcrafting.tablecrafting
mods.extendedcrafting.tableCrafting
mods.extendedcrafting.TableCrafting

Adding Recipes

  • Adds a shaped crafting recipe in the format tier, output, input:

    groovy
    mods.extendedcrafting.table_crafting.addShaped(int, ItemStack, List<List<IIngredient>>)
  • Adds a shaped crafting recipe in the format output, input:

    groovy
    mods.extendedcrafting.table_crafting.addShaped(ItemStack, List<List<IIngredient>>)
  • Adds a shapeless crafting recipe in the format tier, output, input:

    groovy
    mods.extendedcrafting.table_crafting.addShapeless(int, ItemStack, List<IIngredient>)
  • Adds a shapeless crafting recipe in the format output, input:

    groovy
    mods.extendedcrafting.table_crafting.addShapeless(ItemStack, List<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.

    groovy
    name(String)
    name(ResourceLocation)
  • Char2ObjectOpenHashMap<IIngredient>. Sets the item the given char corresponds to. (Default ' ' = IIngredient.EMPTY).

    groovy
    key(char, IIngredient)
    key(String, IIngredient)
    key(Map<String, IIngredient>)
  • 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.

    groovy
    row(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.

    groovy
    shape(List<List<IIngredient>>)
    matrix(List<List<IIngredient>>)
  • ItemStack. Sets the item output. Requires not null.

    groovy
    output(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. (Default 0).

    groovy
    tier(int)
    tierAny()
    tierBasic()
    tierElite()
    tierAdvanced()
    tierUltimate()
  • 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. (Default 0).

    groovy
    replace()
  • boolean. Sets if the recipe is horizontally mirrored. (Default false).

    groovy
    mirrored()
    mirrored(boolean)
  • Closure<ItemStack>. Sets an operation that modifies the input items or output item.

    groovy
    recipeFunction(Closure<ItemStack>)
  • Closure<Void>. Sets an operation that happens when the recipe is crafted.

    groovy
    recipeAction(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. (returns null or net.minecraft.item.crafting.IRecipe).

    groovy
    register()
Example
groovy
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.

    groovy
    name(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.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • ItemStack. Sets the item output. Requires not null.

    groovy
    output(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. (Default 0).

    groovy
    tier(int)
    tierAny()
    tierBasic()
    tierElite()
    tierAdvanced()
    tierUltimate()
  • 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. (Default 0).

    groovy
    replace()
  • Closure<ItemStack>. Sets an operation that modifies the input items or output item.

    groovy
    recipeFunction(Closure<ItemStack>)
  • Closure<Void>. Sets an operation that happens when the recipe is crafted.

    groovy
    recipeAction(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. (returns null or net.minecraft.item.crafting.IRecipe).

    groovy
    register()
Example
groovy
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 all recipes that match the given output:

    groovy
    mods.extendedcrafting.table_crafting.removeByOutput(ItemStack)
  • Removes all registered recipes:

    groovy
    mods.extendedcrafting.table_crafting.removeAll()
Example
groovy
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:

    groovy
    mods.extendedcrafting.table_crafting.streamRecipes()

贡献者

© 2024 CleanroomMC. All Rights Reserved.

布局切换

调整 VitePress 的布局样式,以适配不同的阅读习惯和屏幕环境。

全部展开
使侧边栏和内容区域占据整个屏幕的全部宽度。
全部展开,但侧边栏宽度可调
侧边栏宽度可调,但内容区域宽度不变,调整后的侧边栏将可以占据整个屏幕的最大宽度。
全部展开,且侧边栏和内容区域宽度均可调
侧边栏宽度可调,但内容区域宽度不变,调整后的侧边栏将可以占据整个屏幕的最大宽度。
原始宽度
原始的 VitePress 默认布局宽度

页面最大宽度

调整 VitePress 布局中页面的宽度,以适配不同的阅读习惯和屏幕环境。

调整页面最大宽度
一个可调整的滑块,用于选择和自定义页面最大宽度。

内容最大宽度

调整 VitePress 布局中内容区域的宽度,以适配不同的阅读习惯和屏幕环境。

调整内容最大宽度
一个可调整的滑块,用于选择和自定义内容最大宽度。

聚光灯

支持在正文中高亮当前鼠标悬停的行和元素,以优化阅读和专注困难的用户的阅读体验。

ON开启
开启聚光灯。
OFF关闭
关闭聚光灯。

聚光灯样式

调整聚光灯的样式。

置于底部
在当前鼠标悬停的元素下方添加一个纯色背景以突出显示当前鼠标悬停的位置。
置于侧边
在当前鼠标悬停的元素旁边添加一条固定的纯色线以突出显示当前鼠标悬停的位置。