minecraft:experience_reward for you with a switch.Get GodCraftOverview
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
| Field | Type | Default | Description |
|---|---|---|---|
on_bred | Molang expression | "" | Experience given when the entity breeds. |
on_death | Molang 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": ""
}
}