1. Wiki
  2. /Entities
  3. /minecraft:experience_reward

minecraft:experience_reward

Don't want to write this by hand? GodCraft sets minecraft:experience_reward for you with a switch.Get GodCraft

Overview

minecraft:experience_reward is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Sets how many experience points the entity drops when it dies or is bred. Each value is a Molang expression, so it can be random or depend on the entity.

Fields

FieldTypeDefaultDescription
on_bredMolang expression""Experience given when the entity breeds.
on_deathMolang expression""Experience dropped when the entity dies.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

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

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