1. Wiki
  2. /实体
  3. /minecraft:exhaustion_values

minecraft:exhaustion_values

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:exhaustion_values。Get GodCraft

概览

minecraft:exhaustion_values 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 设置玩家的每种动作会消耗多少饥饿值。数值越低玩家饿得越慢;设为 0 则该动作不消耗饥饿值。

字段

字段类型默认值说明
healnumber6饥饿值满时恢复生命所增加的消耗度。
jumpnumber0.05每次普通跳跃增加的消耗度。
sprint_jumpnumber0.2疾跑时每次跳跃增加的消耗度。
minenumber0.005每挖掘一个方块增加的消耗度。
attacknumber0.1每次攻击增加的消耗度。
damagenumber0.1受到伤害时增加的消耗度。
walknumber0行走时增加的消耗度。
sprintnumber0.01疾跑时增加的消耗度。
swimnumber0.01游泳时增加的消耗度。
lungenumber4突进魔咒触发时增加的消耗度,乘以魔咒等级。

示例

写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):

BP/entities/<name>.json
{
  "minecraft:exhaustion_values": {
    "heal": 6,
    "jump": 0.05,
    "sprint_jump": 0.2,
    "mine": 0.005,
    "attack": 0.1,
    "damage": 0.1,
    "walk": 0,
    "sprint": 0.01
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more