minecraft:behavior.charge_held_item
Allows an entity to charge and use their held item.
Properties
| Property | Type | Default | What it does |
|---|---|---|---|
items required | List of text or object1 to any entries | — | The list of items that can be used to charge the held item. This list is required and must have at least one item in it. |
priority | Integermin 0 | 0 | |
control_flags | List of text | [] |
Example from the game files
This is how vanilla Piglin uses it in Minecraft Bedrock 1.26.60.5:
{
"minecraft:behavior.charge_held_item": {
"priority": 3,
"items": [
"minecraft:arrow"
]
}
}Used by 2
Vanilla entities with minecraft:behavior.charge_held_item in their definition:
Related components
behavior.nearest_attackable_targetbehavior.melee_box_attackbehavior.ranged_attackbehavior.stomp_turtle_eggbehavior.leap_at_targetbehavior.nearest_prioritized_attackable_targetbehavior.aquatic_charge_attackbehavior.guardian_attackbehavior.ocelotattackbehavior.slime_attackbehavior.charge_attackbehavior.delayed_attackbehavior.dragonchargeplayerbehavior.dragonflamingbehavior.dragonstrafeplayerbehavior.fire_at_targetbehavior.knockback_roarbehavior.melee_attackbehavior.ram_attackbehavior.roarbehavior.send_eventbehavior.sonic_boombehavior.stomp_attackbehavior.summon_entity