本篇教程由作者设定未经允许禁止转载。
本教程正在施工中,不代表最终品质
教程版本
MineCraft版本:1.18.2
模组版本:1.3.2.0
配置文件位置
一般的,默认配置在\defaultconfigs文件夹内。
如果你已创建存档,则需至\saves\存档名\serverconfig中修改属于存档的局部配置文件。
🚧编辑食物组
请打开diet-groups.toml:
✅默认内容
[[groups]] #蛋白质
name = "proteins"
icon = "minecraft:cooked_beef"
color = "#d4781c"
order = 0
default_value = 0.0
gain_multiplier = 1.0
decay_multiplier = 1.0
beneficial = true
[[groups]] #谷物
name = "grains"
icon = "minecraft:bread"
color = "#d4a31c"
order = 0
default_value = 0.0
gain_multiplier = 1.0
decay_multiplier = 1.0
beneficial = true
[[groups]] #蔬菜
name = "vegetables"
icon = "minecraft:carrot"
color = "#31d41c"
order = 0
default_value = 0.0
gain_multiplier = 1.0
decay_multiplier = 1.0
beneficial = true
[[groups]] #水果
name = "fruits"
icon = "minecraft:apple"
color = "#d41c53"
order = 0
default_value = 0.0
gain_multiplier = 1.0
decay_multiplier = 1.0
beneficial = true
[[groups]] #糖类
name = "sugars"
icon = "minecraft:honey_bottle"
color = "#ff8fe9"
order = 1
default_value = 0.0
gain_multiplier = 1.0
decay_multiplier = 1.0
beneficial = true
🚧结构说明
[[groups]]
|-----name 组名称
|-----icon 组图标,填写物品注册名,例如minecraft:apple。
|-----color 组颜色,影响名字、进度条颜色 ,填写HEX值。
|-----order 组优先级,相当于排序,从0开始。
|-----default_value 默认值,如果deathPenaltyMethod = "PERCENT",务必将此值设置为>0的有理数。
|-----gain_multiplier
|-----decay_multiplier
|-----beneficial
🚧实例:添加食品组
🚧编辑食物效果
请打开diet-effects.toml:
✅默认内容
[[effects]]
[[effects.attributes]]
name = "minecraft:generic.max_health"
operation = "add"
amount = 2.0
[[effects.attributes]]
name = "minecraft:generic.attack_damage"
operation = "add"
amount = 2.0
[[effects.attributes]]
name = "minecraft:generic.attack_speed"
operation = "multiply_total"
amount = 0.1
[[effects.conditions]]
groups = ["proteins", "fruits", "vegetables", "grains"]
match = "all"
above = 0.8
below = 1.0
[[effects]]
[[effects.attributes]]
name = "minecraft:generic.max_health"
operation = "add"
amount = 2.0
[[effects.attributes]]
name = "minecraft:generic.knockback_resistance"
operation = "add"
amount = 0.10
[[effects.attributes]]
name = "minecraft:generic.armor_toughness"
operation = "add"
amount = 1.0
[[effects.conditions]]
groups = ["proteins", "fruits", "vegetables", "grains"]
match = "every"
above = 0.8
below = 1.0
[[effects]]
[[effects.attributes]]
name = "minecraft:generic.movement_speed"
operation = "multiply_base"
amount = 0.25
[[effects.status_effects]]
name = "minecraft:hunger"
power = 3
[[effects.conditions]]
groups = ["sugars"]
match = "all"
above = 0.8
below = 1.0
🚧结构说明
🚧实例:添加食品