Creator Academy

Give a Bedrock mob behaviour without code

In Bedrock, a mob's behaviour comes from components and AI goals in its behavior pack entity file, each with a priority. In Mobloom you choose rules in plain words, such as when it sees a player, chase it, or when it is hurt, run away. Test them in the practice pond, then export.

Updated

How Bedrock behaviour works

A Bedrock mob has no script that says "do this, then that". Its behavior pack entity file holds a list of components. Some describe the mob, such as its health, its size and how fast it moves. Others are AI goals, and their names start with minecraft:behavior.: wander around, look at a player, chase a target, run away.

Every AI goal has a priority. When two goals could run at the same moment, the one with the lower number wins. Getting those numbers wrong is why a hand-written mob sometimes stands still, or wanders off when it should be attacking.

Components can also sit in component groups that are switched on and off by events. That is how one mob can act in two ways. A tameable mob, for example, has a wild group and a tamed group, and the taming event swaps one for the other.

From a plain-word rule to Bedrock components

In Mobloom's Code tab a rule reads "when something happens, do this". You pick the trigger, pick the action and set its numbers. This is what the export contains for the common ones.

What you choose in MobloomWhat Mobloom writes in the behavior pack
When I see a player within 8 blocks, chase itminecraft:behavior.nearest_attackable_target to pick the target and minecraft:behavior.melee_attack to go after it
Attack, with a strength you setThe same two goals, plus minecraft:attack with your damage
When I get hurt, run awayminecraft:behavior.panic
When I see a monster, run awayminecraft:behavior.avoid_mob_type
When I get hurt, get angryA damage sensor that fires an event. The event switches on an angry component group with minecraft:behavior.hurt_by_target
Lives on land and roams aroundminecraft:behavior.random_stroll
Lives in water and roams aroundminecraft:behavior.random_swim
Looks at youminecraft:behavior.look_at_player
Loves this foodminecraft:behavior.tempt with the food you picked
Can be tamedA wild component group with minecraft:tameable, a tamed group with minecraft:is_tamed, and the event that swaps them
Appears in the wildA spawn rules file with the places and the rarity you chose

Other triggers include when it appears, when it is night or day, when it is raining, when someone gives it an item, when it dies, and every so often. Other actions include play a motion, drop an item, heal, and go back to where it appeared.

Test before you export

The practice pond in the Test tab acts out your rules inside Mobloom, so you can see a chase or an escape before you make a file. It is quicker than importing a pack, opening a world and finding out there. Taming and wild spawning only happen in Minecraft itself, so finish with a real test in your world.

Where the rules end

Mobloom's rules are a fixed set. That keeps every export valid, and it also means there are things you cannot do in the maker:

If you need more, unzip the export and edit the entity file by hand. Those edits stay in the file and are not brought back into Mobloom.

Doing it by hand instead

Writing the entity file yourself gives you every component Bedrock has. You choose each goal, set each priority and build your own groups and events. It is free, and it takes longer to learn. Mobloom vs writing Bedrock entity JSON by hand compares the routes, and What files does a custom Bedrock mob need? shows where the behavior file sits. If you only want to skip the JSON, start with Make a Bedrock mob without writing JSON.

Questions

What does priority mean?

It decides which AI goal runs when two could run at once. Lower numbers win, so a goal with priority 1 beats a goal with priority 6.

Can my mob be tamed?

Yes. Switch on "Can be tamed" in the Code tab and pick the food that tames it. You can also choose whether it follows its owner, protects its owner and can be told to sit.

Can my mob spawn naturally?

Yes. Switch on "Appears in the wild", then choose the places and how often. Minecraft still decides when and where a wild one shows up, and the spawn egg always works.

Make your mob. Skip the JSON.

Start free in your browser. No card needed to create.

Start creating free