Qubit Player XP

模组

· 作者 mesosopic

一个小型、可配置的模组,专为整合包使用而设计。允许自定义经验值升级公式和死亡时的经验掉落公式。

0 本站下载 0 关注 更新于 2 个月前

需要前置:Fabric API

最新 2.0.0 · 26.3 · Fabric

一键开服(送7天)

Qubit Player XP

一个小型、可配置的模组,专为整合包设计。

允许自定义升级所需的经验值公式以及死亡时的经验掉落公式。

用法

默认情况下,此模组不会更改任何内容。

可以通过位于 <mc 文件夹>/config/qubit/player_xp.json 的文件进行配置, 其结构如下:

{
  "level_formula": /* ... */,
  "xp_drop": /* ... */
}

level_formula 提供升级到下一级所需的经验值数量。

xp_drop 提供死亡时掉落的经验值数量。

level_formula 和 xp_drop 均为 整数提供者, 默认使用原版中的公式。请注意,Minecraft Wiki 上关于整数提供者和谓词(Predicates)的页面目前相当过时。

这些整数提供者将玩家作为其 this 实体传入,用于战利品上下文。

还添加了两个整数提供者用于构建公式:

qubit:player_xp/level

{
  "type": "qubit:player_xp/level"
}

返回玩家当前的等级。仅可在 level_formula 和 xp_drop 中使用。

qubit:player_xp/points

{
  "type": "qubit:player_xp/points"
}

玩家距离下一级所持有的经验点数。仅可在 xp_drop 中使用。

示例配置

这是使用默认(原版)公式的配置:

{
  "level_formula": {
    "type": "minecraft:number_dispatcher",
    "cases": [
      {
        "condition": {
          "type": "minecraft:int_value_check",
          "value": { "type": "qubit:player_xp/level" },
          "test": { "min": 0, "max": 15 }
        },
        "value": {
          "type": "minecraft:add",
          "inputs": [ 7, {
            "type": "minecraft:mul",
            "inputs": [ 2, { "type": "qubit:player_xp/level" } ]
          }]
        }
      },
      {
        "condition": {
          "type": "minecraft:int_value_check",
          "value": { "type": "qubit:player_xp/level" },
          "test": { "min": 16, "max": 30 }
        },
        "value": {
          "type": "minecraft:add",
          "inputs": [ -38, {
            "type": "minecraft:mul",
            "inputs": [ 5, { "type": "qubit:player_xp/level" } ]
          }]
        }
      }
    ],
    "default": {
      "type": "minecraft:add",
      "inputs": [ -158, {
        "type": "minecraft:mul",
        "inputs": [ 9, { "type": "qubit:player_xp/level" } ]
      }]
    }
  },
  "xp_drop": {
    "type": "minecraft:min",
    "inputs": [ 100, {
      "type": "minecraft:mul",
      "inputs": [ 7, { "type": "qubit:player_xp/level" } ]
    }]
  }
}

有关旧版 1.0 配置的说明,请参阅 此 README 的旧版本。

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

评论 0

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

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源