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.
- Open the Workshop and add a Mob to your add-on.
- Build the body in the 3D model editor, then paint its skin with the model painter.
- Set its health, speed and behaviors, and add a Spawn egg.
- Tap Export. You get a
.mcaddonwith 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.
| File | Pack | What it does |
|---|---|---|
entities/critter.json | BP | Health, movement and behaviors |
spawn_rules/critter.json | BP | Where it spawns naturally |
entity/critter.entity.json | RP | Which model, skin and animations to use |
models/entity/critter.geo.json | RP | The 3D model |
textures/entity/critter.png | RP | The skin |
texts/en_US.lang | RP | Names for the mob and its egg |
Step 1: the behavior file
{
"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:
identifieris the mob's ID, used by/summon myname:critter.is_spawnablelets it have a spawn egg and spawn naturally.is_summonablelets you use /summon on it.
The basic components:
minecraft:type_familygives the mob tags that other mobs and commands can check, like@e[family=critter].minecraft:health:valueis the starting health,maxthe most it can have. Each heart is 2 points.minecraft:physicsgives it gravity and collisions. Without it, the mob floats in place.minecraft:collision_boxis the invisible box that bumps into things, in blocks.
The movement trio (all three are needed to walk):
minecraft:movementsets the speed. 0.25 is about the speed of a cow.minecraft:movement.basicis the movement type: plain walking on the ground.minecraft:navigation.walklets it plan paths on land. Here it avoids water and things like fire.
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).
behavior.float: swim up in water so it does not drown.behavior.panic: run away faster after taking damage.behavior.random_stroll: wander around.behavior.look_at_player: turn its head toward nearby players.behavior.random_look_around: glance around when idle.
Step 2: the model
The model is made of bones, and each bone holds cubes. Units are pixels: 16 make one block.
{
"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:
{
"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_alphatestlets fully transparent pixels in the skin be see-through.render_controllers:controller.render.defaultis a vanilla controller that draws thedefaultgeometry with thedefaulttexture and material. Perfect for a one-skin mob.scripts.animate: the walk animation plays as fast as the mob moves, using the Molang queryquery.modified_move_speed(see Molang queries).spawn_egg: the two colors of the egg. You can use"texture"with a short name fromitem_texture.jsoninstead.
Step 5: names
entity.myname:critter.name=Critter
item.spawn_egg.entity.myname:critter.name=Critter Spawn EggStep 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:
{
"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
- Install both packs (Export and install) and enable them on a world.
- Find the Critter Spawn Egg in the creative inventory, or run
/summon myname:critter. - 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.basicandnavigation.walk, plus at least one walking behavior. - The mob falls through the floor or floats. Check
minecraft:physicsis there.
See Troubleshooting for more.
What next
- Study real mobs in Vanilla entities to see how cows and pigs are built.
- Add more behaviors from the entity components reference, like
behavior.panic. - Give your world a home for your mob with Your first custom block.