Minecraft Wiki

除另有声明,转载时均必须注明出处若簡繁轉換出錯,請以遊戲內為準请勇于扩充与修正内容有兴趣逛逛我们的微博沟通交流,欢迎到社区专页需要协助,请在告示板留言

了解更多

Minecraft Wiki
Advertisement
[查看 | 編輯 | 歷史 | 清除快取]文件頁面
Lua logo.svg

此模板使用了模組:Crafting usage,此腳本使用Lua編寫。
更多詳情,請參閱維基百科:LuaMediaWiki:擴展:Scribunto

該模板會在頁面的「合成材料」段落顯示使用該材料的合成配方。

只會在 Category:Recipe using <ingredient>分類列表)裡搜尋配方,僅接受使用了 {{crafting}}的結果。

如果找不到有效的配方,頁面將會被加上 Category:空合成用途

用法

  • {{{1}}}:用於控制要搜尋的配方,預設為頁面名稱。可指定多個配方,使用逗號進行分隔。
  • {{{match}}}:指定配方的匹配程度,預設為精準匹配。可指定多個匹配類型,使用逗號進行分隔。如果指定了多個材料,但只有1種匹配類型,這個匹配類型將會用於所有配方的匹配。
    • start 表明匹配指定材料開頭的配方。例如:「Redstone」將會匹配「Redstone Torch」、「Redstone Block」、「Redstone」等,但不會匹配到「Block of Redstone」、「Some Redstone thing」等。
    • end 表明匹配指定材料末尾的配方。例如「Redstone」將會匹配「Block of Redstone」、「Redstone」等,但不會匹配「Redstone Block」、「Some Redstone thing」等。
    • any 表明匹配任何含該材料的配方。例如:「Redstone」將會匹配「Block of Redstone」、「Redstone」、「Redstone Block」、「Some Redstone thing」等,但不會匹配「Red stone」、「Block of Reddishstone」等。
  • {{{category}}}:要搜尋的分類的配方名稱,預設為 Recipe using {{{1}}}
  • {{{ignore}}}:一個正則表達式字串,以忽略沒有命名空間以及下劃線的空格。管道字元必須使用¦
  • {{{description}}}:如果配方帶描述,將會自動顯示配方的描述。但如果設定為0,描述列將會強制隱藏,如果設定為1,將會強制顯示。
  • {{{continue}}}:如果設定了,表格將不會結束,允許手動加入附加的配方。與普通的 {{crafting}} 用法相同。最後一個配方必須設定 {{{foot}}}。這在缺失一些配方的情況下是權宜之計,或者加上 {{{ignore}}} 來手寫一個配方,以進行更高高度的自訂。

{{Crafting}} usage

These args are used on the {{crafting}} templates themselves, but are read by this template.

  • {{{ignoreusage}}}: This can be added to crafting recipes which should be ignored by this template. Best for recipes which need to be ignored by multiple {{crafting usage}} templates.
  • {{{arggroups}}}: Used to manually specify which arguments are grouped (see below). Use the arg names (A1, A2, etc.) if the recipe is shaped, or numbers if the recipe is shapeless. Grouped args are separated by commas, and groups are separated by semi-colons. For example: A1,B1,A2;C1,Output would make A1, B1 and A2 a group and C1 and Output a group.

If not all frames of an animation is used, any value set in the name or ingredients arguments will be removed.

Arg groups

In order to correctly understand how the animations in a recipe should be displayed, the template needs to know which arguments are related. For example: in the bed recipe, any wood plank and any wool color can be mixed, and they will all produce the same color bed, thus none of them are related. However in the firework star recipe, the dye and the resulting firework star are related, but the extra ingredient isn't (any extra ingredient can be used with any color of firework star, but the correct dye has to be used to get the correct firework star).

For animations with different amount of frames, the template knows that they are not grouped, because the animation would get out of sync. However, if they have the same amount of frames, the template assumes they are a group. In cases where this isn't true, {{{arggroups}}} should be used.

Example

主條目:Template:Crafting usage/doc/example
[編輯]
Advertisement