Entity Components & AI Goals Reference

Target: Minecraft Bedrock 1.26.0+ — format_version 1.21.40

Entity components are passed to entity.addComponent() and AI goal behaviors to entity.addComponent('minecraft:behavior.NAME', {...}) in Jepia. The minecraft: prefix is optional.

Health & Combat

minecraft:health

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).

ParameterTypeDefaultDescription
valueInteger20Starting health for this entity in health points.
maxInteger20Maximum health this entity can have. Can be higher than starting value to allow healing beyond initial health.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:health', { value: 30, max: 30 });

minecraft:attack

Defines an entity's melee attack damage and any additional status effects applied on hit. Typical damage values range from 3 (zombie, creeper) to 7–21 (iron golem).

ParameterTypeDefaultDescription
damageRange of floatsnot setRange of the random amount of damage the melee attack deals. Can be a number, an array [min, max], or an object with range_min and range_max.
effect_nameStringnot setIdentifier of the status ailment to apply to an entity attacked by this entity's melee attack.
effect_durationDecimal0Duration in seconds of the status ailment applied to the damaged entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:attack', { damage: [3, 5] });

minecraft:attack_damage

Specifies how much damage is dealt by the entity when it attacks.

ParameterTypeDefaultDescription
valueRange of integersnot setHow much an attack should damage a target.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:attack_damage', { value: 5 });

minecraft:attack_cooldown

Adds a cooldown to an entity to prevent it from attempting to acquire new attack targets.

ParameterTypeDefaultDescription
attack_cooldown_timeRange of floatsnot setAmount of time in seconds for the cooldown. Can be a number or a pair (min and max).
attack_cooldown_complete_eventObject | Stringnot setEvent to be run when the cooldown is complete.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:attack_cooldown', { attack_cooldown_time: [0.5, 1.0] });

minecraft:area_attack

A component that does damage to entities that get within range.

ParameterTypeDefaultDescription
causeStringnot setThe type of damage that is applied to entities that enter the damage range (e.g. "entity_attack").
damage_per_tickInteger2How much damage per tick is applied to entities that enter the damage range.
damage_rangeInteger0.2How close a hostile entity must be to have the damage applied.
damage_cooldownDecimal0Attack cooldown in seconds for how often this entity can attack a target.
entity_filterMinecraft filternot setThe set of entities that are valid to apply the damage to when within range.
play_attack_soundBooleantrueIf the entity should play their attack sound when attacking a target.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:area_attack', { cause: 'entity_attack', damage_per_tick: 4, damage_range: 0.5 });

minecraft:damage_sensor

Defines what events to call when this entity is damaged by specific entities or items.

ParameterTypeDefaultDescription
triggersObject | Arraynot setList of triggers with the events to call when taking specific kinds of damage. Each trigger can specify cause, damage_modifier, damage_multiplier, deals_damage, filters, and on_damage.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:damage_sensor', {
    triggers: { cause: 'fall', deals_damage: 'no' }
});

minecraft:knockback_resistance

Determines an entity's resistance to knockback from melee attacks. A value of 0.0 means no resistance, while 1.0 provides full immunity to knockback.

ParameterTypeDefaultDescription
valueDecimalnot setThe amount of knockback resistance, from 0.0 (none) to 1.0 (full immunity).
maxDecimalnot setMaximum potential knockback resistance for this entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:knockback_resistance', { value: 0.5 });

minecraft:shooter

Defines the entity's ranged attack behavior. The minecraft:behavior.ranged_attack goal uses this component to determine which projectiles to shoot.

ParameterTypeDefaultDescription
defStringnot setActor definition to use as the default projectile. Must have the projectile component.
powerDecimal0Velocity at which projectiles will be shot. A power of 0 uses the default throw power.
aux_valInteger-1ID of the Potion effect for the default projectile to be applied on hit.
soundStringnot setSound that is played when the shooter shoots a projectile.
magicBooleanfalseSets whether the projectiles being used are flagged as magic.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:shooter', { def: 'minecraft:arrow', sound: 'bow' });

minecraft:projectile

Allows the entity to be a thrown entity.

ParameterTypeDefaultDescription
powerDecimal1.3Determines the velocity of the projectile.
gravityDecimal0.05The gravity applied to this entity when thrown. Higher values cause faster falling.
hit_soundStringnot setThe sound that plays when the projectile hits something.
catch_fireBooleanfalseDetermines whether the entity hit will be set on fire.
knockbackBooleantrueIf true, the projectile will knock back the entity it hits.
uncertainty_baseDecimal0The base accuracy of the projectile.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:projectile', { power: 1.5, gravity: 0.05 });

minecraft:explode

Defines how the entity explodes.

ParameterTypeDefaultDescription
powerDecimal3The radius of the explosion in blocks and the amount of damage it deals.
breaks_blocksBooleantrueIf true, the explosion will destroy blocks in the explosion radius.
causes_fireBooleanfalseIf true, blocks in the explosion radius will be set on fire.
fuse_lengthRange of integersnot setThe range for the random amount of time the fuse will be lit before exploding.
fuse_litBooleanfalseIf true, the fuse is already lit when this component is added.
damage_scalingDecimal1A scale factor applied to the explosion's damage to entities. 0 prevents damage; negatives heal.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:explode', { power: 4, breaks_blocks: true, causes_fire: false });

Movement

minecraft:movement

Defines the base movement speed of an entity. Typical values: creeper (0.2), cow (0.25), zombie baby (0.35).

ParameterTypeDefaultDescription
valueDecimalnot setThe base movement speed value. Higher values result in faster movement.
maxDecimalnot setMaximum movement speed this entity can have.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:movement', { value: 0.25 });

minecraft:flying_speed

Speed in blocks that this entity flies at.

ParameterTypeDefaultDescription
valueDecimal0.02Flying speed in blocks per tick.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:flying_speed', { value: 0.1 });

minecraft:underwater_movement

Defines the speed with which an entity can move through water.

ParameterTypeDefaultDescription
valueDecimalnot setMovement speed of the entity under water.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:underwater_movement', { value: 0.15 });

minecraft:lava_movement

Allows a custom movement speed across lava blocks.

ParameterTypeDefaultDescription
valueDecimalnot setThe speed the mob moves over a lava block.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:lava_movement', { value: 0.32 });

minecraft:water_movement

Customizes how the entity moves through water by adjusting drag coefficient. Lower values let entities glide easily; higher values create resistance.

ParameterTypeDefaultDescription
drag_factorDecimal0.8Drag factor to determine movement speed when in water.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:water_movement', { drag_factor: 0.98 });

minecraft:friction_modifier

Defines how much friction affects this entity.

ParameterTypeDefaultDescription
valueDecimal1The higher the number, the more friction affects this entity. 1.0 means regular friction.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:friction_modifier', { value: 0.5 });

minecraft:jump.static

Gives the entity the ability to jump.

ParameterTypeDefaultDescription
jump_powerDecimal0.42The initial vertical velocity for the jump.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:jump.static', { jump_power: 0.42 });

minecraft:jump.dynamic

Defines a dynamic type jump control that will change jump properties based on the speed modifier of the mob. Requires minecraft:movement.skip.

ParameterTypeDefaultDescription
fast_skip_dataObjectnot setThe jump data used for the fast skip (animation_duration, distance_scale, height, jump_delay).
regular_skip_dataObjectnot setThe jump data used for the regular skip.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:jump.dynamic', {});

minecraft:dash

Ability for a rideable entity to dash.

ParameterTypeDefaultDescription
cooldown_timeDecimal1The dash cooldown in seconds.
horizontal_momentumDecimal1Horizontal momentum of the dash.
vertical_momentumDecimal1Vertical momentum of the dash.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:dash', { cooldown_time: 2.75, horizontal_momentum: 20, vertical_momentum: 0.6 });

minecraft:can_fly

Marks the entity as being able to fly; the pathfinder won't be restricted to paths where a solid block is required underneath it.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:can_fly', {});

minecraft:can_climb

Allows an entity to climb ladders.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:can_climb', {});

minecraft:can_power_jump

Allows the entity to power jump like the Horse does in Vanilla.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:can_power_jump', {});

minecraft:block_climber

Allows the entity to detect and maneuver on the scaffolding block.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:block_climber', {});

Navigation

minecraft:navigation.walk

Walking style navigation for the mob.

ParameterTypeDefaultDescription
can_walkBooleantrueTells the pathfinder whether it can walk on the ground outside water.
can_swimBooleanfalseTells the pathfinder whether it can path through water with swimming animation.
can_floatBooleannot setWhether the entity floats in water rather than sinking.
avoid_waterBooleanfalseTells the pathfinder to avoid water when creating a path.
can_break_doorsBooleanfalseTells the pathfinder that it can path through a closed door and break it.
is_amphibiousBooleanfalseTells the pathfinder whether it can walk on the ground underwater.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:navigation.walk', { can_walk: true, avoid_water: true });

minecraft:navigation.fly

Allows this entity to generate paths in the air like the vanilla Parrots do.

ParameterTypeDefaultDescription
can_path_from_airBooleanfalseTells the pathfinder that it can start pathing when in the air.
can_path_over_waterBooleanfalseTells the pathfinder whether it can travel on the surface of the water.
avoid_damage_blocksBooleanfalseTells the pathfinder to avoid blocks that cause damage when finding a path.
avoid_waterBooleanfalseTells the pathfinder to avoid water when creating a path.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:navigation.fly', { can_path_from_air: true, can_path_over_water: true });

minecraft:navigation.float

Allows this entity to generate paths by flying around the air like the regular Ghast.

ParameterTypeDefaultDescription
can_path_over_waterBooleanfalseTells the pathfinder whether it can travel on the surface of the water.
avoid_damage_blocksBooleanfalseTells the pathfinder to avoid blocks that cause damage when finding a path.
can_jumpBooleantrueTells the pathfinder whether it can jump up blocks.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:navigation.float', { can_path_over_water: true });

minecraft:navigation.swim

Allows this entity to generate paths that include water.

ParameterTypeDefaultDescription
can_swimBooleanfalseTells the pathfinder whether it can path through water.
can_walkBooleantrueTells the pathfinder whether it can walk on ground outside water.
can_breachBooleanfalseTells the pathfinder whether it can jump out of water (like a dolphin).
is_amphibiousBooleanfalseTells the pathfinder whether it can walk on the ground underwater.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:navigation.swim', { can_swim: true, can_walk: false });

minecraft:navigation.generic

Allows this entity to generate paths by walking, swimming, flying and/or climbing around and jumping up and down a block.

ParameterTypeDefaultDescription
can_walkBooleantrueTells the pathfinder whether it can walk on the ground outside water.
can_swimBooleanfalseTells the pathfinder whether it can path through water.
can_breachBooleanfalseTells the pathfinder whether it can jump out of water.
is_amphibiousBooleanfalseTells the pathfinder whether it can walk on the ground underwater.
can_path_over_waterBooleanfalseTells the pathfinder whether it can travel on the surface of the water.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:navigation.generic', { can_swim: true, is_amphibious: true });

minecraft:preferred_path

Specifies costing information for mobs that prefer to walk on preferred paths.

ParameterTypeDefaultDescription
default_block_costDecimal0Cost for non-preferred blocks.
jump_costInteger0Added cost for jumping up a node.
max_fall_blocksInteger3Distance mob can fall without taking damage.
preferred_path_blocksArraynot setA list of block types with their associated pathfinding costs. Each entry has blocks (array) and cost (integer).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:preferred_path', {
    default_block_cost: 1.5,
    jump_cost: 5,
    preferred_path_blocks: [{ blocks: ['grass_path'], cost: 0 }]
});

Physics & Collision

minecraft:physics

Defines physics properties of an actor, including if it is affected by gravity or if it collides with objects.

ParameterTypeDefaultDescription
has_collisionBooleantrueWhether or not the entity collides with things.
has_gravityBooleantrueWhether or not the entity is affected by gravity.
push_towards_closest_spaceBooleanfalseWhether or not the entity should be pushed towards the nearest open area when stuck inside a block.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:physics', { has_gravity: false });

minecraft:collision_box

Sets the width and height of the entity's collision box.

ParameterTypeDefaultDescription
widthDecimal1Width of the collision box in blocks. A negative value will be assumed to be 0.
heightDecimal1Height of the collision box in blocks. A negative value will be assumed to be 0.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:collision_box', { width: 0.6, height: 1.8 });

minecraft:pushable

Defines what can push an entity between other entities and pistons.

ParameterTypeDefaultDescription
is_pushableBooleantrueWhether the entity can be pushed by other entities.
is_pushable_by_pistonBooleantrueWhether the entity can be pushed by pistons safely.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:pushable', { is_pushable: true, is_pushable_by_piston: true });

minecraft:push_through

Sets the distance through which the entity can push through.

ParameterTypeDefaultDescription
valueDecimal0The value of the entity's push-through, in blocks.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:push_through', { value: 1 });

minecraft:buoyant

Enables an entity to float on the specified liquid blocks.

ParameterTypeDefaultDescription
liquid_blocksArray of stringsnot setList of blocks this entity can float on. Must be liquid blocks.
base_buoyancyDecimal1Base buoyancy used to calculate how much the entity will float.
apply_gravityBooleantrueApplies gravity each tick outside liquids.
movement_typeString"waves"Type of vertical movement: "waves", "bobbing", or "none".
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:buoyant', {
    liquid_blocks: ['minecraft:water', 'minecraft:flowing_water'],
    apply_gravity: false
});

minecraft:floats_in_liquid

Sets that this entity can float in liquid blocks.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:floats_in_liquid', {});

Appearance

minecraft:scale

Sets the entity's visual size multiplier. A value of 1.0 means normal size, 0.5 is half size (commonly used for baby mobs).

ParameterTypeDefaultDescription
valueDecimal1The scale multiplier for visual size. 1.0 = normal, 0.5 = half, 2.0 = double.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:scale', { value: 0.5 });

minecraft:scale_by_age

Defines the entity's size interpolation based on the entity's age.

ParameterTypeDefaultDescription
start_scaleDecimal1Initial scale of the newborn entity.
end_scaleDecimal1Ending scale of the entity when it's fully grown.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:scale_by_age', { start_scale: 0.5, end_scale: 1.0 });

minecraft:color

Defines the entity's main color. Only works on vanilla entities that have predefined color values (sheep, llama, shulker).

ParameterTypeDefaultDescription
valueInteger0The Palette Color value of the entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:color', { value: 1 });

minecraft:color2

Defines the entity's second texture color. Only works on vanilla entities that have a second predefined color value (tropical fish).

ParameterTypeDefaultDescription
valueInteger0The second Palette Color value of the entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:color2', { value: 2 });

minecraft:variant

Variant is used as a per-type way to express a different visual form of the same mob (e.g. cat breeds). Required for setting up multiple entity variants.

ParameterTypeDefaultDescription
valueInteger0The Id of the variant. By convention, 0 is the base entity/default appearance.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:variant', { value: 1 });

minecraft:mark_variant

An additional per-type way (besides variant) to express a different visual form of the same mob.

ParameterTypeDefaultDescription
valueInteger0The Id of the mark_variant. By convention, 0 is the base entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:mark_variant', { value: 1 });

minecraft:skin_id

Skin ID value. Can be used to differentiate skins, such as base skins for villagers. Requires multiple texture sets to be set up for the entity.

ParameterTypeDefaultDescription
valueInteger0The ID of the skin. By convention, 0 is the ID of the base skin.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:skin_id', { value: 1 });

minecraft:walk_animation_speed

Sets the speed multiplier for this entity's walk animation speed.

ParameterTypeDefaultDescription
valueDecimal1The higher the number, the faster the animation for walking plays. 1.0 = normal, 2.0 = twice as fast.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:walk_animation_speed', { value: 1.5 });

minecraft:default_look_angle

Sets this entity's default head rotation angle.

ParameterTypeDefaultDescription
valueDecimal0Angle in degrees.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:default_look_angle', { value: -15 });

minecraft:sound_volume

Sets the entity's base volume for sound effects.

ParameterTypeDefaultDescription
valueDecimal1The value of the volume the entity uses for sound effects.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:sound_volume', { value: 0.8 });

minecraft:ground_offset

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

ParameterTypeDefaultDescription
valueDecimal0The value of the entity's offset from the terrain, in blocks.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:ground_offset', { value: 0.5 });

State Flags

minecraft:is_baby

Sets that this entity is a baby. Used to set the is_baby value for use in Molang queries and filters.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_baby', {});

minecraft:is_charged

Sets that this entity is charged. Used to set the is_charged value for use in Molang queries and filters.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_charged', {});

minecraft:is_chested

Sets that this entity is currently carrying a chest.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_chested', {});

minecraft:is_dyeable

Allows dyes to be used on this entity to change its color.

ParameterTypeDefaultDescription
interact_textStringnot setThe text that will display when interacting with this entity with a dye when playing with Touch-screen controls.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_dyeable', { interact_text: 'action.interact.dye' });

minecraft:is_ignited

Sets that this entity is currently on fire.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_ignited', {});

minecraft:is_illager_captain

Sets that this entity is an Illager Captain.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_illager_captain', {});

minecraft:is_saddled

Sets that this entity is currently saddled.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_saddled', {});

minecraft:is_sheared

Sets that this entity is currently sheared.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_sheared', {});

minecraft:is_stackable

Allows instances of this entity to have vertical and horizontal collisions with each other. Both instances must have a minecraft:collision_box component.

ParameterTypeDefaultDescription
valueBooleantrueWhether this entity is stackable.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_stackable', {});

minecraft:is_stunned

Sets that this entity is currently stunned.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_stunned', {});

minecraft:is_tamed

Sets that this entity is currently tamed.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:is_tamed', {});

Interaction & Taming

minecraft:interact

Defines interactions with this entity.

ParameterTypeDefaultDescription
interactionsArray | Objectnot setThe list of interactions for this entity. Each can have give_item, interact_text, hurt_item, and more.
cooldownDecimal0Time in seconds before this entity can be interacted with again.
interact_textStringnot setText to show when the player can interact with this entity (touch-screen controls).
health_amountInteger0The amount of health this entity will recover or lose when interacting with this item. Negative values harm the entity.
hurt_itemInteger0The amount of damage the item will take when used to interact. 0 means no durability loss.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:interact', {
    interactions: [{ give_item: true, interact_text: 'action.interact.give' }]
});

minecraft:tameable

This entity can be tamed.

ParameterTypeDefaultDescription
tame_itemsArray of stringsnot setThe list of items that can be used to tame this entity.
probabilityDecimal1The chance of taming with each item use, from 0.0 to 1.0.
tame_eventObject | Stringnot setEvent to fire when the entity is tamed.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:tameable', {
    tame_items: ['bone'],
    probability: 0.33,
    tame_event: { event: 'minecraft:on_tame', target: 'self' }
});

minecraft:leashable

Describes how this mob can be leashed to other items.

ParameterTypeDefaultDescription
soft_distanceInteger4Distance in blocks at which the spring effect starts acting.
hard_distanceInteger6Distance in blocks at which the leash stiffens, restricting movement.
max_distanceInteger0Distance in blocks at which the leash breaks.
can_be_cutBooleantrueIf true, players can cut incoming and outgoing leashes by using shears on the entity.
on_leashObject | Stringnot setEvent to call when this entity is leashed.
on_unleashObject | Stringnot setEvent to call when this entity is unleashed.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:leashable', { soft_distance: 4, hard_distance: 6, max_distance: 10 });

minecraft:nameable

Allows this entity to be named (e.g. using a name tag).

ParameterTypeDefaultDescription
allow_name_tag_renamingBooleantrueIf true, this entity can be renamed with name tags.
always_showBooleanfalseIf true, the name will always be shown.
default_triggerStringnot setTrigger to run when the entity gets named.
name_actionsArraynot setDescribes special names and the events to call when the entity acquires those names. Each entry has name_filter and on_named.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:nameable', { always_show: true });

minecraft:healable

Defines how entities heal — which items can be used to heal and for how much.

ParameterTypeDefaultDescription
itemsArraynot setArray of items that can heal this entity. Each entry has item (identifier) and heal_amount (integer).
force_useBooleanfalseDetermines if item can be used regardless of entity being at full health.
filtersMinecraft filternot setFilter conditions for when this item can be used to heal.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:healable', {
    items: [{ item: 'wheat', heal_amount: 2 }]
});

minecraft:rideable

This entity can be ridden.

ParameterTypeDefaultDescription
seat_countInteger1The number of entities that can ride this entity at the same time.
family_typesArray of stringsnot setList of entity family types that can ride this entity.
seatsArray | Objectnot setList of seat positions. Each entry has position ([x, y, z]) and optional lock_rider_rotation.
controlling_seatInteger0The seat that designates the driver of the entity.
interact_textStringnot setThe text to display when the player can interact with the entity (touch-screen controls).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:rideable', {
    seat_count: 1,
    family_types: ['player'],
    seats: { position: [0, 1.0, 0] }
});

minecraft:sittable

Defines the entity's 'sit' state.

ParameterTypeDefaultDescription
sit_eventObject | Stringnot setEvent to run when the entity enters the 'sit' state.
stand_eventObject | Stringnot setEvent to run when the entity exits the 'sit' state.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:sittable', {});

minecraft:bribeable

Defines the way an entity can get into the 'bribed' state.

ParameterTypeDefaultDescription
bribe_itemsArray of strings | Stringnot setThe list of items that can be used to bribe the entity.
bribe_cooldownDecimal2Time in seconds before the entity can be bribed again.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:bribeable', { bribe_items: ['fish', 'salmon'] });

minecraft:giveable

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

ParameterTypeDefaultDescription
itemsArray of strings | Stringnot setThe list of items that can be given to the entity.
cooldownDecimal0An optional cool down in seconds to prevent spamming interactions.
on_giveObject | Stringnot setEvent to fire when the correct item is given.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:giveable', { items: ['emerald'], on_give: 'on_receive_emerald' });

minecraft:balloonable

Allows this entity to have a balloon attached and defines the conditions and events for when it is ballooned.

ParameterTypeDefaultDescription
massDecimal1Mass that this entity will have when computing balloon pull forces.
soft_distanceDecimal2Distance in blocks at which the spring effect that lifts it activates.
max_distanceDecimal10Distance in blocks at which the balloon breaks.
on_balloonEvent Triggernot setEvent to call when this entity is ballooned.
on_unballoonEvent Triggernot setEvent to call when this entity is unballooned.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:balloonable', { mass: 0.5 });

minecraft:boostable

Defines the conditions and behavior of a rideable entity's boost.

ParameterTypeDefaultDescription
boost_itemsArraynot setList of items that can be used to boost while riding. Each has item, damage, and replace_item.
durationDecimal3Time in seconds for the boost.
speed_multiplierDecimal1Factor by which the entity's normal speed increases.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:boostable', {
    speed_multiplier: 1.35,
    duration: 3,
    boost_items: [{ item: 'carrotOnAStick', damage: 2, replace_item: 'fishing_rod' }]
});

Breeding & Growth

minecraft:addrider

Adds a rider to the entity. Requires minecraft:rideable.

ParameterTypeDefaultDescription
entity_typeStringnot setType of entity to acquire as a rider.
spawn_eventEvent Referencenot setTrigger event when a rider is acquired.
ridersArray[]List of riders to add. Each has entity_type and optional spawn_event.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:addrider', { entity_type: 'minecraft:zombie' });

minecraft:breedable

Allows an entity to establish a way to get into the love state used for breeding. Commonly used with minecraft:behavior.breed.

ParameterTypeDefaultDescription
breed_itemsArray of strings | Stringnot setThe list of items that can get the entity into the 'love' state.
breeds_withArray | Objectnot setEntity definitions this entity can breed with. Each entry can have baby_type and breed_event.
breed_cooldownDecimal60Time in seconds before the entity can breed again.
require_tameBooleantrueIf true, the entities need to be tamed first before they can breed.
causes_pregnancyBooleanfalseIf true, the entity will become pregnant instead of spawning a baby.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:breedable', {
    breed_items: ['wheat'],
    breeds_with: { baby_type: 'myaddon:custom_mob_baby', breed_event: 'minecraft:entity_born' }
});

minecraft:ageable

Adds a timer for the entity to grow up. It can be accelerated by giving the entity the items it likes as defined by feed_items.

ParameterTypeDefaultDescription
durationDecimal1200Length of time in seconds before an entity grows up. Use -1 to always stay a baby.
feed_itemsArray of strings | Stringnot setList of items that can be fed to the entity to age them up.
grow_upObject | Stringnot setEvent to fire when the entity grows up.
drop_itemsArray of stringsnot setList of items dropped when an entity grows up.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:ageable', {
    duration: 1200,
    feed_items: ['wheat_seeds'],
    grow_up: { event: 'minecraft:ageable_grow_up', target: 'self' }
});

minecraft:genetics

Defines the way a mob's genes and alleles are passed on to its offspring, and how those traits manifest in the child.

ParameterTypeDefaultDescription
genesArraynot setThe list of genes this entity has. Each entry has name, allele_range, and optional genetic_variants.
mutation_rateDecimal0.03125Chance that an allele will be replaced with a random one instead of the parent's during birth.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:genetics', {
    mutation_rate: 0.02,
    genes: [{ name: 'my_variant', allele_range: { range_min: 1, range_max: 5 } }]
});

minecraft:spawn_entity

Adds a timer after which this entity will spawn another entity or item (similar to a chicken's egg-laying behavior).

ParameterTypeDefaultDescription
min_wait_timeInteger300Minimum amount of time in seconds to randomly wait before spawning.
max_wait_timeInteger600Maximum amount of time in seconds to randomly wait before spawning.
spawn_itemString"egg"Item identifier of the item to spawn.
spawn_entityStringnot setIdentifier of the entity to spawn (leave empty to spawn an item instead).
spawn_soundString"plop"Identifier of the sound effect to play when spawning.
single_useBooleanfalseIf true, this component will only ever spawn the entity once.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:spawn_entity', {
    min_wait_time: 300, max_wait_time: 600, spawn_item: 'egg', spawn_sound: 'plop'
});

Equipment & Inventory

minecraft:inventory

Defines this entity's inventory properties.

ParameterTypeDefaultDescription
inventory_sizeInteger5Number of slots the container has.
container_typeString"none"Type of container: "horse", "minecart_chest", "chest_boat", "minecart_hopper", "inventory", "container", or "hopper".
can_be_siphoned_fromBooleanfalseIf true, the contents of this inventory can be removed by a hopper.
privateBooleanfalseIf true, the entity will not drop its inventory on death.
restrict_to_ownerBooleanfalseIf true, the entity's inventory can only be accessed by its owner or itself.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:inventory', { inventory_size: 16, container_type: 'inventory' });

minecraft:equipment

Sets the equipment table to use for this entity.

ParameterTypeDefaultDescription
tableStringnot setThe file path to the equipment table, relative to the behavior pack's root.
slot_drop_chanceArraynot setA list of slots with the chance to drop an equipped item. Each entry has slot and drop_chance (0.0–1.0).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:equipment', { table: 'loot_tables/equipment/custom_mob.json' });

minecraft:equippable

Defines an entity's behavior for having items equipped to it.

ParameterTypeDefaultDescription
slotsArraynot setList of slots and the items that can be equipped. Each entry has slot (integer), item, accepted_items, and optional on_equip/on_unequip.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:equippable', {
    slots: [{ slot: 1, item: 'carpet', accepted_items: ['carpet'] }]
});

minecraft:shareables

Defines a list of items the mob wants to share or pick up.

ParameterTypeDefaultDescription
itemsArraynot setList of items to share/pickup. Each entry can have item, priority, max_amount, want_amount, surplus_amount, pickup_only, and admire.
all_itemsBooleanfalseA bucket for all other items in the game (lowest priority).
all_items_max_amountInteger-1Maximum number of any item the mob will hold in the all_items category.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:shareables', {
    items: [{ item: 'diamond_sword', priority: 0, want_amount: 1, surplus_amount: 1 }]
});

minecraft:loot

Specifies the loot table that determines what items this entity drops upon death.

ParameterTypeDefaultDescription
tableStringnot setPath to the loot table JSON file, relative to the behavior pack's root (e.g., 'loot_tables/entities/custom_mob.json').
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:loot', { table: 'loot_tables/entities/custom_mob.json' });

minecraft:economy_trade_table

Defines this entity's ability to trade with players using the economy trade system (villager-style).

ParameterTypeDefaultDescription
tableStringnot setFile path relative to the resource pack root for this entity's trades.
display_nameStringnot setName to be displayed while trading with this entity.
new_screenBooleanfalseUsed to determine if trading with entity opens the new trade screen.
show_trade_screenBooleantrueShow an in-game trade screen when interacting with the mob.
persist_tradesBooleanfalseDetermines if the trades should persist when the mob transforms.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:economy_trade_table', { table: 'trading/custom_trader.json', new_screen: true });

minecraft:trade_table

Defines this entity's ability to trade with players (non-economy version).

ParameterTypeDefaultDescription
tableStringnot setFile path relative to the behavior pack root for this entity's trades.
display_nameStringnot setName to be displayed while trading with this entity.
new_screenBooleanfalseUsed to determine if trading with entity opens the new trade screen.
persist_tradesBooleanfalseDetermines if the trades should persist when the mob transforms.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:trade_table', { table: 'trading/custom_trader.json' });

Sensing & Triggers

minecraft:entity_sensor

A component that owns multiple subsensors, each firing an event when a set of conditions are met by other entities within range.

ParameterTypeDefaultDescription
subsensorsArraynot setThe list of subsensors. Each has range ([h, v]), event, event_filters, minimum_count, maximum_count, and optional cooldown.
find_players_onlyBooleanfalseLimits the search to Players only for all subsensors.
relative_rangeBooleantrueIf true, the subsensors' range is additive on top of the entity's size.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:entity_sensor', {
    subsensors: [{ range: [8, 8], event: 'on_player_nearby', minimum_count: 1 }]
});

minecraft:environment_sensor

Creates a trigger based on environment conditions.

ParameterTypeDefaultDescription
triggersArray | Objectnot setThe list of triggers that fire when environment conditions match the given filter criteria. Each entry has event and filters.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:environment_sensor', {
    triggers: { event: 'minecraft:become_hostile', filters: { test: 'is_brightness', operator: '<', value: 0.49 } }
});

minecraft:target_nearby_sensor

Defines the entity's range within which it can see or sense other entities to target them.

ParameterTypeDefaultDescription
inside_rangeDecimal1Maximum distance in blocks that another entity will be considered in the 'inside' range.
outside_rangeDecimal5Maximum distance in blocks considered in the 'outside' range.
on_inside_rangeObject | Stringnot setEvent to call when an entity gets in the inside range.
on_outside_rangeObject | Stringnot setEvent to call when an entity gets outside the outside range.
must_seeBooleanfalseWhether the other entity needs to be visible to trigger inside events.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:target_nearby_sensor', {
    inside_range: 2, outside_range: 5,
    on_inside_range: { event: 'switch_to_melee', target: 'self' },
    on_outside_range: { event: 'switch_to_ranged', target: 'self' }
});

minecraft:block_sensor

Fires off a specified event when a block in the block list is broken within the sensor range.

ParameterTypeDefaultDescription
on_breakArraynot setList of break entries. Each has block_list (array of strings) and on_block_broken (event name).
sensor_radiusDecimal16Maximum radial distance in which a block can be detected. Max is 32.0.
sourcesMinecraft filternot setList of sources that break the block to listen for. If empty, all breaks are detected.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:block_sensor', {
    sensor_radius: 16,
    on_break: [{ block_list: ['minecraft:beehive', 'minecraft:bee_nest'], on_block_broken: 'hive_destroyed' }]
});

minecraft:inside_block_notifier

Verifies whether the entity is inside any of the listed blocks.

ParameterTypeDefaultDescription
block_listArraynot setList of blocks to monitor. Each entry has block (name + optional states), entered_block_event, and exited_block_event.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:inside_block_notifier', {
    block_list: [{ block: { name: 'minecraft:water' }, entered_block_event: { event: 'entered_water', target: 'self' } }]
});

minecraft:scheduler

Fires off scheduled mob events at time of day events.

ParameterTypeDefaultDescription
scheduled_eventsArray | Objectnot setThe list of triggers that fire when conditions match the given filter criteria. Each entry has event and filters.
min_delay_secsDecimalnot setMinimum delay in seconds before events can run.
max_delay_secsDecimalnot setMaximum delay in seconds before events can run.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:scheduler', {
    scheduled_events: [{ filters: { test: 'is_daytime', value: true }, event: 'daytime_event' }]
});

minecraft:timer

Adds a timer after which an event will fire.

ParameterTypeDefaultDescription
timeRange of floats | Decimalnot setAmount of time in seconds for the timer. Can be a number or pair (min and max). Incompatible with random_time_choices.
time_down_eventObject | Stringnot setEvent to fire when the time runs out.
loopingBooleantrueIf true, the timer will restart every time after it fires.
randomIntervalBooleantrueIf true, the amount of time will be random between min and max values specified in time.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:timer', {
    time: [10, 20], looping: true, time_down_event: { event: 'on_timer', target: 'self' }
});

minecraft:heartbeat

Defines the entity's heartbeat.

ParameterTypeDefaultDescription
intervalString (Molang)1.00A Molang expression defining the inter-beat interval in seconds. A value of zero or less means no heartbeat.
sound_eventEvent Trigger"heartbeat"Level sound event to be played as the heartbeat sound.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:heartbeat', { interval: '2.0 - math.clamp(query.anger_level / 80 * 1.5, 0, 1.5)' });

Spawning & Despawning

minecraft:despawn

Despawns the actor when the despawn rules or optional filters evaluate to true.

ParameterTypeDefaultDescription
despawn_from_chanceBooleantrueDetermines if min_range_random_chance is used in the standard despawn rules.
despawn_from_inactivityBooleantrueDetermines if the min_range_inactivity_timer is used in the standard despawn rules.
min_range_inactivity_timerInteger30Amount of time in seconds the mob must be inactive.
min_range_random_chanceInteger800A random chance between 1 and the given value.
filtersMinecraft filternot setConditions that must be satisfied before the actor is despawned. If defined, standard rules are ignored.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:despawn', { despawn_from_distance: {} });

minecraft:instant_despawn

Despawns the actor immediately.

ParameterTypeDefaultDescription
remove_child_entitiesBooleanfalseIf true, all entities linked to this entity in a child relationship will also be despawned.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:instant_despawn', {});

minecraft:persistent

Defines whether an entity should be persistent in the game world (i.e., it will never despawn naturally).

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:persistent', {});

Identity & Type

minecraft:type_family

Defines the family categories this entity belongs to. Used by filters and other game systems to group entities (e.g., 'mob', 'monster', 'undead', 'zombie').

ParameterTypeDefaultDescription
familyArray of stringsnot setA set of tags describing the categories of this entity. Common values: "mob", "monster", "undead", "aquatic", "arthropod".
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:type_family', { family: ['mob', 'monster'] });

minecraft:strength

Defines the entity's strength to carry items.

ParameterTypeDefaultDescription
valueInteger1The initial value of the strength.
maxInteger5The maximum strength of this entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:strength', { value: 5, max: 5 });

minecraft:follow_range

Defines the maximum range, in blocks, that a mob will pursue a target.

ParameterTypeDefaultDescription
valueIntegernot setThe default follow range in blocks.
maxIntegernot setMaximum follow distance in blocks. The entity will not pursue targets beyond this range.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:follow_range', { value: 35, max: 35 });

minecraft:group_size

Keeps track of entity group size in the given radius.

ParameterTypeDefaultDescription
radiusDecimal16Radius from center of entity to count group members.
filtersMinecraft filternot setConditions that must be satisfied for other entities to be counted towards group size.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:group_size', {
    radius: 32,
    filters: { test: 'is_family', value: 'custom_mob' }
});

minecraft:experience_reward

Defines the experience points rewarded when this entity dies or is bred.

ParameterTypeDefaultDescription
on_deathMolang | Decimalnot setA Molang expression defining the amount of experience rewarded when this entity dies.
on_bredMolang | Decimalnot setA Molang expression defining the amount of experience rewarded when this entity is bred.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:experience_reward', {
    on_death: 'query.last_hit_by_player ? 5 : 0',
    on_bred: 'Math.Random(1,7)'
});

Special Abilities

minecraft:transformation

Defines an entity's transformation from the current definition into another.

ParameterTypeDefaultDescription
intoStringnot setEntity definition that this entity will transform into.
delayDecimal | Arraynot setDefines the properties of the delay for the transformation.
transformation_soundStringnot setSound to play when the entity is done transforming.
drop_equipmentBooleanfalseCause the entity to drop all equipment upon transformation.
keep_levelBooleanfalseIf this entity has trades and has leveled up, it should maintain that level after transformation.
preserve_equipmentBooleanfalseCause the entity to keep equipment after going through transformation.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:transformation', { into: 'minecraft:zombie', transformation_sound: 'mob.pig.death' });

minecraft:boss

Defines the current state of the boss for updating the boss HUD.

ParameterTypeDefaultDescription
nameString55The name that will be displayed above the boss's health bar.
hud_rangeInteger55The max distance from the boss at which the boss's health bar is present on the player's screen.
should_darken_skyBooleanfalseWhether the sky should darken in the presence of the boss.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:boss', { name: 'Custom Boss', hud_range: 55, should_darken_sky: true });

minecraft:teleport

Defines an entity's teleporting behavior.

ParameterTypeDefaultDescription
random_teleportsBooleantrueIf true, the entity will teleport randomly.
min_random_teleport_timeDecimal0Minimum amount of time in seconds between random teleports.
max_random_teleport_timeDecimal20Maximum amount of time in seconds between random teleports.
target_distanceDecimal16Maximum distance the entity will teleport when chasing a target.
dark_teleport_chanceDecimal0.01Modifies the chance that the entity will teleport if in darkness.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:teleport', { random_teleports: true, target_distance: 16 });

minecraft:barter

Enables the component to drop an item as a barter exchange.

ParameterTypeDefaultDescription
barter_tableStringnot setLoot table that's used to drop a random item.
cooldown_after_being_attackedRange of integers0Duration in seconds for which the mob won't barter if it was hurt.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:barter', { barter_table: 'loot_tables/entities/piglin_barter.json' });

minecraft:admire_item

Allows an entity to ignore attackable targets for a given duration (while admiring an item).

ParameterTypeDefaultDescription
durationInteger10Duration in seconds that the mob is pacified.
cooldown_after_being_attackedInteger0Duration in seconds for which the mob won't admire items if it was hurt.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:admire_item', { duration: 10 });

minecraft:trust

Allows this entity to trust multiple players.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:trust', {});

minecraft:celebrate_hunt

Specifies hunt celebration behaviour.

ParameterTypeDefaultDescription
broadcastBooleantrueIf true, celebration will be broadcasted to other entities in the radius.
durationInteger4Duration in seconds of celebration.
radiusDecimal16Radius in which it will notify other entities for celebration if broadcast is enabled.
celebrate_soundStringnot setThe sound event to play when celebrating.
celeberation_targetsMinecraft filternot setConditions the target of the hunt must satisfy to initiate celebration.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:celebrate_hunt', { broadcast: true, duration: 4, radius: 16 });

minecraft:ravager_blocked

Defines the ravager's response to their melee attack being blocked.

ParameterTypeDefaultDescription
knockback_strengthDecimal3The strength with which blocking entities should be knocked back.
reaction_choicesArray of strings[]A list of weighted responses to the melee attack being blocked.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:ravager_blocked', { knockback_strength: 3 });

Survival

minecraft:breathable

Defines what blocks this entity can breathe in and gives them the ability to suffocate.

ParameterTypeDefaultDescription
breathes_airBooleantrueIf set, this entity can breathe in air.
breathes_waterBooleanfalseIf set, this entity can breathe in water.
total_supplyInteger15Time in seconds the entity can hold its breath.
suffocate_timeInteger-20Time in seconds between suffocation damage.
breathe_blocksArray of stringsnot setList of blocks this entity can breathe in, in addition to the default items.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:breathable', { breathes_water: true, total_supply: 30 });

minecraft:burns_in_daylight

Specifies that this entity takes fire damage when exposed to direct sunlight. The entity will catch fire unless wearing armor in the protection slot, standing in water, or in shade.

ParameterTypeDefaultDescription
protection_slotString"slot.armor.head"The equipment slot that provides protection from burning in sunlight.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:burns_in_daylight', {});

minecraft:fire_immune

Sets that this entity doesn't take damage from fire.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:fire_immune', {});

minecraft:drying_out_timer

Adds a timer for drying out that will count down and fire events when the entity is out of water.

ParameterTypeDefaultDescription
total_timeDecimal0Amount of time in seconds to dry out fully.
dried_out_eventObject | Stringnot setEvent to fire when the drying out time runs out.
stopped_drying_out_eventObject | Stringnot setEvent to fire when entity stopped drying out.
water_bottle_refill_timeDecimal0Optional additional time given by using a splash water bottle on the entity.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:drying_out_timer', {
    total_time: 120,
    dried_out_event: { event: 'dried_out' },
    stopped_drying_out_event: { event: 'stop_dryingout' }
});

minecraft:angry

Defines an entity's 'angry' state using a timer.

ParameterTypeDefaultDescription
durationInteger25The amount of time in seconds that the entity will be angry.
broadcast_angerBooleanfalseIf set, other entities of the same type within the broadcastRange will also become angry.
broadcast_rangeInteger20Distance in blocks within which other entities of the same type will become angry.
calm_eventObject | Stringnot setEvent to fire when this entity is calmed down.
angry_soundStringnot setThe sound event to play when the mob is angry.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:angry', { duration: 25, broadcast_anger: true, broadcast_range: 20 });

minecraft:anger_level

Compels the entity to track anger towards a set of nuisances (like the Warden).

ParameterTypeDefaultDescription
max_angerInteger100The maximum anger level that can be reached.
angry_thresholdInteger80Threshold that defines when the mob is considered angry at a nuisance.
angry_boostInteger20Anger boost applied to the angry threshold when mob gets angry.
default_annoyingnessString0The default amount of annoyingness; specifies how much to raise anger level on each provocation.
nuisance_filterMinecraft filternot setFilter that is applied to determine if a mob can be a nuisance.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:anger_level', { max_anger: 150, angry_threshold: 80, angry_boost: 20 });

Body & Vehicle

minecraft:home

Saves a home position for when the entity is spawned. Allows entities like bees to remember and return to a specific location.

ParameterTypeDefaultDescription
restriction_radiusInteger0Optional radius that the entity will be restricted to in relation to its home.
restriction_typeString"none"How the entity is restricted: "none", "random_movement", or "all_movement".
home_block_listArray of stringsnot setOptional list of blocks that can be considered a valid home.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:home', { restriction_type: 'random_movement', restriction_radius: 32 });

minecraft:insomnia

Adds a timer since last rested to see if phantoms should spawn.

ParameterTypeDefaultDescription
days_until_insomniaDecimal3Number of days the mob has to stay up until the insomnia effect begins.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:insomnia', { days_until_insomnia: 3 });

minecraft:body_rotation_always_follows_head

Causes the entity's body rotation to match the one of their head. Does not override the minecraft:body_rotation_blocked component.

Acts as a boolean flag — no parameters. Its presence marks the entity with this state.

const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:body_rotation_always_follows_head', {});

minecraft:horse.jump_strength

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

ParameterTypeDefaultDescription
valueDecimal | Objectnot setValue of jump strength when spawned. Can be a decimal or an object with range_min and range_max.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:horse.jump_strength', { value: { range_min: 0.4, range_max: 1.0 } });

minecraft:variable_max_auto_step

Entities with this component will have a maximum auto step height that differs depending on whether they are on a block that prevents jumping.

ParameterTypeDefaultDescription
base_valueDecimal0.5625The maximum auto step height when on any other block.
controlled_valueDecimal0.5625The maximum auto step height when on any other block and controlled by the player.
jump_prevented_valueDecimal0.5625The maximum auto step height when on a block that prevents jumping.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:variable_max_auto_step', { base_value: 1.0, jump_prevented_value: 0.5625 });

Misc

minecraft:conditional_bandwidth_optimization

Defines the Conditional Spatial Update Bandwidth Optimizations of this entity.

ParameterTypeDefaultDescription
default_valuesObjectnot setDefault bandwidth optimization values with max_dropped_ticks, max_optimized_distance, and use_motion_prediction_hints.
conditional_valuesArraynot setConditional bandwidth optimization values with filter conditions.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:conditional_bandwidth_optimization', {
    default_values: { max_dropped_ticks: 7, max_optimized_distance: 80, use_motion_prediction_hints: true }
});

minecraft:custom_hit_test

List of hitboxes for melee and ranged hits against the entity.

ParameterTypeDefaultDescription
hitboxesArraynot setList of hitboxes. Each entry has width, height, and pivot ([x, y, z]).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:custom_hit_test', {
    hitboxes: [{ width: 2, height: 1.75, pivot: [0, 1, 0] }]
});

minecraft:tick_world

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

ParameterTypeDefaultDescription
radiusInteger2The area around the entity to tick. Value must be between 2 and 6.
never_despawnBooleantrueIf true, this entity will not despawn even if players are far away.
distance_to_playersDecimal128The distance at which the closest player must be before this entity despawns (if never_despawn is false).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:tick_world', { radius: 4, never_despawn: true });

minecraft:ambient_sound_interval

Delay for an entity playing its ambient sound.

ParameterTypeDefaultDescription
valueDecimal8Minimum time in seconds before the entity plays its ambient sound again.
rangeDecimal16Maximum time in seconds to randomly add to the ambient sound delay time.
event_nameString"ambient"Level sound event to be played as the ambient sound.
event_namesArraynot setList of dynamic level sound events with conditions for choosing between them. Each entry has condition (Molang) and event_name.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:ambient_sound_interval', { value: 5, range: 5, event_name: 'ambient' });

AI: Movement Goals

Goals that control basic locomotion, wandering, and pathfinding toward locations.

minecraft:behavior.float

Allows the mob to stay afloat while swimming. Passengers will be kicked out when the mob's head goes underwater.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority. The goal executes sooner as priority approaches 0.
chance_per_tick_to_floatDecimal0.8The chance per tick to cause an upward impulse.
sink_with_passengersBooleanfalseIf true, the mob will keep sinking as long as it has passengers.
time_under_water_to_dismount_passengersDecimal0Time in seconds that a floating vehicle's head can be underwater before causing passengers to dismount.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.float', { priority: 5 });

minecraft:behavior.random_stroll

Allows a mob to randomly stroll around.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
intervalInteger1201/interval chance per tick to choose this goal.
xz_distInteger10Distance in blocks on ground to look for a new spot. Must be at least 1.
y_distInteger7Distance in blocks up or down to look for a new spot. Must be at least 1.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.random_stroll', { priority: 6, speed_multiplier: 0.8 });

minecraft:behavior.random_swim

Allows an entity to randomly move through water.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
intervalInteger1201/interval chance per tick to choose this goal.
xz_distInteger10Distance in blocks to look for a new spot horizontally.
y_distInteger7Distance in blocks to look for a new spot vertically.
avoid_surfaceBooleantrueIf true, the mob will avoid surface water blocks by swimming below them.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.random_swim', { priority: 5, speed_multiplier: 1, xz_dist: 20 });

minecraft:behavior.random_fly

Allows a mob to randomly fly around.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
xz_distInteger10Distance in blocks horizontally to look for a new spot. Must be at least 1.
y_distInteger7Distance in blocks vertically to look for a new spot. Must be at least 1.
y_offsetDecimalnot setOffset applied to the target Y position.
can_land_on_treesBooleantrueIf true, the mob can land on a tree instead of the ground.
avoid_damage_blocksBooleannot setIf true, the mob avoids blocks that deal damage.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.random_fly', { priority: 3, can_land_on_trees: true, xz_dist: 15 });

minecraft:behavior.random_look_around

Allows the mob to randomly look around.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
look_timeRangenot setRange of time in seconds the mob stays looking in a random direction.
min_angle_of_view_horizontalInteger-30Leftmost horizontal angle the mob can look at.
max_angle_of_view_horizontalInteger30Rightmost horizontal angle the mob can look at.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.random_look_around', { priority: 8 });

minecraft:behavior.swim_wander

Allows the entity to wander around while swimming, when not path-finding.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Multiplier applied to entity speed when wandering.
intervalDecimal0.00833Percent chance per tick to start wandering. 1 = 100%.
look_aheadDecimal5Distance to look ahead for obstacle avoidance.
wander_timeDecimal5Amount of time in seconds to wander after wandering behavior starts.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.swim_wander', { priority: 4, speed_multiplier: 1 });

minecraft:behavior.random_breach

Allows the mob to randomly break the surface of the water.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
intervalInteger1201/interval chance per tick to choose this goal.
xz_distInteger10Horizontal search distance in blocks.
y_distInteger7Vertical search distance in blocks.
cooldown_timeDecimal0Cooldown in seconds before the goal can be used again.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.random_breach', { priority: 6, interval: 50, xz_dist: 6, cooldown_time: 2 });

minecraft:behavior.move_to_block

Allows the mob to move towards a specific block type.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
target_blocksArraynot setBlock types to move to.
search_rangeInteger0The distance in blocks to look for the target block.
search_heightInteger1The height in blocks to search for the target block.
goal_radiusDecimal0.5Distance considered "at the goal".
stay_durationDecimal0Number of ticks to stay at the block once reached.
target_selection_methodString"nearest"How to select the target block: "nearest" or "random".
tick_intervalInteger20Average interval in ticks to try to run this behavior.
on_reachEventnot setEvent to run when the block is reached.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.move_to_block', {
    priority: 5, target_blocks: ['minecraft:grass_block'], search_range: 16, speed_multiplier: 1
});

minecraft:behavior.move_to_water

Allows the mob to move back into water when on land.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
search_rangeInteger0Distance in blocks to look for water.
search_heightInteger1Height in blocks to look for water.
search_countInteger10Number of blocks per tick to check. 0 = check all blocks in range.
goal_radiusDecimal0.5Distance considered "at the goal".
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.move_to_water', { priority: 1, search_range: 15, search_height: 5 });

minecraft:behavior.move_to_land

Allows the mob to move back onto land when in water.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
search_rangeInteger0Distance in blocks to look for land.
search_heightInteger1Height in blocks to look for land.
search_countInteger10Number of blocks per tick to check. 0 = check all blocks in range.
goal_radiusDecimal0.5Distance considered "at the goal".
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.move_to_land', { priority: 6, search_count: 80, search_height: 8, search_range: 30 });

minecraft:behavior.go_home

Allows the mob to move back to the position they were spawned.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
intervalInteger1201/interval chance per tick to choose this goal.
goal_radiusDecimal0.5Distance considered close enough to the goal.
calculate_new_path_radiusDecimal2Distance at which a new path segment is calculated toward home.
on_homeEventnot setEvent(s) to run when the mob gets home.
on_failedEventnot setEvent(s) to run when this goal fails.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.go_home', { priority: 4, speed_multiplier: 1, interval: 60 });

minecraft:behavior.move_to_village

Allows the mob to move into a random location within a village.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
search_rangeInteger0Distance in blocks to search for villages. If <= 0, finds the closest village.
goal_radiusDecimal0.5Distance considered "at the goal".
cooldown_timeDecimal0Cooldown in seconds before the goal can be used again.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.move_to_village', { priority: 5, speed_multiplier: 0.6, search_range: 32 });

minecraft:behavior.move_indoors

Allows this entity to move indoors.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal0.8Movement speed modifier while moving indoors.
timeout_cooldownDecimal8Cooldown in seconds before the goal can be reused after pathfinding fails.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.move_indoors', { priority: 3, speed_multiplier: 0.8 });

minecraft:behavior.stroll_towards_village

Allows the mob to move into a random location within a village within the search range.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
search_rangeInteger0Distance in blocks to search for points inside villages.
start_chanceDecimal0.1Chance (0–1) that the mob will start this goal.
goal_radiusDecimal0.5Distance considered "at the goal".
cooldown_timeDecimal0Cooldown in seconds before the goal can be used again.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.stroll_towards_village', { priority: 11, speed_multiplier: 1, search_range: 32, start_chance: 0.005 });

minecraft:behavior.stay_while_sitting

Allows the mob to stay put while it is in a sitting state instead of doing something else. Works with the minecraft:sittable component.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.stay_while_sitting', { priority: 2 });

AI: Combat Goals

Goals that drive attacking, targeting, and combat reactions.

minecraft:behavior.melee_attack

Allows an entity to deal damage through a melee attack. Requires a target and the minecraft:attack component.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when chasing the target.
cooldown_timeDecimal1Cooldown in seconds between attacks.
attack_onceBooleanfalseIf true, this attack behavior can only be used once ever.
can_spread_on_fireBooleanfalseIf the entity is on fire, the target can catch fire after being hit.
melee_fovDecimal90Field of view in degrees for sensing attack targets.
on_attackEventnot setEvent triggered on a successful attack.
on_killEventnot setEvent triggered when the target is killed.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.melee_attack', { priority: 3, speed_multiplier: 1, cooldown_time: 0.5 });

minecraft:behavior.ranged_attack

Allows an entity to attack by using ranged shots. Requires minecraft:shooter to define projectile behaviour.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
attack_intervalDecimal0Consistent reload time in seconds (alternative to min/max).
attack_interval_minDecimal0Minimum reload time in seconds.
attack_interval_maxDecimal0Maximum reload time in seconds.
attack_radiusDecimal0Minimum distance to target before attempting to shoot.
attack_radius_minDecimal0Minimum distance — mob moves closer before firing if target is too close.
burst_shotsInteger1Number of shots fired per charged-up burst attack.
burst_intervalDecimal0Time in seconds between each shot in a burst.
charge_shoot_triggerDecimal0Time (in seconds) before burst shots begin reloading.
ranged_fovDecimal90Field of view in degrees when detecting targets.
speed_multiplierDecimal1Movement speed multiplier when approaching target.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.ranged_attack', { priority: 3, attack_radius: 48, attack_interval_min: 3, attack_interval_max: 5 });

minecraft:behavior.charge_attack

Allows the entity to charge at the target and deal damage on contact.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Speed modifier when charging toward the target.
min_distanceDecimal2Minimum distance to target before a charge can start.
max_distanceDecimal3Maximum distance to target before a charge can start.
success_rateDecimal0.1428Percent chance (0–1) to start a charge attack if not already attacking.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.charge_attack', { priority: 4 });

minecraft:behavior.delayed_attack

Allows the entity to perform a melee attack with a configurable delay between the animation start and damage application.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when chasing target.
attack_durationDecimal0.75Duration of the attack animation in seconds. Also controls cooldown.
hit_delay_pctDecimal0.5Percentage into the attack animation at which damage is applied (1.0 = 100%).
can_spread_on_fireBooleanfalseIf the entity is on fire, the target can catch fire.
on_attackEventnot setEvent triggered on a successful attack.
on_killEventnot setEvent triggered when the target is killed.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.delayed_attack', { priority: 4, attack_duration: 0.75, hit_delay_pct: 0.5 });

minecraft:behavior.stomp_attack

Allows the entity to deal area-of-effect stomp damage to nearby entities.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when chasing target.
cooldown_timeDecimal1Cooldown in seconds between attacks.
no_damage_range_multiplierDecimal2Multiplied with the AoE damage range to determine a no-damage range; attack goes on cooldown if target is inside.
reach_multiplierDecimal2Multiplied with entity base size to determine minimum target distance before dealing damage.
on_attackEventnot setEvent triggered on a successful attack.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.stomp_attack', { priority: 1, speed_multiplier: 1, cooldown_time: 1 });

minecraft:behavior.ram_attack

Allows the entity to perform a charging ram attack, knocking back the target.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
cooldown_rangeRangenot setMin/max cooldown range in seconds between ram attempts.
min_ram_distanceInteger4Minimum distance to start a ram attack.
ram_distanceInteger7Distance at which the mob starts running at ram speed.
run_speedDecimal1Speed when running toward the target.
ram_speedDecimal2Speed when charging toward the target.
knockback_forceDecimal5Force of the knockback.
knockback_heightDecimal0.1Height of the knockback.
pre_ram_soundStringnot setSound event played before the ram.
ram_impact_soundStringnot setSound event played on impact.
on_startEventnot setEvent triggered when the attack starts.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.ram_attack', { priority: 5, run_speed: 0.7, ram_speed: 1.8, knockback_force: 2.5 });

minecraft:behavior.swoop_attack

Allows a flying entity to swoop down and attack a target.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Speed multiplier when moving toward the target during a swoop.
damage_reachDecimal0.2Added to the base entity size to determine maximum allowed distance for dealing damage.
delay_rangeRangenot setMin/max cooldown range in seconds between swoop attempts.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.swoop_attack', { priority: 2 });

minecraft:behavior.leap_at_target

Allows the mob to leap at a target. Must be used alongside a melee attack goal.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
ydDecimal0Y-velocity component of the leap.
must_be_on_groundBooleantrueIf true, the mob must be on the ground before it can leap.
set_persistentBooleanfalseIf true, allows the mob to be set persistent after leaping.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.leap_at_target', { priority: 3, yd: 0.4, must_be_on_ground: true });

minecraft:behavior.knockback_roar

Allows the entity to perform a roar attack that knocks back all nearby entities.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal1Duration of the roar in seconds.
attack_timeDecimal0.5The time in seconds the knockback occurs within the roar.
knockback_damageInteger6The damage dealt to entities hit by the knockback.
knockback_rangeInteger4The range of the knockback in blocks.
knockback_strengthInteger3The strength of the knockback.
knockback_horizontal_strengthInteger4Horizontal knockback strength.
knockback_vertical_strengthInteger4Vertical knockback strength.
cooldown_timeDecimal0.1Time in seconds before goal can be used again.
on_roar_endEventnot setEvent triggered when the roar finishes.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.knockback_roar', { priority: 1, duration: 1, knockback_range: 4, knockback_damage: 6 });

minecraft:behavior.sonic_boom

Allows the entity (Guardian Elder variant) to perform a sonic boom attack that bypasses shields.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal3Goal duration in seconds.
speed_multiplierDecimal1.2Movement speed multiplier while executing.
attack_damageDecimal10Damage dealt to the target.
attack_range_horizontalDecimal16Horizontal range of the attack.
attack_range_verticalDecimal4Vertical range of the attack.
attack_cooldownDecimal2Cooldown in seconds after the attack.
charge_soundStringnot setSound event played during the charge.
on_attack_soundStringnot setSound event played on the attack.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.sonic_boom', { priority: 3, attack_damage: 10, attack_range_horizontal: 16 });

minecraft:behavior.hurt_by_target

Allows the mob to target another entity if this mob has been hurt by that entity.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
alert_same_typeBooleanfalseIf true, nearby mobs of the same type will also target the attacker.
hurt_ownerBooleanfalseIf true, the owner mob will also target the attacker.
entity_typesArraynot setList of entity type filters that this mob will target after being hurt by them.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.hurt_by_target', { priority: 1, alert_same_type: true });

minecraft:behavior.nearest_attackable_target

Allows the mob to actively scan for and set a target to attack.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
entity_typesArraynot setList of entity type filters defining valid attack targets.
within_radiusDecimal0Distance in blocks to search for a target. 0 = unlimited.
attack_intervalInteger0Time between scans for new targets in ticks. 0 = every tick.
must_seeBooleanfalseIf true, the mob must have line of sight to a target before setting it.
must_see_forget_durationDecimal3Time in seconds before forgetting a target that is no longer seen.
reselect_targetsBooleanfalseIf true, the mob will re-evaluate its target each scan.
scan_intervalInteger10Interval in ticks between target scans.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.nearest_attackable_target', {
    priority: 2,
    entity_types: [{ filters: { test: 'is_family', subject: 'other', value: 'player' }, max_dist: 16 }],
    must_see: true
});

minecraft:behavior.defend_village_target

Allows the mob to stay in a village and target intruders as a defender.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
entity_typesArraynot setList of entity type filters defining what counts as a threat to the village.
must_reachBooleanfalseIf true, the mob must reach the attacker before trying to defend.
attack_chanceDecimal0.05Chance (0–1) the mob will attack an attacker seen attacking a villager.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.defend_village_target', { priority: 1, attack_chance: 0.05 });

AI: Interaction Goals

Goals for trading, item handling, following, looking, and social interactions.

minecraft:behavior.beg

Allows this mob to look at and follow the player that holds food they like.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
itemsArraynot setList of item identifiers this mob will beg for.
look_distanceDecimal8Distance in blocks the mob will beg from.
look_timeRangenot setRange of time in seconds the mob will stare at the player holding food.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.beg', { priority: 9, items: ['minecraft:bone'], look_distance: 8 });

minecraft:behavior.tempt

Allows a mob to be tempted by a player holding a specific item. Uses pathfinding for movement.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
itemsArray[]List of item identifiers that tempt this mob.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
stop_distanceDecimal1.5Distance at which the mob will stop following the player.
can_get_scaredBooleanfalseIf true, the mob can stop being tempted if the player moves too fast.
can_tempt_verticallyBooleanfalseIf true, vertical distance is considered when tempting.
can_tempt_while_riddenBooleanfalseIf true, the mob can be tempted even if it has a passenger.
tempt_soundStringnot setSound event played while the mob is being tempted.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.tempt', { priority: 4, items: ['minecraft:wheat'], speed_multiplier: 1.25 });

minecraft:behavior.trade_with_player

Allows the player to trade with this mob. When the goal starts it stops the mob's navigation.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
max_distance_from_playerDecimal8Maximum distance from the player before the goal exits.
filtersFilternot setConditions that must be met for the behavior to start.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.trade_with_player', { priority: 1, max_distance_from_player: 8 });

minecraft:behavior.pickup_items

Allows the mob to pick up items on the ground.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
max_distDecimal0Maximum distance to look for items to pick up.
goal_radiusDecimal0.5Distance considered close enough to pick up the item.
can_pickup_any_itemBooleanfalseIf true, the mob can pick up any item.
can_pickup_to_hand_or_equipmentBooleantrueIf true, the mob can pick up items into hand or armor slots.
pickup_same_items_as_in_handBooleannot setIf true, only pick up items matching what is already held.
excluded_itemsArraynot setList of items this mob will not pick up.
track_targetBooleanfalseIf true, this mob will chase after the item as long as it is valid.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.pickup_items', { priority: 2, max_dist: 32, speed_multiplier: 6 });

minecraft:behavior.share_items

Allows the mob to give items it has to other nearby entities.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
max_distDecimal0Maximum distance to look for entities to share items with.
goal_radiusDecimal0.5Distance considered close enough to the target entity.
entity_typesArraynot setEntity type filters defining who can receive items.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.share_items', { priority: 8, max_dist: 32, speed_multiplier: 0.5 });

minecraft:behavior.drop_item_for

Allows the entity to move toward a target and drop an item near them.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
loot_tableStringnot setLoot table containing possible items to drop.
drop_item_chanceDecimal1Percent chance (0–1) the entity will drop an item.
cooldownDecimal0.2Cooldown in seconds between drops.
goal_radiusDecimal0.5Distance considered close enough to the target.
entity_typesFilternot setConditions another entity must meet to be a valid target.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.drop_item_for', { priority: 10, loot_table: 'loot_tables/custom_drop.json', drop_item_chance: 0.75 });

minecraft:behavior.find_mount

Allows the mob to look around for another mob to ride atop it.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
within_radiusDecimal0Distance in blocks to look for a mount.
mount_distanceDecimal-1Distance to be from the mount to ride it. Defaults to attack distance if < 0.
start_delayInteger0Ticks to wait before moving toward the mount.
target_neededBooleanfalseIf true, the mob will only look for a mount if it has a target.
avoid_waterBooleanfalseIf true, the mob will not go into water when going toward a mount.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.find_mount', { priority: 4, within_radius: 16, mount_distance: 2 });

minecraft:behavior.work

Allows the NPC to use a POI jobsite block.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal0.5Movement speed multiplier when using this goal.
active_timeInteger0Ticks to stay at the work location.
goal_cooldownInteger0Ticks on cooldown before the goal can be used again.
can_work_in_rainBooleanfalseIf true, this entity can work when their jobsite is rained on.
work_in_rain_toleranceInteger-1If can_work_in_rain is false, max ticks remaining where rain does not interrupt.
on_arrivalEventnot setEvent triggered when the mob reaches their jobsite.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.work', { priority: 7, speed_multiplier: 0.5, active_time: 250 });

minecraft:behavior.look_at_player

Compels an entity to look at the nearest player by rotating the head bone within a set limit.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
look_distanceDecimal8Distance in blocks to look for the nearest player.
probabilityDecimal0.02Probability of looking at the target (1.0 = 100%).
look_timeRangenot setTime range to look at the nearest player.
angle_of_view_horizontalInteger360Horizontal viewing angle in degrees.
angle_of_view_verticalInteger360Vertical viewing angle in degrees.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.look_at_player', { priority: 8, look_distance: 8, probability: 0.02 });

minecraft:behavior.look_at_entity

Compels an entity to look at a specific entity type by rotating the head bone within a set limit.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
look_distanceDecimal8Distance in blocks to look for the nearest entity.
probabilityDecimal0.02Probability of looking at the target (1.0 = 100%).
filtersFilternot setFilter to determine which entities to look at.
look_timeRangenot setTime range to look at the nearest entity.
angle_of_view_horizontalInteger360Horizontal viewing angle in degrees.
angle_of_view_verticalInteger360Vertical viewing angle in degrees.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.look_at_entity', {
    priority: 10, look_distance: 8,
    filters: { test: 'is_family', subject: 'other', value: 'mob' }
});

minecraft:behavior.look_at_target

Compels an entity to look at its current target by rotating the head bone within a set limit.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
look_distanceDecimal8Distance in blocks to look at this mob's current target.
probabilityDecimal0.02Probability of looking at the target (1.0 = 100%).
look_timeRangenot setTime range to look at the current target.
angle_of_view_horizontalInteger360Horizontal viewing angle in degrees.
angle_of_view_verticalInteger360Vertical viewing angle in degrees.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.look_at_target', { priority: 5, look_distance: 8 });

minecraft:behavior.receive_love

Allows the villager to stop so another villager can breed with it. Can only be used by a Villager.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.receive_love', { priority: 3 });

minecraft:behavior.play

Allows the mob to play with other mobs by chasing each other and moving around randomly. Can only be used by Villagers.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
chance_to_startDecimal0Percent chance (0–1) the mob starts this goal.
follow_distanceInteger2Distance in blocks to be in range of the friend being followed.
friend_search_areaArray[6, 3, 6]Dimensions of the AABB used to search for a potential friend.
friend_typesFilternot setEntity type(s) to consider as potential play friends.
max_play_duration_secondsDecimal50Max seconds the mob will play before exiting the goal.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.play', { priority: 8, chance_to_start: 0.01, speed_multiplier: 0.6 });

minecraft:behavior.celebrate

Allows this entity to celebrate surviving a raid by making celebration sounds and jumping.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal30Duration of the celebration in seconds.
celebration_soundStringnot setSound event triggered during the celebration.
sound_intervalRangenot setMin/max time between sound events in seconds.
jump_intervalRangenot setMin/max time between jumping in seconds.
on_celebration_end_eventEventnot setEvent triggered when the celebration ends.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.celebrate', { priority: 5, duration: 30, celebration_sound: 'celebrate' });

AI: Survival Goals

Goals for fleeing, hiding, avoiding threats, and consuming resources.

minecraft:behavior.panic

Allows the mob to enter the panic state, making it run around and away from the damage source.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when panicking.
damage_sourcesArray(fire, lava, lightning, etc.)List of damage source types that trigger this mob to panic.
forceBooleanfalseIf true, the mob will not stop panicking until it can't move.
ignore_mob_damageBooleanfalseIf true, the mob will not panic from other mob damage.
prefer_waterBooleanfalseIf true, the mob will prefer water over land while panicking.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.panic', { priority: 1, speed_multiplier: 1.5 });

minecraft:behavior.avoid_mob_type

Allows the entity to run away from other entities that meet the specified criteria.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
entity_typesArraynot setList of entity type filters defining which mobs to avoid, with optional speed multipliers.
max_distDecimal3Maximum distance to look for an entity to avoid.
max_fleeDecimal10Distance from the avoid target at which the entity stops fleeing.
avoid_target_xzInteger16XZ distance when choosing a next position to flee to.
avoid_target_yInteger7Y distance when choosing a next position to flee to.
ignore_visibilityBooleanfalseWhether to ignore line of sight while fleeing.
avoid_mob_soundStringnot setSound event played when the mob is avoiding another mob.
on_escape_eventEventnot setEvent triggered when escaping from the target mob.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.avoid_mob_type', {
    priority: 3,
    entity_types: [{ filters: { test: 'is_family', subject: 'other', value: 'wolf' }, max_dist: 6, sprint_speed_multiplier: 1.2 }]
});

minecraft:behavior.avoid_block

Allows this entity to avoid certain block types.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
target_blocksArraynot setList of block types this mob avoids.
search_rangeInteger0Maximum XZ distance to look for a block to avoid.
search_heightInteger0Maximum Y distance to look for a block to avoid.
walk_speed_modifierDecimal1Speed modifier when walking away from the block.
sprint_speed_modifierDecimal1Speed modifier when sprinting away from the block.
tick_intervalInteger1Tick interval between checks.
target_selection_methodString"nearest"Block search method.
avoid_block_soundStringnot setSound event played when avoiding a block.
on_escapeEventnot setEvent triggered when the entity escapes from the block.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.avoid_block', {
    priority: 1, target_blocks: ['minecraft:warped_fungus'], search_range: 8, search_height: 4
});

minecraft:behavior.flee_sun

Allows the mob to run away from direct sunlight and seek shade. Typically used by undead mobs.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.flee_sun', { priority: 2, speed_multiplier: 1 });

minecraft:behavior.hide

Allows a mob with the hide component to attempt to move to and hide at an owned or nearby POI.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
durationDecimal1Time in seconds the mob reacts.
poi_typeStringnot setDefines what POI type to hide at.
timeout_cooldownDecimal8Cooldown in seconds before the goal can be reused after failure or timeout.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.hide', { priority: 4, poi_type: 'bed', speed_multiplier: 0.8 });

minecraft:behavior.find_cover

Allows the mob to seek shade.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
cooldown_timeDecimal0Cooldown in seconds before the goal can be used again.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.find_cover', { priority: 9, speed_multiplier: 1, cooldown_time: 5 });

minecraft:behavior.eat_block

Allows the entity to consume a block and replace it with another block, triggering an event.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
eat_and_replace_block_pairsArraynot setPairs of eat_block / replace_block entries defining what is eaten and what replaces it.
success_chanceString0.02Molang expression defining success chance per attempt.
time_until_eatDecimal1.8Time in seconds to consume the block after a successful attempt.
on_eatEventnot setEvent triggered when the eating animation completes.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.eat_block', {
    priority: 6,
    eat_and_replace_block_pairs: [{ eat_block: 'grass', replace_block: 'dirt' }]
});

minecraft:behavior.drink_milk

Allows the mob to drink milk based on specified environment conditions.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
cooldown_secondsDecimal5Cooldown in seconds before the goal can be used again.
filtersFilternot setConditions that must be met for the behavior to start.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.drink_milk', { priority: 5, cooldown_seconds: 5 });

minecraft:behavior.drink_potion

Allows the mob to drink potions based on specified environment conditions.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_modifierDecimal0Movement speed modifier while drinking a potion. 0 = no change.
potionsArraynot setList of potion entries. Each entry has id (potion ID), chance, and filters (conditions).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.drink_potion', {
    priority: 1, potions: [{ id: 21, chance: 1.0, filters: { test: 'on_fire', subject: 'self', value: true } }]
});

AI: Breeding & Social Goals

Goals for breeding, following, laying eggs, and warden-specific behaviors.

minecraft:behavior.breed

Allows this mob to breed with other mobs. Requires the minecraft:breedable component.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.breed', { priority: 3, speed_multiplier: 1 });

minecraft:behavior.follow_parent

Allows the mob to follow their parent around. Requires the minecraft:is_baby component.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.follow_parent', { priority: 5, speed_multiplier: 1.1 });

minecraft:behavior.follow_owner

Allows a mob to follow the player that owns it. Requires the entity to be tamed.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when following.
start_distanceDecimal10Minimum distance from owner before the mob starts following.
stop_distanceDecimal2Distance at which the mob stops following.
can_teleportBooleantrueIf true, the mob can teleport to its owner when too far away.
max_distanceDecimal60Maximum distance before teleporting (only when can_teleport is false).
ignore_vibrationBooleantrueIf true, the mob disregards following after detecting a vibration.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.follow_owner', { priority: 6, speed_multiplier: 8, start_distance: 16, stop_distance: 4 });

minecraft:behavior.follow_mob

Allows the mob to follow other mobs.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
search_rangeInteger0Distance in blocks to look for a mob to follow.
stop_distanceDecimal2Distance in blocks this mob stops from the mob it is following.
filtersFilternot setCriteria for filtering which nearby mobs can be followed.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.follow_mob', { priority: 4, search_range: 20, speed_multiplier: 1, stop_distance: 3 });

minecraft:behavior.follow_caravan

Allows the mob to follow mobs that are in a caravan.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
entity_countInteger1Number of entities that can be in the caravan.
entity_typesArraynot setList of entity type filters for mobs that can form this caravan.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.follow_caravan', { priority: 3, entity_count: 10, speed_multiplier: 2.1 });

minecraft:behavior.lay_egg

Allows the mob to lay an egg block on certain types of blocks if the mob is pregnant.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
egg_typeString"minecraft:turtle_egg"Block type for the egg to lay.
target_blocksArray[minecraft:sand]Blocks the mob can lay eggs on top of.
search_rangeInteger0Distance in blocks to look for a target block.
search_heightInteger1Height in blocks to search for a target block.
lay_secondsDecimal10Duration of the egg-laying process in seconds.
lay_egg_soundString"lay_egg"Sound event played when laying the egg.
goal_radiusDecimal0.5Distance considered close enough to the target block.
on_layEventnot setEvent triggered when the mob lays the egg.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.lay_egg', {
    priority: 2, egg_type: 'minecraft:frog_spawn', target_blocks: ['minecraft:water'], speed_multiplier: 1
});

minecraft:behavior.lay_down

Allows mobs to lay down at random intervals.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
intervalInteger1201/interval chance per tick to choose this goal.
random_stop_intervalInteger1201/interval chance per tick to exit the behavior.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.lay_down', { priority: 5, interval: 120, random_stop_interval: 120 });

minecraft:behavior.make_love

Allows the villager to look for a mate to spawn other villagers with. Can only be used by Villagers.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.make_love', { priority: 5 });

minecraft:behavior.sleep

Allows mobs that own a bed in a village to move to and sleep in it. Can only be used by Villagers.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
cooldown_timeDecimal0Cooldown in seconds before the goal can be used again.
sleep_collider_heightDecimal1Height of the mob's collider while sleeping.
sleep_collider_widthDecimal1Width of the mob's collider while sleeping.
sleep_y_offsetDecimal1Y offset of the mob's collider while sleeping.
can_sleep_while_ridingBooleanfalseIf true, the mob can use the sleep goal while riding something.
speed_multiplierDecimal1Movement speed multiplier when moving to the bed.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.sleep', { priority: 3, cooldown_time: 0 });

minecraft:behavior.sniff

Allows this entity to detect the nearest player within the sniffing radius and update its suspect tracking state. Used by the Warden.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal1Sniffing duration in seconds.
sniffing_radiusDecimal5Mob detection radius in blocks.
suspicion_radius_horizontalDecimal3Horizontal radius within which a player increases anger level.
suspicion_radius_verticalDecimal3Vertical radius within which a player increases anger level.
cooldown_rangeRangenot setCooldown range between sniffs in seconds.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.sniff', { priority: 6, duration: 4.16, sniffing_radius: 24 });

minecraft:behavior.dig

Allows this entity to dig into the ground before despawning. Used by the Warden.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal0Goal duration in seconds.
idle_timeDecimal0Minimum idle time in seconds since the last disturbance before digging begins.
digs_in_daylightBooleanfalseIf true, the entity starts digging when it sees daylight.
allow_dig_when_namedBooleanfalseIf true, this behavior can run when the entity is named.
vibration_is_disturbanceBooleanfalseIf true, vibrations count as disturbances that may delay digging.
suspicion_is_disturbanceBooleanfalseIf true, new suspicious locations count as disturbances.
on_startEventnot setEvent triggered when the goal starts.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.dig', { priority: 1, duration: 5.5, idle_time: 60, vibration_is_disturbance: true });

minecraft:behavior.emerge

Allows this entity to emerge from the ground. Used by the Warden.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal5Goal duration in seconds.
cooldown_timeDecimal0.5Cooldown in seconds before the goal can be used again.
on_doneEventnot setEvent triggered when the goal is about to end.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.emerge', { priority: 1, duration: 7 });

minecraft:behavior.roar

Allows this entity to roar at another entity based on data in minecraft:anger_level. Applies anger boost and sets the target. Requires minecraft:anger_level.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal0Amount of time to roar in seconds.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.roar', { priority: 2, duration: 4.2 });

minecraft:behavior.croak

Allows the entity to croak at a random time interval with configurable conditions. Used by the Frog.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationRangenot setRandom range in seconds for how long the croaking lasts.
intervalRangenot setRandom range in seconds between runs of this behavior.
filtersFilternot setConditions for the behavior to start and keep running.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.croak', { priority: 9, interval: [10, 20], duration: 4.5 });

minecraft:behavior.celebrate_survive

Allows this entity to celebrate surviving a raid by shooting fireworks.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
durationDecimal30Duration of the celebration in seconds.
fireworks_intervalRangenot setMin/max time between firework launches in seconds.
on_celebration_end_eventEventnot setEvent triggered when the celebration ends.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.celebrate_survive', { priority: 5, duration: 30 });

AI: Village & Raid Goals

Goals for village defense, raid mechanics, and specialized NPC behaviors.

minecraft:behavior.hold_ground

Compels an entity to stop at their current location, face a targeted mob, and react with an event. Requires a target.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
min_radiusDecimal10Minimum distance the target must be for the mob to run this goal.
broadcastBooleanfalseWhether to broadcast the mob's target to other mobs of the same type.
broadcast_rangeDecimal0Range in blocks for how far to broadcast.
within_radius_eventEventnot setEvent triggered when the target is within the radius.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.hold_ground', { priority: 5, min_radius: 10, broadcast: true, broadcast_range: 8 });

minecraft:behavior.send_event

Allows the mob to send an event to another mob.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
cast_durationDecimalnot setTime in seconds for the entire event sending process.
look_at_targetBooleantrueIf true, the mob will face the entity it sends an event to.
sequenceArraynot setList of events to send in sequence.
event_choicesArraynot setList of conditional event choices with weights and targeting.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.send_event', {
    priority: 3, cast_duration: 3,
    sequence: [{ base_delay: 0, event: 'minecraft:start_fangs', sound_event: 'cast.spell' }]
});

minecraft:behavior.summon_entity

Allows the mob to attack the player by summoning other entities. Requires format version 1.21.50+.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
summon_choicesArraynot setList of summon spell definitions. Each entry has cast_duration, cooldown_time, weight, and sequence (spawn steps).
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.summon_entity', {
    priority: 2,
    summon_choices: [{ cast_duration: 2, cooldown_time: 5, weight: 3,
        sequence: [{ entity_type: 'minecraft:vex', num_entities_spawned: 3 }] }]
});

minecraft:behavior.scared

Allows the mob to become scared when the weather outside is thundering.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
sound_intervalInteger0Interval for playing the scared sound; 1/interval chance per tick.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.scared', { priority: 1, sound_interval: 20 });

minecraft:behavior.controlled_by_player

Allows the entity to be controlled by the player using a held item. Requires minecraft:movement, minecraft:rideable, and minecraft:item_controllable.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
mount_speed_multiplierDecimal1Speed multiplier when controlled by player.
fractional_rotationDecimal0.5Percentage of rotation toward player's facing direction per tick (0–1).
fractional_rotation_limitDecimal5Maximum degrees the entity can rotate per tick toward player's facing direction.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.controlled_by_player', { priority: 0, mount_speed_multiplier: 1.45 });

minecraft:behavior.move_to_poi

Allows the mob to move to a POI (Point of Interest) if able to.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal1Movement speed multiplier when using this goal.
poi_typeStringnot setThe POI type the goal should look for.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.move_to_poi', { priority: 6, poi_type: 'bed', speed_multiplier: 0.8 });

minecraft:behavior.work_composter

Allows the NPC to use the composter POI to convert excess seeds into bone meal.

ParameterTypeDefaultDescription
priorityIntegernot setLower values = higher priority.
speed_multiplierDecimal0.5Movement speed multiplier when using this goal.
active_timeInteger0Ticks to stay at the work location.
can_work_in_rainBooleanfalseIf true, entity can work when the jobsite POI is rained on.
can_empty_composterBooleantrueWhether the mob can empty a full composter.
can_fill_composterBooleantrueWhether the mob can add items to an incomplete composter.
min_item_countInteger10Limits each compostable item; items over this count will be composted.
items_per_use_maxInteger20Maximum items that can be added to the composter per block interaction.
block_interaction_maxInteger1Maximum number of times the mob interacts with the composter.
use_block_minInteger100Minimum ticks between composter interactions.
use_block_maxInteger200Maximum ticks between composter interactions.
on_arrivalEventnot setEvent triggered when the mob reaches the composter.
const entity = new Entity('Custom Mob', 'myaddon:custom_mob');
entity.addComponent('minecraft:behavior.work_composter', { priority: 8, speed_multiplier: 0.5, active_time: 250 });