Edit

Share via


Entity Behavior (AI) Components Documentation

Entity Behavior (AI) Components Description
minecraft:behavior.admire_item Enables the mob to admire items that have been configured as admirable.
minecraft:behavior.aquatic_charge_attack Enables an aquatic mob to dash at its target with knockback; includes overshoot and cooldown settings.
minecraft:behavior.avoid_block Allows this entity to avoid certain blocks.
minecraft:behavior.avoid_mob_type Allows the entity to run away from other entities that meet the criteria specified.
minecraft:behavior.barter Enables the mob to barter for items that have been configured as barter currency.
minecraft:behavior.beg Allows this mob to look at and follow the player that holds food they like.
minecraft:behavior.break_door Allows this mob to break doors.
minecraft:behavior.breed Allows this mob to breed with other mobs.
minecraft:behavior.celebrate Allows this entity to celebrate surviving a raid by making celebration sounds and jumping.
minecraft:behavior.celebrate_survive Allows the player to trade with this mob.
minecraft:behavior.charge_attack Allows this entity to damage a target by using a running attack.
minecraft:behavior.charge_held_item Allows an entity to charge and use their held item.
minecraft:behavior.circle_around_anchor Causes an entity to circle around an anchor point placed near a point or target.
minecraft:behavior.controlled_by_player Allows the entity to be controlled by the player using an item in the item_controllable property (required).
minecraft:behavior.croak Allows the entity to croak at a random time interval with configurable conditions.
minecraft:behavior.defend_trusted_target Allows the mob to target another mob that hurts an entity it trusts.
minecraft:behavior.defend_village_target Allows the entity to stay in a village and defend the village from aggressors.
minecraft:behavior.delayed_attack Allows an entity to attack, while also delaying the damage-dealt until a specific time in the attack animation.
minecraft:behavior.dig Allows this entity to dig into the ground before despawning.
minecraft:behavior.door_interact Allows the mob to open and close doors.
minecraft:behavior.dragonchargeplayer Allows this entity to attack a player by charging at them.
minecraft:behavior.dragondeath Allows the dragon to go out with glory.
minecraft:behavior.dragonflaming Allows this entity to use a flame-breath attack.
minecraft:behavior.dragonholdingpattern Allows the Dragon to fly around in a circle around the center podium.
minecraft:behavior.dragonlanding Allows the Dragon to stop flying and transition into perching mode.
minecraft:behavior.dragonscanning Allows the dragon to look around for a player to attack while in perch mode.
minecraft:behavior.dragonstrafeplayer Allows this entity to fly around looking for a player to shoot fireballs at.
minecraft:behavior.dragontakeoff Allows the dragon to leave perch mode and go back to flying around.
minecraft:behavior.drink_milk Allows the mob to drink milk based on specified environment conditions.
minecraft:behavior.drink_potion Allows the mob to drink potions based on specified environment conditions.
minecraft:behavior.drop_item_for Allows the entity to move toward a target, and drop an item near the target.
minecraft:behavior.eat_block Allows the entity to consume a block, replace the eaten block with another block, and trigger an event as a result.
minecraft:behavior.eat_carried_item If the mob is carrying a food item, the mob will eat it and the effects will be applied to the mob.
minecraft:behavior.eat_mob Allows the entity to eat a specified Mob.
minecraft:behavior.emerge Allows this entity to emerge from the ground
minecraft:behavior.enderman_leave_block Allows the enderman to drop a block they are carrying.
minecraft:behavior.enderman_take_block Allows the enderman to take a block and carry it around.
minecraft:behavior.equip_item The entity puts on the desired equipment.
minecraft:behavior.explore_outskirts Allows the entity to first travel to a random point on the outskirts of the village, and then explore random points within a small distance.
minecraft:behavior.fertilize_farm_block Allows the mob to search within an area for a growable crop block.
minecraft:behavior.find_cover Allows the mob to seek shade.
minecraft:behavior.find_mount Allows the mob to look around for another mob to ride atop it.
minecraft:behavior.find_underwater_treasure Allows the mob to move towards the nearest underwater ruin or shipwreck.
minecraft:behavior.fire_at_target Allows an entity to attack by firing a shot with a delay.
minecraft:behavior.flee_sun Allows the mob to run away from direct sunlight and seek shade.
minecraft:behavior.float Allows the mob to stay afloat while swimming.
minecraft:behavior.float_tempt Allows a mob to be tempted by a player holding a specific item.
minecraft:behavior.float_wander Allows the mob to float around like the Ghast.
minecraft:behavior.follow_caravan Allows the mob to follow mobs that are in a caravan.
minecraft:behavior.follow_mob Allows the mob to follow other mobs.
minecraft:behavior.follow_owner Allows a mob to follow the player that owns it.
minecraft:behavior.follow_parent Allows the mob to follow their parent around.
minecraft:behavior.follow_target_captain Allows mob to move towards its current target captain.
minecraft:behavior.go_and_give_items_to_noteblock The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.
minecraft:behavior.go_and_give_items_to_owner The entity will attempt to toss the items from its inventory to its owner.
minecraft:behavior.go_home Allows the mob to move back to the position they were spawned.
minecraft:behavior.guardian_attack Allows this entity to use a laser beam attack.
minecraft:behavior.harvest_farm_block Allows the entity to search within an area for farmland with air above it.
minecraft:behavior.hide Allows a mob with the hide component to attempt to move to - and hide at - an owned or nearby POI.
minecraft:behavior.hold_ground Compels an entity to stop at their current location, turn to face a mob they are targeting, and react with an event.
minecraft:behavior.hurt_by_target Allows the mob to target another mob that hurts them.
minecraft:behavior.inspect_bookshelf Allows the mob to inspect bookshelves.
minecraft:behavior.investigate_suspicious_location Allows this entity to move towards a "suspicious" position based on data gathered in minecraft:suspect_tracking.
minecraft:behavior.jump_around_target Allows an entity to jump around a target.
minecraft:behavior.jump_to_block Allows an entity to jump to another random block.
minecraft:behavior.knockback_roar Allows the mob to perform a damaging knockback that affects all nearby entities.
minecraft:behavior.lay_down Allows mobs to lay down at times
minecraft:behavior.lay_egg Allows the mob to lay an egg block on certain types of blocks if the mob is pregnant.
minecraft:behavior.leap_at_target Allows monsters to jump at and attack their target.
minecraft:behavior.look_at_entity Compels an entity to look at a specific entity by rotating the head bone pose within a set limit.
minecraft:behavior.look_at_player Compels an entity to look at the player by rotating the head bone pose within a set limit.
minecraft:behavior.look_at_target Compels an entity to look at the target by rotating the head bone pose within a set limit.
minecraft:behavior.look_at_trading_player Compels an entity to look at the player that is currently trading with the entity.
minecraft:behavior.make_love Allows the villager to look for a mate to spawn other villagers with.
minecraft:behavior.melee_attack Allows an entity to deal damage through a melee attack.
minecraft:behavior.melee_box_attack Allows an entity to deal damage through a melee attack with reach calculations based on bounding boxes.
minecraft:behavior.mingle Allows an entity to go to the village bell and mingle with other entities
minecraft:behavior.mount_pathing Allows the mob to move around on its own while mounted seeking a target to attack.
minecraft:behavior.move_around_target Allows an entity to move around a target.If the entity is too close(i.e.closer than destination range min and height difference limit) it will try to move away from its target.If the entity is too far away from its target it will try to move closer to a random position within the destination range.A randomized amount of those positions will be behind the target, and the spread can be tweaked with 'destination_pos_spread_degrees'.
minecraft:behavior.move_indoors Allows this entity to move indoors.
minecraft:behavior.move_outdoors Allows this entity to move outdoors.
minecraft:behavior.move_through_village Can only be used by Villagers.
minecraft:behavior.move_towards_dwelling_restriction Allows entities with the "minecraft:dweller" component to move toward their village area that the entity should be restricted to.
minecraft:behavior.move_towards_home_restriction Allows entities with a minecraft:home component to move towards their home position.
minecraft:behavior.move_towards_restriction AI goal that drives entities back toward their designated home area when they've wandered too far.
minecraft:behavior.move_towards_target Allows mob to move towards its current target.
minecraft:behavior.move_to_block Allows mob to move towards a block.
minecraft:behavior.move_to_land Allows the mob to move back onto land when in water.
minecraft:behavior.move_to_liquid Allows the mob to move into a liquid when on land.
minecraft:behavior.move_to_poi Allows the mob to move to a POI if able to
minecraft:behavior.move_to_random_block Allows mob to move towards a random block.
minecraft:behavior.move_to_village Allows the mob to move into a random location within a village.
minecraft:behavior.move_to_water Allows the mob to move back into water when on land.
minecraft:behavior.nap Allows mobs to occassionally stop and take a nap under certain conditions.
minecraft:behavior.nearest_attackable_target Allows an entity to attack the closest target within a given subset of specific target types.
minecraft:behavior.nearest_prioritized_attackable_target Allows the mob to check for and pursue the nearest valid target.
minecraft:behavior.ocelotattack Controls specific attack behavior for Ocelots.
minecraft:behavior.ocelot_sit_on_block Allows to mob to be able to sit in place like the ocelot.
minecraft:behavior.offer_flower Allows the mob to offer a flower to another mob with the minecraft:take_flower behavior.
minecraft:behavior.open_door Allows the mob to open doors.
minecraft:behavior.owner_hurt_by_target Allows the mob to target another mob that hurts their owner.
minecraft:behavior.owner_hurt_target Allows the mob to target a mob that is hurt by their owner.
minecraft:behavior.panic Allows the mob to enter the panic state, which makes it run around and away from the damage source that made it enter this state.
minecraft:behavior.pet_sleep_with_owner Allows the pet mob to move onto a bed with its owner while sleeping.
minecraft:behavior.pickup_items Allows the mob to pick up items on the ground.
minecraft:behavior.place_block AI goal that makes entities place blocks into the world, like Endermen placing their carried block or snow golems leaving snow trails.
minecraft:behavior.play Allows the mob to offer a flower to another mob with the minecraft:take_flower behavior.
minecraft:behavior.player_ride_tamed Allows the mob to be ridden by the player after being tamed.
minecraft:behavior.play_dead Allows this entity to pretend to be dead to avoid being targeted by attackers.
minecraft:behavior.raid_garden Allows the mob to eat/raid crops out of farms until they are full.
minecraft:behavior.ram_attack Allows this entity to damage a target by using a running attack.
minecraft:behavior.random_breach Allows the mob to randomly break surface of the water.
minecraft:behavior.random_fly Allows a mob to randomly fly around.
minecraft:behavior.random_hover Allows the mob to hover around randomly, close to the surface
minecraft:behavior.random_look_around Allows the mob to randomly look around.
minecraft:behavior.random_look_around_and_sit Allows the mob to randomly sit and look around for a duration.
minecraft:behavior.random_search_and_dig Allows this entity to locate a random target block that it can path find to.
minecraft:behavior.random_sitting Allows the mob to randomly sit for a duration.
minecraft:behavior.random_stroll Allows a mob to randomly stroll around.
minecraft:behavior.random_swim Allows an entity to randomly move through water
minecraft:behavior.ranged_attack Allows an entity to attack by using ranged shots.
minecraft:behavior.receive_love Allows the villager to stop so another villager can breed with it.
minecraft:behavior.restrict_open_door Allows the mob to stay indoors during night time.
minecraft:behavior.restrict_sun Allows the mob to automatically start avoiding the sun when its a clear day out.
minecraft:behavior.rise_to_liquid_level Allows the mob to stay at a certain level when in liquid.
minecraft:behavior.roar Allows this entity to roar at another entity based on data in minecraft:anger_level.
minecraft:behavior.roll This allows the mob to roll forward.
minecraft:behavior.run_around_like_crazy Allows the mob to run around aimlessly.
minecraft:behavior.scared Allows the a mob to become scared when the weather outside is thundering
minecraft:behavior.send_event Allows the mob to send an event to another mob.
minecraft:behavior.share_items Allows the mob to give items it has to others.
minecraft:behavior.silverfish_merge_with_stone Allows the mob to go into stone blocks like Silverfish do.
minecraft:behavior.silverfish_wake_up_friends Allows the mob to alert mobs in nearby blocks to come out.
minecraft:behavior.skeleton_horse_trap Allows Equine mobs to be Horse Traps and be triggered like them, spawning a lightning bolt and a bunch of horses when a player is nearby.
minecraft:behavior.sleep Allows mobs that own a bed to in a village to move to and sleep in it.
minecraft:behavior.slime_attack Causes the entity to grow tired every once in a while, while attacking.
minecraft:behavior.slime_float Allow slimes to float in water / lava.
minecraft:behavior.slime_keep_on_jumping Allows the entity to continuously jump around like a slime.
minecraft:behavior.slime_random_direction Allows the entity to move in random directions like a slime.
minecraft:behavior.snacking Allows the mob to take a load off and snack on food that it found nearby.
minecraft:behavior.sneeze Allows the mob to stop and sneeze possibly startling nearby mobs and dropping an item.
minecraft:behavior.sniff Allows this entity to detect the nearest player within "sniffing_radius" and update its "minecraft:suspect_tracking" component state
minecraft:behavior.sonic_boom Allows this entity to perform a 'sonic boom' ranged attack
minecraft:behavior.squid_dive Allows the squid to dive down in water.
minecraft:behavior.squid_flee Allows the squid to swim away.
minecraft:behavior.squid_idle Allows the squid to swim in place idly.
minecraft:behavior.squid_move_away_from_ground Allows the squid to move away from ground blocks and back to water.
minecraft:behavior.squid_out_of_water Allows the squid to stick to the ground when outside water.
minecraft:behavior.stalk_and_pounce_on_target Allows a mob to stalk a target, then once within range pounce onto a target, on success the target will be attacked dealing damage defined by the attack component.
minecraft:behavior.stay_near_noteblock The entity will attempt to toss the items from its inventory to a nearby recently played noteblock.
minecraft:behavior.stay_while_sitting Allows the mob to stay put while it is in a sitting state instead of doing something else.
minecraft:behavior.stomp_attack Allows an entity to attack using stomp AoE damage behavior.
minecraft:behavior.stomp_turtle_egg Allows this mob to stomp turtle eggs
minecraft:behavior.stroll_towards_village Allows the mob to move into a random location within a village within the search range.
minecraft:behavior.summon_entity Allows the mob to attack the player by summoning other entities.
minecraft:behavior.swell Allows the creeper to swell up when a player is nearby.
minecraft:behavior.swim_idle Allows the entity go idle, if swimming.
minecraft:behavior.swim_up_for_breath Allows the mob to try to move to air once it is close to running out of its total breathable supply.
minecraft:behavior.swim_wander Allows the entity to wander around while swimming, when not path-finding.
minecraft:behavior.swim_with_entity Allows the entity follow another entity.
minecraft:behavior.swoop_attack Allows an entity to attack using swoop attack behavior; Ideal for use with flying mobs.
minecraft:behavior.take_block AI goal that makes entities pick up blocks from the world, like Endermen grabbing blocks to carry.
minecraft:behavior.take_flower Allows the mob to accept flowers from another mob with the minecraft:offer_flower behavior.
minecraft:behavior.teleport_to_owner Allows an entity to teleport to its owner.
minecraft:behavior.tempt Allows a mob to be tempted by a player holding a specific item.
minecraft:behavior.timer_flag_1 Fires an event when this behavior starts, then waits for a duration before stopping.
minecraft:behavior.timer_flag_2 Fires an event when this behavior starts, then waits for a duration before stopping.
minecraft:behavior.timer_flag_3 Fires an event when this behavior starts, then waits for a duration before stopping.
minecraft:behavior.trade_interest Allows the mob to look at a player that is holding a tradable item.
minecraft:behavior.trade_with_player Allows the player to trade with this mob.
minecraft:behavior.transport_items A behavior that enables a mob to transport items from and to containers.
minecraft:behavior.use_kinetic_weapon Enables a mob to use kinetic weaponry by intermittently charging at its target and repositioning afterward.
minecraft:behavior.vex_copy_owner_target Allows the mob to target the same entity its owner is targeting.
minecraft:behavior.vex_random_move Allows the mob to move around randomly like the Vex.
minecraft:behavior.wither_random_attack_pos_goal Allows the wither to launch random attacks.
minecraft:behavior.wither_target_highest_damage Allows the wither to focus its attacks on whichever mob has dealt the most damage to it.
minecraft:behavior.work Allows the NPC to use the POI
minecraft:behavior.work_composter Allows the NPC to use the composter POI to convert excess seeds into bone meal.

Internal/Deprecated Components

These components are either deprecated or internal to Minecraft and not usable in custom content.

Entity Behavior (AI) Components Description
behavior.move_to_lava Allows the mob to move back into lava when on land.