Skip to main content

Entity component reference (21/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:tick_world​

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

Defines if the entity ticks the world and the radius around it to tick.

Entity Tick World Properties​

NameDefault ValueTypeDescription
distance_to_players128Decimal numberThe distance at which the closest player has to be before this entity despawns. This option will be ignored if never_despawn is true. Value must be >= 128.
never_despawntrueBoolean true/falseIf true, this entity will not despawn even if players are far away. If false, distance_to_players will be used to determine when to despawn.
radius2Integer numberThe area around the entity to tick. Value must be >= 2. Value must be <= 6.

minecraft:timer​

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

Adds a timer after which an event will fire.

Entity Timer Properties​

NameDefault ValueTypeDescription
loopingtrueBoolean true/falseIf true, the timer will restart every time after it fires.
random_time_choices[]Array of Random Time Choices itemsThis is a list of objects, representing one value in seconds that can be picked before firing the event and an optional weight. Incompatible with time.
randomIntervaltrueBoolean true/falseIf true, the amount of time on the timer will be random between the min and max values specified in time.
time (Legacy FloatRange)not setTime itemAmount of time in seconds for the timer. Can be specified as a number or a pair of numbers (min and max). Incompatible with random_time_choices.
time (as Decimal number)not setDecimal number
time_down_event (Entity ActorDefinitionTrigger){"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"}Time Down Event itemEvent to fire when the time on the timer runs out. Can be an object with event and target properties, or a simple event string.
time_down_event (as String)not setString

Entity TimerWeightChoiceEntry​

Entity TimerWeightChoiceEntry Properties​

JSON path: random_time_choices

NameDefault ValueTypeDescription
value0Decimal number
weight0Integer number

Legacy FloatRange​

Legacy FloatRange Properties​

JSON path: time

NameDefault ValueTypeDescription
max0Decimal number
min0Decimal number

Entity ActorDefinitionTrigger​

Triggers an entity event when specified conditions are met. Events activate component groups that change entity behavior—transforming villagers into zombie villagers, switching mobs to aggressive mode, or triggering growth stages. Combine with filters to create conditional state machines that respond to gameplay.

Entity ActorDefinitionTrigger Properties​

JSON path: time_down_event

NameDefault ValueTypeDescription
eventString
filters (Filters){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Filters itemFilters allow data objects to specify test criteria which allows their use.
filters (Alternate 1)not setObject
targetselfTarget choices
filters​

Filters allow data objects to specify test criteria which allows their use. Filters can be defined by a single object of type (Filter Test), an array of tests, collection groups, or a combination of these objects.

Filters​
Filters Properties​

JSON path: time_down_event > 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.

Target choices​

ValueTitleDescription
babyBaby
blockBlock
damagerDamager
holderHolder
itemItem
otherOther
parentParent
playerPlayer
selfSelf
targetTarget

Samples​

minecraft:trade_resupply​

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

Resupplies an entity's trade.

minecraft:trade_table​

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

Defines this entity's ability to trade with players.

Entity Trade Table Properties​

NameDefault ValueTypeDescription
convert_trades_economyfalseBoolean true/falseDetermines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table.
display_nameStringName to be displayed while trading with this entity.
new_screenfalseBoolean true/falseUsed to determine if trading with entity opens the new trade screen.
persist_tradesfalseBoolean true/falseDetermines if the trades should persist when the mob transforms.
tableStringFile path relative to the behavior pack root for this entity's trades.

convert_trades_economy​

Determines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table. When the trades are converted, the mob will generate a new trade list with their new trade table, but then it will try to convert any of the same trades over to have the same enchantments and user data. For example, if the original has a Emerald to Enchanted Iron Sword (Sharpness 1), and the new trade also has an Emerald for Enchanted Iron Sword, then the enchantment will be Sharpness 1.

persist_trades​

Determines if the trades should persist when the mob transforms. This makes it so that the next time the mob is transformed to something with a trade_table or economy_trade_table, then it keeps their trades.

Samples​

minecraft:trail​

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

Causes an entity to leave a trail of blocks as it moves about the world. Obeys Mob Griefing rules.

Entity Trail Properties​

NameDefault ValueTypeDescription
block_typeairStringThe type of block that is placed. Solid blocks cannot be placed at the entity's position when offset is [0, 0, 0].
extent0Integer numberMaximum horizontal distance from the center at which blocks can be placed. Value must be <= 16.
offset[0, 0, 0]Array of numbersOffset from the entity's position used to determine where trail blocks are placed and placement checks are applied, capped at 16 blocks away.
offset (Offset)not setOffset (Offset) item
place_only_on_block_position_changefalseBoolean true/falseWhen true, trail blocks are only placed on ticks where the bottom of the entity moves into a different block position, or where the entity lands (goes from airborne to grounded).
placement_checksblockPlacement Checks choicesControls the checks applied at each trail block placement position before placing the trail block.
placement_conditions[[object Object]]Array of Placement Conditions itemsConditions that must all be satisfied relative to the trail block placement position.
placement_filter (Placement Filter){"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null}Placement Filter itemOne or more conditions that must be met in order to cause the chosen block type to be placed.
placement_filter (Alternate 1)not setObject
shapecornersShape choicesControls the horizontal placement pattern. 'corners' places four corner blocks, 'square' fills a square, and 'circle' fills a circular disk. Defaults to 'corners'.
spawn_filternot setMinecraft filterConditions that must be met for the trail block to be placed.
spawn_offset[0, 0, 0]x, y, z coordinate arrayOffset from the entity's position where the trail block is placed.

offset​

Offset from the entity's position used to determine where trail blocks are placed and placement checks are applied, capped at 16 blocks away. X and Z are relative to the entity's orientation and rotate to its nearest cardinal facing; Y is a vertical offset.

place_only_on_block_position_change​

When true, trail blocks are only placed on ticks where the bottom of the entity moves into a different block position, or where the entity lands (goes from airborne to grounded). Standing still or moving within the same block does not place blocks. Defaults to false.

placement_checks​

Controls the checks applied at each trail block placement position before placing the trail block. 'none' applies no placement checks, 'block' applies block placement conditions, and 'standard' applies standard block placement rules, including clearance from entities that obblock placement.

placement_conditions​

Conditions that must all be satisfied relative to the trail block placement position. Block types within one condition are alternatives. When omitted, defaults to [{ "y_offset": 0, "block_types": ["minecraft:air"] }]. Value must have at least 1 items.

Offset (Offset)​

Offset Properties​

JSON path: offset

NameDefault ValueTypeDescription
x0Decimal number
y0Decimal number
z0Decimal number

Placement Checks choices​

ValueTitleDescription
blockBlock
noneNone
standardStandard

Entity Trail Placement Conditions Entry​

Entity Trail Placement Conditions Entry Properties​

JSON path: placement_conditions

NameDefault ValueTypeDescription
block_types (Block Types)[]Array of Block Types itemsBlock types that satisfy this condition at its vertical offset from the placement position. Value must have at least 1 items.
block_types (as String)not setString
block_types (as Object)not setObject
y_offset0Integer numberVertical offset from the trail block placement position. Defaults to 0. Value must be >= -16. Value must be <= 16.
Block Types​
Block Types Properties​

JSON path: placement_conditions > block_types

NameDefault ValueTypeDescription
nameString
states{}Integer number
states (as String)not setString
states (as Boolean true/false)not setBoolean true/false
tagsString

Placement Filter​

Placement Filter Properties​

JSON path: placement_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.

Shape choices​

ValueTitleDescription
circleCircle
cornersCorners
squareSquare

Samples​

minecraft:trail_placement_conditions_entry​

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

The original has no description. See the property table.

Entity Trail Placement Conditions Entry Properties​

NameDefault ValueTypeDescription
block_types (Block Types)[]Array of Block Types itemsBlock types that satisfy this condition at its vertical offset from the placement position. Value must have at least 1 items.
block_types (as String)not setString
block_types (as Object)not setObject
y_offset0Integer numberVertical offset from the trail block placement position. Defaults to 0. Value must be >= -16. Value must be <= 16.

Block Types​

Block Types Properties​

JSON path: block_types

NameDefault ValueTypeDescription
nameString
states{}Integer number
states (as String)not setString
states (as Boolean true/false)not setBoolean true/false
tagsString
Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13