Attribute Loot Condition

模组

· 作者 Karashok-Leo

此模组新增了一种战利品条件类型。

0 本站下载 0 关注 更新于 1 年前

需要前置:Fabric API

最新 1.0.2 · 1.21.1 · Fabric

一键开服(送7天)

?简介

本模组新增了一种战利品表条件(什么是谓词?),允许你根据实体属性来配置战利品。

建议与 RpgDifficulty、L2 Hostility 以及其他实现了怪物属性缩放的模组配合使用。

⚙️配置

初始配置文件如下:

(config/attribute_loot_condition.json)

{
  "attributeWeights": [
    {
      "attribute": "minecraft:generic.max_health",
      "weight": 1.0
    },
    {
      "attribute": "minecraft:generic.armor",
      "weight": 1.0
    },
    {
      "attribute": "minecraft:generic.armor_toughness",
      "weight": 1.0
    },
    {
      "attribute": "minecraft:generic.attack_damage",
      "weight": 1.0
    }
  ]
}

该数组中的条目决定了各种属性的权重。

你可以配置额外的属性,不仅限于这四种。

?用法示例

JSON 格式文件中显然不应包含注释,此处的注释仅用于解释说明。

数据包:

data/minecraft/loot_tables/entities/zombie.json

{
    "pools": [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "item",
                    "name": "minecraft:apple"
                }
            ],
            "conditions": [
                {
                    "condition": "attribute_loot_condition:attribute_weighted_sum",
                    "entity": "this",
                    "min": 20,
                    "max": 0  // 不大于 0 表示取消此项检查
                }
            ]
        }
    ]
}

加载此数据包后,当玩家击杀僵尸时,游戏会对僵尸的最大生命值、护甲、护甲韧性和攻击伤害进行加权求和。如果该总和不低于 20,则满足条件。

✉️反馈

如有任何错误或建议,请在 Issue 页面提供反馈。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源