1. Wiki
  2. /Entities
  3. /Your first custom mob

Your first custom mob

Make a simple passive mob for Minecraft Bedrock that walks around, looks at players and has its own spawn egg.

In this guide you will make a Critter: a small, friendly four-legged mob that wanders around, looks at you and runs when it gets hurt. It has a 3D model, a skin, a spawn egg and can spawn on grass by itself.

Mobs are the biggest kind of add-on object, because they live in both packs: the behavior pack says what the mob does, and the resource pack says what it looks like.

The quick way: GodCraft

Making a model by hand means typing cube coordinates. In GodCraft you shape it with your fingers instead.

  1. Open the Workshop and add a Mob to your add-on.
  2. Build the body in the 3D model editor, then paint its skin with the model painter.
  3. Set its health, speed and behaviors, and add a Spawn egg.
  4. Tap Export. You get a .mcaddon with every file below already written, including manifests, UUIDs and names.

By hand

Start with a behavior pack (BP) and resource pack (RP) from Project setup. We use the namespace myname, so our mob is myname:critter.

FilePackWhat it does
entities/critter.jsonBPHealth, movement and behaviors
spawn_rules/critter.jsonBPWhere it spawns naturally
entity/critter.entity.jsonRPWhich model, skin and animations to use
models/entity/critter.geo.jsonRPThe 3D model
textures/entity/critter.pngRPThe skin
texts/en_US.langRPNames for the mob and its egg

Step 1: the behavior file

BP/entities/critter.json
{
  "format_version": "1.26.50",
  "minecraft:entity": {
    "description": {
      "identifier": "myname:critter",
      "is_spawnable": true,
      "is_summonable": true
    },
    "components": {
      "minecraft:type_family": {
        "family": ["critter", "mob"]
      },
      "minecraft:health": {
        "value": 8,
        "max": 8
      },
      "minecraft:physics": {},
      "minecraft:collision_box": {
        "width": 0.6,
        "height": 0.7
      },
      "minecraft:movement": {
        "value": 0.25
      },
      "minecraft:movement.basic": {},
      "minecraft:navigation.walk": {
        "avoid_water": true,
        "avoid_damage_blocks": true
      },
      "minecraft:jump.static": {},
      "minecraft:pushable_by_entity": {},
      "minecraft:pushable_by_block": {},
      "minecraft:breathable": {
        "total_supply": 15,
        "suffocate_time": 0
      },
      "minecraft:behavior.float": {
        "priority": 0
      },
      "minecraft:behavior.panic": {
        "priority": 1,
        "speed_multiplier": 1.4
      },
      "minecraft:behavior.random_stroll": {
        "priority": 4,
        "speed_multiplier": 0.8
      },
      "minecraft:behavior.look_at_player": {
        "priority": 5,
        "look_distance": 6.0,
        "probability": 0.02
      },
      "minecraft:behavior.random_look_around": {
        "priority": 6
      }
    }
  }
}

The description:

  • identifier is the mob's ID, used by /summon myname:critter.
  • is_spawnable lets it have a spawn egg and spawn naturally.
  • is_summonable lets you use /summon on it.

The basic components:

The movement trio (all three are needed to walk):

minecraft:jump.static lets it hop up one block. The pushable_by_entity and pushable_by_block components let players and pistons push it, and minecraft:breathable controls air underwater.

Behaviors and priority

Components that start with behavior. are the mob's "brain". Each has a priority: lower numbers win. When the Critter gets hurt, panic (priority 1) takes over from random_stroll (priority 4).

Step 2: the model

The model is made of bones, and each bone holds cubes. Units are pixels: 16 make one block.

RP/models/entity/critter.geo.json
{
  "format_version": "1.12.0",
  "minecraft:geometry": [
    {
      "description": {
        "identifier": "geometry.myname.critter",
        "texture_width": 64,
        "texture_height": 32,
        "visible_bounds_width": 2,
        "visible_bounds_height": 1.5,
        "visible_bounds_offset": [0, 0.5, 0]
      },
      "bones": [
        {
          "name": "body",
          "pivot": [0, 4, 0],
          "cubes": [{ "origin": [-3, 4, -4], "size": [6, 5, 8], "uv": [0, 0] }]
        },
        {
          "name": "head",
          "parent": "body",
          "pivot": [0, 8, -4],
          "cubes": [{ "origin": [-2.5, 6, -8.5], "size": [5, 5, 5], "uv": [0, 13] }]
        },
        { "name": "leg0", "parent": "body", "pivot": [-2, 4, 3], "cubes": [{ "origin": [-3, 0, 2], "size": [2, 4, 2], "uv": [28, 0] }] },
        { "name": "leg1", "parent": "body", "pivot": [2, 4, 3], "cubes": [{ "origin": [1, 0, 2], "size": [2, 4, 2], "uv": [28, 0] }] },
        { "name": "leg2", "parent": "body", "pivot": [-2, 4, -3], "cubes": [{ "origin": [-3, 0, -4], "size": [2, 4, 2], "uv": [28, 0] }] },
        { "name": "leg3", "parent": "body", "pivot": [2, 4, -3], "cubes": [{ "origin": [1, 0, -4], "size": [2, 4, 2], "uv": [28, 0] }] }
      ]
    }
  ]
}

The bones are named head and leg0 to leg3 on purpose: the vanilla walk and look animations move bones with exactly those names, so we can reuse them for free.

Step 3: the skin

Paint a 64x32 PNG and save it as RP/textures/entity/critter.png. The uv of each cube tells the game which part of the image wraps around it. Hand-painting UV layouts is fiddly, which is why a model painter helps so much. See Pixel textures for tips.

Step 4: the client entity

This file connects the ID to the model, skin, animations and spawn egg:

RP/entity/critter.entity.json
{
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "myname:critter",
      "materials": { "default": "entity_alphatest" },
      "textures": { "default": "textures/entity/critter" },
      "geometry": { "default": "geometry.myname.critter" },
      "animations": {
        "walk": "animation.quadruped.walk",
        "look_at_target": "animation.common.look_at_target"
      },
      "scripts": {
        "animate": [
          { "walk": "query.modified_move_speed" },
          "look_at_target"
        ]
      },
      "render_controllers": ["controller.render.default"],
      "spawn_egg": {
        "base_color": "#c98a4b",
        "overlay_color": "#5a3a1e"
      }
    }
  }
}
  • materials: entity_alphatest lets fully transparent pixels in the skin be see-through.
  • render_controllers: controller.render.default is a vanilla controller that draws the default geometry with the default texture and material. Perfect for a one-skin mob.
  • scripts.animate: the walk animation plays as fast as the mob moves, using the Molang query query.modified_move_speed (see Molang queries).
  • spawn_egg: the two colors of the egg. You can use "texture" with a short name from item_texture.json instead.

Step 5: names

RP/texts/en_US.lang
entity.myname:critter.name=Critter
item.spawn_egg.entity.myname:critter.name=Critter Spawn Egg

Step 6: natural spawning (optional)

Without this file the mob only appears from its egg or /summon. With it, Critters spawn on grass in daylight, in small groups:

BP/spawn_rules/critter.json
{
  "format_version": "1.8.0",
  "minecraft:spawn_rules": {
    "description": {
      "identifier": "myname:critter",
      "population_control": "animal"
    },
    "conditions": [
      {
        "minecraft:spawns_on_surface": {},
        "minecraft:spawns_on_block_filter": "minecraft:grass_block",
        "minecraft:brightness_filter": { "min": 7, "max": 15, "adjust_for_weather": false },
        "minecraft:weight": { "default": 8 },
        "minecraft:herd": { "min_size": 1, "max_size": 3 },
        "minecraft:biome_filter": { "test": "has_biome_tag", "operator": "==", "value": "animal" }
      }
    ]
  }
}

weight is how often it is picked compared with other mobs. population_control: animal makes it share the world's animal cap, so it cannot flood your world.

Test your mob

  1. Install both packs (Export and install) and enable them on a world.
  2. Find the Critter Spawn Egg in the creative inventory, or run /summon myname:critter.
  3. Watch it wander and look at you. Hit it once: it should run away.

Invisible mob or a shadow only

The game found the behavior file but not the model or skin. Check that the identifier is the same in both packs, that the geometry name matches geometry.myname.critter exactly, and that the texture path has no .png.

  • The mob does not move. All three movement parts are needed: movement, movement.basic and navigation.walk, plus at least one walking behavior.
  • The mob falls through the floor or floats. Check minecraft:physics is there.

See Troubleshooting for more.

What next

We use cookies to improve your experience and analyse site traffic. Learn more