自定义药水
提供了一种仅服务器端的方式来使用数据包添加自定义药水。
在客户端安装后,它将提供与 REI 和 EMI 的集成。(仅支持至 1.21.1。如果遇到相关问题,可以从版本 2.1.2+1.21.1 开始在 config/custompotions.json 配置文件中禁用此功能)
添加药水
在数据包中,为药水创建一个位于 data/id/custom_potions/id.json 的文件。
可用的参数包括:
"fallback":用于药水的备用名称(当翻译不可用时使用),格式如“{fallback} 药水”、“{fallback} 箭矢”、“喷溅 {fallback}”、“滞留 {fallback}”。"effects":一个效果数组,遵循原版格式。"color":可选的颜色值,使用 与原版的相同格式。
例如:
{
"fallback": "Bad Luck",
"effects": [
{
"id": "minecraft:unluck",
"duration": 6000,
"amplifier": 1
}
],
"color": 5841183
}
添加药水配方
在数据包中,为配方创建一个位于 data/id/potion_recipes/id.json 的文件。可用参数包括 "reagent",它接受一个物品 ID,作为酿造台顶部用于制作药水的原料。
此外还有 "base" 和 "result",两者均使用相同的格式,分别定义配方中使用的输入药水和输出药水。它们包含参数 "type",可以取值为 "custompotions:vanilla"(用于原版或模组药水)或 "custompotions:custom"(用于通过本模组的数据包添加的药水)。
例如:
{
"reagent": "minecraft:poisonous_potato",
"base": {
"type": "custompotions:vanilla",
"potion": "minecraft:awkward"
},
"result": {
"type": "custompotions:custom",
"potion": "potionstuffs:bad_luck"
}
}
{
"reagent": "minecraft:nautilus_shell",
"base": {
"type": "custompotions:vanilla",
"potion": "minecraft:awkward"
},
"result": {
"type": "custompotions:vanilla",
"potion": "minecraft:luck"
}
}
翻译
翻译键的格式为 custompotion.namespace.id.type。例如:custompotion.mypotions.bad_luck.normal、custompotion.mypotions.bad_luck.splash、custompotion.mypotions.bad_luck.lingering 以及 custompotion.mypotions.bad_luck.arrow。
你可以在语言 JSON 文件中使用它们,如下所示:
{
"custompotion.mypotions.bad_luck.normal": "Unlucky Potion",
"custompotion.mypotions.bad_luck.splash": "Throwable Unlucky Potion",
"custompotion.mypotions.bad_luck.lingering": "Lingering Unlucky Potion",
"custompotion.mypotions.bad_luck.arrow": "Unlucky Arrow"
}
Custom Potions
Provides a server side only way to add custom potions using datapacks.
When installed on the client, it provides integration with REI and EMI. (Only up to 1.21.1. If you experience issues with it, you can disable it starting with 2.1.2+1.21.1 in config/custompotions.json)
Adding a potion
In a datapack, make a data/id/custom_potions/id.json file for your potion.
The available parameters are "fallback" for the fallback name of the potion, if translations are unvailable (Potion of {fallback}, Arrow of {fallback}, Splash {fallback}, Lingering {fallback}), an array of effects following the vanilla format, and an optional color using the same format as vanilla.
For example:
{
"fallback": "Bad Luck",
"effects": [
{
"id": "minecraft:unluck",
"duration": 6000,
"amplifier": 1
}
],
"color": 5841183
}
Adding a potion recipe
In your datapack, make a data/id/potion_recipes/id.json file for your recipe. The available parameters are "reagent", which takes in an item id, and is the ingredient used in the top of the brewing stand to make the potion. There are also "base" and "result", which both use the same format, and define the input and output potions used in the recipe. They have the parameters "type", which takes in either "custompotions:vanilla" for vanilla (or modded) potions, and "custompotions:custom" for potions added by datapack using this mod.
For example:
{
"reagent": "minecraft:poisonous_potato",
"base": {
"type": "custompotions:vanilla",
"potion": "minecraft:awkward"
},
"result": {
"type": "custompotions:custom",
"potion": "potionstuffs:bad_luck"
}
}
{
"reagent": "minecraft:nautilus_shell",
"base": {
"type": "custompotions:vanilla",
"potion": "minecraft:awkward"
},
"result": {
"type": "custompotions:vanilla",
"potion": "minecraft:luck"
}
}
Translating
The translation key follows the format of custompotion.namespace.id.type. For example, custompotion.mypotions.bad_luck.normal, custompotion.mypotions.bad_luck.splash, custompotion.mypotions.bad_luck.lingering,
and custompotion.mypotions.bad_luck.arrow.
You can use these in a language json file like so:
{
"custompotion.mypotions.bad_luck.normal": "Unlucky Potion",
"custompotion.mypotions.bad_luck.splash": "Throwable Unlucky Potion",
"custompotion.mypotions.bad_luck.lingering": "Lingering Unlucky Potion",
"custompotion.mypotions.bad_luck.arrow": "Unlucky Arrow"
}
下载 Custom Potions
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Potions
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Potions
下载 Custom Potions
下载 Custom Potions
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Potions
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Potions
下载 Custom Potions
- 将 REI 和 EMI 插件置于配置选项之后。如果您遇到问题,可以在
config/custompotions.json中将emiReiEnabled设置为false。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧