Skip to main content

Entity component reference (8/23)

This page carries the component pages of MS Learn (MicrosoftDocs/minecraft-creator a9fd1c0, CC BY 4.0). IDs, property names, types, default values and JSON are as in the original. The full list is in the index.

minecraft:genetics​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_genetics.md)

Defines the way a mob's genes and alleles are passed on to its offspring, and how those traits manifest in the child. Compatible parent genes are crossed together, the alleles are handed down from the parents to the child, and any matching genetic variants fire off JSON events to modify the child and express the traits.

Genetics Properties​

NameDefault ValueTypeDescriptionExample Values
genesnot setArray of Genes itemsThe list of genes that this entity has and will cross with a partner during breeding.Goat: [{"name":"goat_variant","use_simplified_breeding":true,"allele_range":{"range_min":1,"range_max":100},"genetic_variants":[{"main_allele":{"range_min":1,"range_max":2},"birth_event":{"event":"minecraft:born_screamer","target":"self"}},{"main_allele":{"range_min":3,"range_max":100},"birth_event":{"event":"minecraft:born_default","target":"self"}}]}]
mutation_rate0.03125Decimal numberChance that an allele will be replaced with a random one instead of the parent's allele during birth.Goat: 0.02

Genes​

The list of genes that this entity has and will cross with a partner during breeding.

Genes Properties​

JSON path: genes

NameDefault ValueTypeDescription
allele_rangenot setInteger numberThe range of positive integer allele values for this gene.
allele_range (as Object)not setAllele Range item
genetic_variantsnot setArray of Genetic Variants itemsThe list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied.
mutation_rate-1Decimal numberIf this value is non-negative, overrides the chance for this gene that an allele will be replaced with a random one instead of the parent's allele during birth.
namenot setStringThe name of the gene.
use_simplified_breedingnot setBoolean true/falseIf true, mobs spawned from breeding will always inherit main alleles from parents' main alleles and hidden alleles from the hidden ones.
allele_range​

The range of positive integer allele values for this gene. Spawned mobs will have a random number in this range assigned to them. Can be a single integer or an object with range_min and range_max properties.

mutation_rate​

If this value is non-negative, overrides the chance for this gene that an allele will be replaced with a random one instead of the parent's allele during birth. Non-negative values greater than 1 will be the same as the value 1.

Allele Range​
Allele Range Properties​

JSON path: genes > allele_range

NameDefault ValueTypeDescription
range_maxnot setInteger numberMaximum allele value
range_minnot setInteger numberMinimum allele value
Genetic Variants​

The list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied.

Genetic Variants Properties​

JSON path: genes > genetic_variants

NameDefault ValueTypeDescription
birth_eventnot setMinecraft Event TriggerEvent to run when this mob is created and matches the allele conditions.
both_allele-1Integer numberIf this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with both. Can also be a range of integers.
both_allele (as Object)not setBoth Allele item
either_allele-1Integer numberIf this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with either. Can also be a range of integers.
either_allele (as Object)not setEither Allele item
hidden_allele-1Integer numberIf this value is non-negative, compare the mob's hidden allele with this value for a match. Can also be a range of integers.
hidden_allele (as Object)not setHidden Allele item
main_allele-1Integer numberIf this value is non-negative, compare the mob's main allele with this value for a match. Can also be a range of integers.
main_allele (as Object)not setMain Allele item
Both Allele​
Both Allele Properties​

JSON path: genes > genetic_variants > both_allele

NameDefault ValueTypeDescription
range_maxnot setInteger numberMaximum allele value
range_minnot setInteger numberMinimum allele value
Either Allele​

Same structure as Both Allele.

Hidden Allele​

Same structure as Both Allele.

Main Allele​

Same structure as Both Allele.

Samples​

Goat​
"minecraft:genetics": {
"mutation_rate": 0.02,
"genes": [
{
"name": "goat_variant",
"use_simplified_breeding": true,
"allele_range": {
"range_min": 1,
"range_max": 100
},
"genetic_variants": [
{
"main_allele": {
"range_min": 1,
"range_max": 2
},
"birth_event": {
"event": "minecraft:born_screamer",
"target": "self"
}
},
{
"main_allele": {
"range_min": 3,
"range_max": 100
},
"birth_event": {
"event": "minecraft:born_default",
"target": "self"
}
}
]
}
]
}

minecraft:giveable​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_giveable.md)

Defines sets of items that can be used to trigger events when used on this entity. The item will also be taken and placed in the entity's inventory.

Giveable Properties​

NameDefault ValueTypeDescription
cooldown0Decimal numberAn optional cool down in seconds to prevent spamming interactions.
itemsnot setArray of stringsThe list of items that can be given to the entity to place in their inventory. Can be an array or a single item string.
items (as String)not setString
on_givenot setObjectEvent to fire when the correct item is given. Can be an object with event and target properties, or a simple event string.
on_give (as String)not setString

Samples​

minecraft:ground_offset​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_ground_offset.md)

Sets the offset from the ground that the entity is actually at.

Ground Offset Properties​

NameDefault ValueTypeDescription
value0Decimal numberThe value of the entity's offset from the terrain, in blocks.

minecraft:group_size​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_group_size.md)

Keeps track of entity group size in the given radius.

Group Size Properties​

NameDefault ValueTypeDescription
filtersnot setMinecraft filterThe list of conditions that must be satisfied for other entities to be counted towards group size.
radius16Decimal numberRadius from center of entity.

Samples​

minecraft:grows_crop​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_grows_crop.md)

Could increase crop growth when entity walks over crop.

Entity Grows Crop Properties​

NameDefault ValueTypeDescription
chance0Decimal numberValue between 0-1. Chance of success per tick
charges10Integer numberNumber of charges

Samples​

minecraft:healable​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_healable.md)

How entities heal.

[!Note] From 1.21.130, each entry in items accepts an optional result_item field. On a successful heal, the consumed item is replaced in the player's inventory with the specified item.

Entity Healable Properties​

NameDefault ValueTypeDescriptionExample Values
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemThe filter group that defines the conditions for using this item to heal the entity.Parrot: {"operator":"!=","test":"is_riding","value":true}
filters (as Object)not setObject
force_usefalseBoolean true/falseDetermines if item can be used regardless of entity being at full health.Parrot: true
items[]Array of Items itemsThe array of items that can be used to heal this entity.Llama: [{"item":"wheat","heal_amount":2},{"item":"hay_block","heal_amount":10}], Parrot: [{"effects":[{"amplifier":0,"chance":1,"duration":1000,"name":"fatal_poison"}],"heal_amount":0,"item":"cookie"}]

Filters​

Filters Properties​

JSON path: filters

NameDefault ValueTypeDescription
domainnot setObjectThe domain the test should be performed in.
operatornot setObjectThe comparison to apply with 'value'.
subjectnot setObjectThe subject of this filter test.
testnot setStringThe name of the test to apply.
valuenot setObjectThe value being compared with the test.

Entity HealableComponentFeedItem​

Entity HealableComponentFeedItem Properties​

JSON path: items

NameDefault ValueTypeDescription
effects[]Array of Effects itemsThe effects to apply when this item is used to heal the entity.
heal_amount1Integer numberThe amount of health this entity gains when fed this item.
item{}StringItem identifier that can be used to heal this entity.
item (as Keyed set of strings)not setKeyed set of strings
result_item{}StringThe feed item used will transform to this item upon successful interaction.
result_item (as Keyed set of strings)not setKeyed set of strings
Entity HealableComponentEffect​
Entity HealableComponentEffect Properties​

JSON path: items > effects

NameDefault ValueTypeDescription
amplifier1Integer numberThe amplifier of the effect.
chance1Decimal numberThe chance that the effect is applied.
duration0ObjectThe duration of the effect in seconds, or "infinite".
nameStringThe name of the effect to apply.

Samples​

Llama​
"minecraft:healable": {
"items": [
{
"item": "wheat",
"heal_amount": 2
},
{
"item": "hay_block",
"heal_amount": 10
}
]
}
Parrot​
"minecraft:healable": {
"filters": {
"operator": "!=",
"test": "is_riding",
"value": true
},
"force_use": true,
"items": [
{
"effects": [
{
"amplifier": 0,
"chance": 1,
"duration": 1000,
"name": "fatal_poison"
}
],
"heal_amount": 0,
"item": "cookie"
}
]
}
Sniffer​
"minecraft:healable": {
"items": [
{
"item": "torchflower_seeds",
"heal_amount": 2
}
]
}

minecraft:health​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_health.md)

Defines the health pool for an entity, measured in health points (1 point = half a heart). Typical values: cow (10), zombie (20), iron golem (100), wither (600).

Health Properties​

NameDefault ValueTypeDescription
max20Integer numberMaximum health this entity can have. Can be higher than the starting value to allow healing beyond initial health.
value20Integer numberStarting health for this entity in health points (1 point = half a heart).
value (as Object)not setValue item

Value​

Value Properties​

JSON path: value

NameDefault ValueTypeDescription
range_maxnot setInteger number
range_minnot setInteger number

minecraft:heartbeat​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_heartbeat.md)

Defines the entity's heartbeat.

Heartbeat Properties​

NameDefault ValueTypeDescriptionExample Values
interval1.00StringA Molang expression defining the inter-beat interval in seconds. A value of zero or less means no heartbeat.Warden: "2.0 - math.clamp(query.anger_level / 80 * 1.5, 0, 1.5)"
sound_eventheartbeatMinecraft Event TriggerLevel sound event to be played as the heartbeat sound.

Samples​

Warden​
"minecraft:heartbeat": {
"interval": "2.0 - math.clamp(query.anger_level / 80 * 1.5, 0, 1.5)"
}

minecraft:hide​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_hide.md)

Moves to and hides at their owned POI or the closest nearby.

Samples​

minecraft:home​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_home.md)

Saves a home position for when the entity is spawned. This component allows entities like bees to remember and return to a specific location such as a hive or nest.

Entity Home Properties​

NameDefault ValueTypeDescription
home_block_list[]Array of stringsOptional list of blocks that can be considered a valid home.
restriction_radius0Integer numberOptional radius that the entity will be restricted to in relation to its home.
restriction_typenoneRestriction Type choicesDefines how the entity will be restricted to its home position.

home_block_list​

Optional list of blocks that can be considered a valid home. If no such block longer exists at that position, the home restriction is removed. Example syntax: minecraft:sand. Not supported: minecraft:sand:1.

restriction_type​

Defines how the entity will be restricted to its home position. Valid values are: 'none' (no restriction), 'random_movement' (restricts random wandering to be near home), and 'all_movement' (restricts all movement to be near home, though entities can always move closer to home if they are too far away). This item requires a format version of at least 1.21.40.

Restriction Type choices​

ValueTitleDescription
all_movementAll movement
noneNone
random_movementRandom movement

Samples​

minecraft:horse.jump_strength​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_horse.jump_strength.md)

Determines the jump height for a horse or similar entity, like a donkey.

Horse Jump Strength Properties​

NameDefault ValueTypeDescription
valuenot setValue itemValue of jump strength the entity has when spawned.
value (as Decimal number)not setDecimal number

Value​

Describes the range of jump strength.

Value Properties​

JSON path: value

NameDefault ValueTypeDescription
range_maxnot setDecimal numberDefines the maximum strength level.
range_minnot setDecimal numberDefines the minimum strength level.

Samples​

minecraft:hurt_on_condition​

(Source: ms-learn, creator/Reference/Content/EntityReference/Examples/EntityComponents/minecraftComponent_hurt_on_condition.md)

Defines a set of conditions under which an entity should take damage.

Hurt On Condition Properties​

NameDefault ValueTypeDescriptionExample Values
damage_conditionsnot setArray of Damage Conditions itemsList of damage conditions that when met can cause damage to the entity.Allay: [{"cause":"lava","damage_per_tick":4,"filters":{"subject":"self","test":"in_lava"}}], Armor Stand: [{"cause":"lava","damage_per_tick":4,"filters":{"operator":"==","test":"in_lava","subject":"self","value":true}}]

Damage Conditions​

List of damage conditions that when met can cause damage to the entity.

Damage Conditions Properties​

JSON path: damage_conditions

NameDefault ValueTypeDescription
causenot setStringThe kind of damage that is caused to the entity. Various armors and spells use this to determine if the entity is immune.
damage_per_tick1Integer numberThe amount of damage done each tick that the conditions are met.
filtersnot setMinecraft filterThe set of conditions that must be satisfied before the entity takes the defined damage.

Samples​

Allay​
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"cause": "lava",
"damage_per_tick": 4,
"filters": {
"subject": "self",
"test": "in_lava"
}
}
]
}
Armor Stand​
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"cause": "lava",
"damage_per_tick": 4,
"filters": {
"operator": "==",
"test": "in_lava",
"subject": "self",
"value": true
}
}
]
}
Arrow​
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"cause": "lava",
"damage_per_tick": 4,
"filters": {
"test": "in_lava"
}
}
]
}
Blaze​
"minecraft:hurt_on_condition": {
"damage_conditions": [
{
"cause": "drowning",
"damage_per_tick": 1,
"filters": {
"test": "in_contact_with_water"
}
}
]
}
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13