Smaug
一款用于 Minecraft 服务器的交互式制作插件,可创建自定义物品。该插件允许你通过其自身的插件配置来定义自定义物品,或者使用 API 在外部注册你的物品。
功能
此插件的主要目的是让你能够:
- 通过与工作站互动来定义创建自定义物品的配方/转换(计划集成 MythicMobs/Crucible)
- 在配置中定义自定义物品,并在外部注册物品
示例用法:
用法
在配置中定义物品的方法如下:
item.yml
test:
material: DIAMOND
display-name: <#000000>This is a test item!
item-model: minecraft:stone
注意:所有基于文本的字段,例如 display-name 或 lore,都可以使用 MiniMessage 格式。
你可以使用键 'inherits' 以累加方式继承属性:
test2:
display-name: <#0000ff>This is the second test item!
inherits: test
定义配方:
a) 配方接受格式为 <namespace>:<key> 的物品键作为输出,或者 items 部分的物品键。<namespace> 是可选的,因为插件会推断如果键属于 minecraft 命名空间,则默认使用该命名空间。'test.output' 下的配方中给出了一个示例。
b) 另外,如果你想指定来自特定命名空间的已注册物品,例如 smaug,你可以通过 test 引用它,或者在与其他命名空间中的键冲突时使用 smaug:test 引用。
c) 配方也支持前向引用,因为这是目前注册配方的唯一方式,这意味着,配方期望在解析配方时,引用的物品已经存在于注册表中。
recipe.yml
test:
output: gold_ingot # a)
amount: 2 # 输出数量
actions: 10 # 可选,默认为 0
ingredients:
items:
#item_key: amount
test2: 2
test_hammer: 9
type: smaug:anvil # 工作站类型
链接
- 有关该插件及其 API 的支持可在 discord 上获取。任何无法在本页内容中找到答案的问题都可以在那里提出。
- 报告 bug?请在 github 上打开工单。
致谢
Smaug
An interactive crafting plugin for Minecraft servers to create custom items. The plugin allows you to define custom items either in it's own plugin configuration or register your items externally using the API.
Features
This plugin's primary purpose is to allow you to:
- Define recipes/conversions to create custom items by interacting with stations (plans to integrate MythicMobs/Crucible)
- Define custom items in-configuration as well as register items externally
Example Usage:
Usage
Defining an item in-configuration can be done like so:
item.yml
test:
material: DIAMOND
display-name: <#000000>This is a test item!
item-model: minecraft:stone
Note: all text-based fields such as display-name, or lore can use MiniMessage format.
You can inherit properties additively by using the key 'inherits'
test2:
display-name: <#0000ff>This is the second test item!
inherits: test
Defining a recipe:
a) Recipes accept item keys in the format <namespace>:<key> for output, or the keys of the items section. <namespace> is optional, as the plugin will infer if the key is a member of the minecraft namespace it will default to that, an example is given in the recipe under 'test.output'.
b) Alternatively, if you want to specify a registered item from a specific namespace, e.g. smaug, you can refer to it either by test, or smaug:test if there is a conflict with a key in another namespace.
c) Recipes also allow for forward references, as this is the only way currently to register a recipe, meaning, the recipe expects that the item referenced will be present in the registry at the time the recipe is parsed.
recipe.yml
test:
output: gold_ingot # a)
amount: 2 # output amount
actions: 10 # optional, defaults to 0
ingredients:
items:
#item_key: amount
test2: 2
test_hammer: 9
type: smaug:anvil #station type
Links
- Support for the plugin and it's API are available on discord. Any questions that cannot be answered with the content on this page can be asked there.
- Reporting a bug? please open a ticket on github.
Credits
评论 0
登录后参与评分
还没有评论,来抢沙发吧