.
Entity Experience Reward Properties
| Name |
Default Value |
Type |
Description |
Example Values |
| on_bred |
{"expression":"","version":-1} |
Molang |
A Molang expression defining the amount of experience rewarded when this entity is successfully bred. |
Armadillo: "Math.Random(1,7)" |
| on_bred (Alternate 1) |
not set |
Key/item pairs of Bred items |
|
|
| on_bred (Alternate 2) |
not set |
Decimal number |
|
|
| on_death |
{"expression":"","version":-1} |
Molang |
A Molang expression defining the amount of experience rewarded when this entity dies. |
Armadillo: "query.last_hit_by_player ? Math.Random(1,3) : 0", Blaze: "query.last_hit_by_player ? 10 : 0", Bogged: "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0" |
| on_death (Alternate 1) |
not set |
Key/item pairs of Death items |
|
|
| on_death (Alternate 2) |
not set |
Decimal number |
|
|
Bred
Bred Properties
| Name |
Default Value |
Type |
Description |
Example Values |
| expression |
not set |
String |
|
|
| version |
not set |
Integer number |
|
|
Death
Death Properties
| Name |
Default Value |
Type |
Description |
Example Values |
| expression |
not set |
String |
|
|
| version |
not set |
Integer number |
|
|
Samples
"minecraft:experience_reward": {
"on_bred": "Math.Random(1,7)",
"on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
}
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? 10 : 0"
}
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? 5 + (query.equipment_count * Math.Random(1,3)) : 0"
}
"minecraft:experience_reward": {
"on_bred": "Math.Random(1,7)",
"on_death": "query.last_hit_by_player ? 10 : 0"
}
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? 5 : 0"
}
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? Math.Random(1,3) : 0"
}
At /minecraft:entity/component_groups/minecraft:baby_drowned/minecraft:experience_reward/:
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? 12 + (query.equipment_count * Math.Random(1,3)) : 0"
}
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? 3 : 0"
}
"minecraft:experience_reward": {
"on_death": "10"
}
"minecraft:experience_reward": {
"on_death": "!query.is_baby && query.last_hit_by_player ? Math.Random(1,3) : 0"
}
"minecraft:experience_reward": {
"on_bred": "Math.Random(1,7)",
"on_death": "query.last_hit_by_player ? 5 : 0"
}
"minecraft:experience_reward": {
"on_death": "query.last_hit_by_player ? query.variant : 0"
}