编辑

Entity Documentation - minecraft:behavior.hold_ground

Compels an entity to stop at their current location, turn to face a mob they are targeting, and react with an event.

Note

Requires a target in order to work properly. Entities can generate targets via one of the following behaviors:

Entity Hold Ground Behavior Properties

Name Default Value Type Description
broadcast false Boolean true/false Whether to broadcast out the mob's target to other mobs of the same type.
broadcast_range 0 Decimal number Range in blocks for how far to broadcast.
control_flags [] Control Flags choices
min_radius 10 Decimal number Minimum distance the target must be for the mob to run this goal.
priority 0 Integer number As priority approaches 0, the priority is increased. The higher the priority, the sooner this behavior will be executed as a goal.
within_radius_event {"event":"","filters":{"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null},"target":"self"} Within Radius Event item Event to run when target is within the radius. This event is broadcasted if broadcast is true.

Control Flags choices

Value Title Description
jump Jump
look Look
move Move

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: within_radius_event

Name Default Value Type Description
event String
filters (Filters) {"AND":null,"NOT":null,"OR":null,"all":null,"all_of":null,"any":null,"any_of":null,"none_of":null} Filters item Filters allow data objects to specify test criteria which allows their use.
filters (Alternate 1) not set Object
target self Target 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: within_radius_event > filters

Name Default Value Type Description
domain not set Object The domain the test should be performed in.
operator not set Object The comparison to apply with 'value'.
subject not set Object The subject of this filter test.
test not set String The name of the test to apply.
value not set Object The value being compared with the test.

Target choices

Value Title Description
baby Baby
block Block
damager Damager
holder Holder
item Item
other Other
parent Parent
player Player
self Self
target Target

Samples