← Back to Blog
Technical

The Ultimate Guide to Minecraft Bedrock Entity Components

Entity components are the building blocks of every mob in Minecraft Bedrock. Every creeper, zombie, villager, and ender dragon is built from the same set of components — and so are your custom mobs.

This guide covers the most important components, how they work together, and how to use component groups and events to create mobs that change behavior dynamically. Bookmark this one — it's the reference you'll keep coming back to.

What Are Components?

A component is a pre-built behavior or property that you attach to an entity. Instead of programming "this mob walks around randomly" from scratch, you attach the minecraft:behavior.random_stroll component and it just works. Components are like LEGO bricks — you snap them together to build any mob you can imagine.

Components fall into three categories:

  • Properties — Define what the entity IS (health amount, size, whether it's fire immune)
  • Behaviors — Define what the entity DOES (wander, attack, follow, flee)
  • Triggers — Define what HAPPENS in response to events (on hit, on death, on timer)

Essential Property Components

minecraft:health

The most fundamental component. Sets the entity's maximum health points. A value of 20 means 10 hearts (same as a player). Zombies have 20, iron golems have 100, the Wither has 600. You can set any value — a mini-boss with 300 HP, or a fragile fairy with 4 HP.

minecraft:attack

Sets the entity's melee damage. This is the base damage before any effects or enchantments. A zombie deals 3-4 damage depending on difficulty. A vindicator deals 13. Your custom mob can deal any amount. This component also lets you set an "effect" — like applying poison on hit.

minecraft:movement

How fast the entity moves. The value is a speed multiplier. A zombie uses 0.23. A spider uses 0.3. An ocelot uses 0.3 normally but 0.6 when sprinting. Setting this to 0.5 makes a fast mob. Setting it to 0.1 makes a slow tank. Setting it to 1.0 makes something terrifyingly quick.

minecraft:collision_box

The physical size of the entity's hitbox. Defined by width and height. A zombie is roughly 0.6 wide and 1.9 tall. A spider is 1.4 wide and 0.9 tall. Your custom mob's collision box should match its visual model — otherwise players will hit empty air next to the mob, or the mob will clip through doorways it shouldn't fit through.

minecraft:type_family

Tags that classify the entity. Vanilla uses families like "zombie," "monster," "mob," "undead." These tags are used by other components to target groups of entities. For example, an iron golem's targeting component says "attack anything in the monster family." If your custom mob has the "monster" tag, iron golems will attack it automatically.

minecraft:physics

Whether the entity is affected by gravity and can collide with blocks. Almost every entity needs this. Without it, your mob floats in place and other entities walk through it.

minecraft:fire_immune

Makes the entity immune to fire and lava damage. Nether mobs like blazes and magma cubes have this. Essential for any fire-themed custom mob — nothing breaks immersion like your Fire Demon dying to its own lava arena.

minecraft:knockback_resistance

How much the entity resists being knocked back. A value of 0 means full knockback (like a chicken). A value of 1 means completely immovable (like a Ravager). Boss mobs should have high knockback resistance so players can't cheese the fight by chain-knocking the boss off a cliff.

Essential Behavior Components

minecraft:behavior.nearest_attackable_target

This is the targeting system. It tells the entity to look for the nearest valid target within a radius and prioritize attacking it. You specify who to target by entity type or type family. A zombie targets players. A wolf targets sheep (when wild) or whatever attacked its owner (when tamed).

You can set the search radius (how far away the entity looks for targets), whether it requires line of sight, and priority relative to other behaviors. A mob that targets players within 30 blocks is aggressive and scary. One that only targets within 10 blocks feels more passive until you get close.

minecraft:behavior.melee_attack

Makes the entity run toward its target and attack when in range. You set the speed multiplier (how fast it approaches) and the reach (how close it needs to be to swing). Most mobs use a reach of 1-2 blocks. A large boss might have a reach of 3-4 blocks for satisfying "big monster" swings.

minecraft:behavior.random_stroll

Makes the entity wander around aimlessly when it has nothing else to do. Without this, idle mobs just stand still forever, which looks unnatural. The speed multiplier determines how fast it wanders (usually slower than its attack speed). Interval determines how often it picks a new destination.

minecraft:behavior.look_at_player

Makes the entity turn its head to look at nearby players. This tiny behavior makes mobs feel alive and aware. Without it, mobs stare into the void while you stand right next to them. It's cosmetic but important for immersion.

minecraft:behavior.hurt_by_target

Makes the entity target whatever hurt it. This is how passive mobs (like wolves) become aggressive when attacked. Without this component, you could punch a mob forever and it wouldn't fight back — it would only attack targets specified in its nearest_attackable_target.

minecraft:behavior.follow_owner

For pet/companion mobs. Makes the entity follow the player who tamed it. You set the follow distance (how close it stays), the start distance (how far away before it starts following), and the stop distance (how close before it stops). Tamed wolves and cats use this.

minecraft:behavior.flee_from

Makes the entity run away from specified entity types. Cats flee from players (before taming). Creepers flee from cats. Villagers flee from zombies. You can create custom relationships — a small fairy mob that flees from all mobs in the "monster" family, or a cowardly goblin that runs when its health drops low.

minecraft:behavior.summon_entity

Makes the entity summon other entities under certain conditions. The Evoker uses this to summon vexes. You can make a boss that summons minions on a timer or when its health drops. Specify what entity to summon, how many, and how often.

Ranged Combat Components

minecraft:shooter

Makes the entity shoot projectiles. Skeletons use this with arrows. Blazes use it with fireballs. You define the projectile entity, the power (speed and damage), and the firing interval. You can use vanilla projectiles or custom projectile entities.

minecraft:behavior.ranged_attack

The behavior counterpart to the shooter component. This tells the entity to maintain distance from its target and fire projectiles rather than closing to melee range. You set the attack radius, the burst interval (how fast it fires consecutive shots), and the charge time (windup before firing).

Spawn Rules

Spawn rules are technically a separate file from the entity, but they're critical to how entities function in the world.

A spawn rule defines:

  • Population control — How many can exist at once and how they count toward mob caps.
  • Conditions — What biome, light level, surface type, and height range the entity spawns in.
  • Weight — How likely it is to spawn compared to other mobs (higher weight = more common).
  • Herd size — Minimum and maximum group size per spawn event.

A rare boss mob might have weight 1 (almost never spawns) and herd size 1. A common pest mob might have weight 100 and herd size 3-5. Getting spawn rules right is the difference between "I never see this mob" and "this mob is everywhere and it's annoying."

Loot Tables

Loot tables define what drops when the entity dies. They support:

  • Random rolls — Roll between min and max times on the loot pool.
  • Weighted entries — Different items have different probabilities.
  • Conditions — Items only drop under specific circumstances (killed by player, killed with specific weapon, random chance).
  • Functions — Modify the dropped items (set count range, add enchantments, set item data).

Good loot tables have a guaranteed common drop (so the player always gets something), a rare valuable drop (to keep farming interesting), and scaling with looting enchantment (so enchanted weapons feel worth the investment).

Component Groups and Events

This is where Bedrock modding gets really powerful. Component groups let you define sets of components that can be added or removed at runtime. Events trigger these additions and removals.

The classic use case: a boss with phases.

  • Component group "phase1": Movement speed 0.2, damage 8, no special effects.
  • Component group "phase2": Movement speed 0.4, damage 14, fire immune, summons minions.
  • Event "go_phase2": Remove "phase1", add "phase2".
  • Health trigger: When health falls below 50%, fire "go_phase2".

The mob starts in phase 1. When its health drops, the event fires, swapping component groups. The mob instantly becomes faster, hits harder, and starts summoning minions. One entity, two completely different behaviors, switching dynamically based on game state.

Other uses for component groups:

  • Wild vs. tamed: A pet mob starts with "wild" components (flees from players), then switches to "tamed" components (follows player, attacks player's targets) when fed a specific item.
  • Baby vs. adult: A mob starts small with weak stats, then grows up over time into a larger, stronger version.
  • Day vs. night: A mob is passive during the day but hostile at night, switching component groups on a timer synced to the daylight cycle.
  • Enraged: A normally peaceful mob that gains attack components when a nearby ally is killed.

Putting It All Together

A complete custom entity uses components from every category working in harmony. Here's what a well-designed mob looks like at a structural level:

  1. Base properties: Health, size, speed, collision box, type family, physics.
  2. Core behaviors: Random stroll (idle), look at player (awareness), hurt by target (retaliation).
  3. Combat behaviors: Nearest attackable target (who to fight), melee attack or ranged attack (how to fight).
  4. Special behaviors: Summon entities, flee conditions, follow owner, custom events.
  5. Component groups: Different modes (phases, tame states, day/night) with events to switch between them.
  6. Spawn rules: Where and how often the mob appears.
  7. Loot table: What it drops.

Let AI Assemble the Components

You now know more about Bedrock entity components than 95% of players. But you don't have to manually write the JSON that wires all these components together. Describe your mob's behaviors in plain English to BlockSmith, and the AI selects the right components, sets the right values, creates the component groups and events, and packages everything into a working .mcaddon file.