Entity Documentation - minecraft:experience_reward
minecraft:experience_reward
defines the amount of experience rewarded when the entity dies or is successfully bred.
Parameters
Name | Default Value | Type | Description |
---|---|---|---|
on_bred | 0 | Molang | A Molang expression defining the amount of experience rewarded when the entity is successfully bred. An array of expressions adds each expression's result together for a final total. |
on_death | 0 | Molang | A Molang expression defining the amount of experience rewarded when the entity dies. An array of expressions adds each expression's result together for a final total. |
Example
"minecraft:experience_reward":{
"on_bred": 0,
"on_death": 0
}
Vanilla entities examples
cow
"minecraft:experience_reward": {
"on_bred": "Math.Random(1,7)",
"on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
}
Vanilla entities using minecraft:experience_reward
- axolotl
- bee
- blaze
- cat
- cave_spider
- chicken
- cow
- creeper
- dolphin
- donkey
- drowned
- elder_guardian
- enderman
- endermite
- evocation_illager
- fish
- fox
- ghast
- glow_squid
- goat
- guardian
- hoglin
- horse
- husk
- llama
- magma_cube
- mooshroom
- mule
- ocelot
- panda
- parrot
- phantom
- pig
- piglin_brute
- piglin
- pillager
- player
- polar_bear
- pufferfish
- rabbit
- ravager
- salmon
- sheep
- shulker
- silverfish
- skeleton_horse
- skeleton
- slime
- spider
- squid
- stray
- strider
- tropicalfish
- turtle
- vex
- vindicator
- witch
- wither_skeleton
- wither
- wolf
- zoglin
- zombie_horse
- zombie_pigman
- zombie_villager_v2
- zombie_villager
- zombie
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for