Skip to main content

Entity component reference (2/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:annotation.break_door​

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

Allows an entity to break doors, assuming that that flags set up for the component to use in navigation.

[!Note] Requires the entity's navigation component to have the parameter can_break_doors set to true.

Break doors annotation Properties​

NameDefault ValueTypeDescription
break_time12Integer numberThe time in seconds required to break through doors.
min_difficultyhardMin Difficulty choicesThe minimum difficulty that the world must be on for this entity to break doors.

Min Difficulty choices​

ValueTitleDescription
easyEasy
hardHard
normalNormal
peacefulPeaceful

Samples​

Drowned​
"minecraft:annotation.break_door": {}

minecraft:annotation.open_door​

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

Allows the entity to open doors.

[!Note] Requires the entity's navigation component to have the parameter can_open_doors set to true.

Samples​

minecraft:apply_knockback_rules​

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

Defines how an entity applies knockback.

[!Note] Released out of beta in format version 1.26.30. The preset field extra_knockback_approach controls how knockback from enchantments, sprinting, and swimming combines with the preset's power (reapply_default preserves the prior behavior; multiply multiplies the preset's power by the extra-knockback factor).

[!Note] This item requires a format version of at least 1.26.30.

Entity Apply Knockback Rules Properties​

NameDefault ValueTypeDescriptionExample Values
presets[]Array of Presets itemsArray of rules instances defining how knockback should be applied to the entity.Drowned: [{"horizontal_power":0.6,"vertical_power":-0.6,"vertical_velocity_cap":-0.4,"check_if_target_is_immersed_in_water":true}], Egg: [{"vertical_power":0.1,"vertical_velocity_cap":0.1}], Iron Golem: [{"horizontal_power":0.52,"vertical_power":0.39,"vertical_velocity_cap":0.8}]

Entity Apply Knockback Rules Instance​

Intance of rules definition.

Entity Apply Knockback Rules Instance Properties​

JSON path: presets

NameDefault ValueTypeDescription
check_if_target_is_immersed_in_waterfalseBoolean true/falseWhether or not the target should be fully immersed in water for the knockback rules to apply.
extra_knockback_approachreapply_defaultExtra Knockback Approach choicesDefines the approach for combining extra knockback from enchantments or sprinting: - "reapply_default": Reapplies knockback again with default knockback parameters, i.
filter (Filter){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filter itemFilter for the entity type that will be affected by these knockback rules.
filter (Alternate 1)not setObject
horizontal_power1Decimal numberPower with which a target should be knocked backwards.
knockback_moderelative_horizontalKnockback Mode choicesDefines how knockback is applied to the target: - "relative_horizontal": Applies knockback along the horizontal direction from the attacker to the target.
scale_with_damagefalseBoolean true/falseScaling factor to the magnitude of knockback based on the inverse square of the damage.
slowdown_scale0.5Decimal numberScaling factor to apply to the target's velocity before applying knockback. Value must be <= 1.
vertical_power0.4000000059604645Decimal numberPower with which a target should be knocked upwards.
vertical_velocity_cap0.4000000059604645Decimal numberMaximum allowed Y velocity after target's knockback rules have been evaluated.
extra_knockback_approach​

Defines the approach for combining extra knockback from enchantments or sprinting: - "reapply_default": Reapplies knockback again with default knockback parameters, i.e. values not defined by this component. - "multiply_reduced": Multiplies the extra knockback with the base knockback and a reduction factor, and adds it to the base knockback.

knockback_mode​

Defines how knockback is applied to the target: - "relative_horizontal": Applies knockback along the horizontal direction from the attacker to the target. - "hit_direction": Applies knockback based on the hit direction and the point of impact (e.g. hits to the bottom of the entity or from below push it upward, hits on the left side of the entity push it to the right).

Extra Knockback Approach choices​

ValueTitleDescription
multiply_reducedMultiply reduced
reapply_defaultReapply default
Filter​
Filter Properties​

JSON path: presets > filter

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.

Knockback Mode choices​

ValueTitleDescription
hit_directionHit direction
relative_horizontalRelative horizontal

Samples​

Drowned​
"minecraft:apply_knockback_rules": {
"presets": [
{
"horizontal_power": 0.6,
"vertical_power": -0.6,
"vertical_velocity_cap": -0.4,
"check_if_target_is_immersed_in_water": true
}
]
}
Egg​
"minecraft:apply_knockback_rules": {
"presets": [
{
"vertical_power": 0.1,
"vertical_velocity_cap": 0.1
}
]
}
Iron Golem​
"minecraft:apply_knockback_rules": {
"presets": [
{
"horizontal_power": 0.52,
"vertical_power": 0.39,
"vertical_velocity_cap": 0.8
}
]
}
Player​
"minecraft:apply_knockback_rules": {
"presets": [
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "bouncy"
},
"horizontal_power": 0.165,
"vertical_power": 0.105,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "regular"
},
"horizontal_power": 0.165,
"vertical_power": 0.105,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "slow_bouncy"
},
"horizontal_power": 0.165,
"vertical_power": 0.24,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "slow_flat"
},
"horizontal_power": 0.165,
"vertical_power": 0.105,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "fast_flat"
},
"horizontal_power": 0.365,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "light"
},
"horizontal_power": 0.165,
"vertical_power": 0.18,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "fast_sliding"
},
"horizontal_power": 0.265,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "slow_sliding"
},
"horizontal_power": 0.165,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "sticky"
},
"horizontal_power": 0.165,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "high_resistance"
},
"horizontal_power": 0.165,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "explosive"
},
"horizontal_power": 0.165,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "hot"
},
"horizontal_power": 0.165,
"vertical_power": 0.105,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
},
{
"filter": {
"test": "enum_property",
"subject": "other",
"domain": "minecraft:sulfur_cube_archetype",
"value": "cold"
},
"horizontal_power": 0.265,
"vertical_power": 0.09,
"vertical_velocity_cap": 8,
"slowdown_scale": 1,
"scale_with_damage": true,
"knockback_mode": "hit_direction",
"extra_knockback_approach": "multiply_reduced"
}
]
}

minecraft:apply_knockback_rules_instance​

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

Intance of rules definition.

Entity Apply Knockback Rules Instance Properties​

NameDefault ValueTypeDescription
check_if_target_is_immersed_in_waterfalseBoolean true/falseWhether or not the target should be fully immersed in water for the knockback rules to apply.
extra_knockback_approachreapply_defaultExtra Knockback Approach choicesDefines the approach for combining extra knockback from enchantments or sprinting: - "reapply_default": Reapplies knockback again with default knockback parameters, i.
filter (Filter){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filter itemFilter for the entity type that will be affected by these knockback rules.
filter (Alternate 1)not setObject
horizontal_power1Decimal numberPower with which a target should be knocked backwards.
knockback_moderelative_horizontalKnockback Mode choicesDefines how knockback is applied to the target: - "relative_horizontal": Applies knockback along the horizontal direction from the attacker to the target.
scale_with_damagefalseBoolean true/falseScaling factor to the magnitude of knockback based on the inverse square of the damage.
slowdown_scale0.5Decimal numberScaling factor to apply to the target's velocity before applying knockback. Value must be <= 1.
vertical_power0.4000000059604645Decimal numberPower with which a target should be knocked upwards.
vertical_velocity_cap0.4000000059604645Decimal numberMaximum allowed Y velocity after target's knockback rules have been evaluated.

extra_knockback_approach​

Defines the approach for combining extra knockback from enchantments or sprinting: - "reapply_default": Reapplies knockback again with default knockback parameters, i.e. values not defined by this component. - "multiply_reduced": Multiplies the extra knockback with the base knockback and a reduction factor, and adds it to the base knockback.

knockback_mode​

Defines how knockback is applied to the target: - "relative_horizontal": Applies knockback along the horizontal direction from the attacker to the target. - "hit_direction": Applies knockback based on the hit direction and the point of impact (e.g. hits to the bottom of the entity or from below push it upward, hits on the left side of the entity push it to the right).

Extra Knockback Approach choices​

ValueTitleDescription
multiply_reducedMultiply reduced
reapply_defaultReapply default

Filter​

Filter Properties​

JSON path: filter

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.

Knockback Mode choices​

ValueTitleDescription
hit_directionHit direction
relative_horizontalRelative horizontal
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13