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

minecraft:experience_reward

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

概览

minecraft:experience_reward 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 设置实体死亡或繁殖时掉落多少经验。每个值都是 Molang 表达式,所以可以是随机的,也可以依赖实体本身。

字段

字段类型默认值说明
on_bredMolang expression""实体繁殖时给予的经验。
on_deathMolang expression""实体死亡时掉落的经验。

示例

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

BP/entities/<name>.json
{
  "minecraft:experience_reward": {
    "on_bred": "",
    "on_death": ""
  }
}

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