The behavior file decides what a mob does. The client entity file decides what it looks like: which model, which skin, which animations and what its spawn egg looks like. It lives in the resource pack.
Think of it as a list of short nicknames. You give each model, texture and animation a short name here, and the other resource pack files use those names.
The files
RP/
entity/
ruby_golem.entity.json
models/
entity/
ruby_golem.geo.json
textures/
entity/
ruby_golem.png
ruby_golem_angry.png
animations/
ruby_golem.animation.json
animation_controllers/
ruby_golem.animation_controllers.json
render_controllers/
ruby_golem.render_controllers.jsonOnly the entity file, a model and a texture are required. The others are optional: you can borrow vanilla animations and render controllers instead of writing your own.
The file name can be anything. What links it to the behavior pack is the identifier.
A full example
Here is the client file for the Ruby Golem from The entity file. It shows an angry texture when the golem's wiki:mood property is angry.
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "wiki:ruby_golem",
"materials": {
"default": "entity_alphatest"
},
"textures": {
"default": "textures/entity/ruby_golem",
"angry": "textures/entity/ruby_golem_angry"
},
"geometry": {
"default": "geometry.wiki.ruby_golem"
},
"animations": {
"walk": "animation.wiki.ruby_golem.walk",
"attack": "animation.wiki.ruby_golem.attack",
"look_at_target": "animation.common.look_at_target",
"attack_controller": "controller.animation.wiki.ruby_golem.attack"
},
"scripts": {
"scale": "1.2",
"animate": [
{ "walk": "q.modified_move_speed" },
"look_at_target",
"attack_controller"
]
},
"render_controllers": ["controller.render.wiki.ruby_golem"],
"spawn_egg": {
"base_color": "#9b111e",
"overlay_color": "#f4c2c2"
}
}
}
}Most vanilla client files use "format_version": "1.10.0", and that is a good choice for yours too. The rest of the page walks through each field.
identifier
The mob's ID, exactly as in the behavior pack: wiki:ruby_golem. If the two do not match, the mob is invisible.
materials
A material tells the game how to draw the pixels: solid, see-through, glowing and so on. You pick from materials that already exist in the game and give each one a short name.
"materials": {
"default": "entity_alphatest",
"glow": "entity_emissive_alpha"
}| Material | Use it for |
|---|---|
entity | Fully solid skins, no transparent pixels |
entity_alphatest | Skins with fully transparent holes. The safest default. |
entity_alphablend | Half-transparent pixels, like glass or slime |
entity_emissive_alpha | Parts that glow in the dark, set by the texture's alpha |
Many vanilla mobs have materials named after themselves (pig, iron_golem). Those are tuned for one mob, so for your own mob stick with the general entity... ones.
textures
Short names for each skin. Paths start at the resource pack root and leave out .png.
"textures": {
"default": "textures/entity/ruby_golem",
"angry": "textures/entity/ruby_golem_angry"
}You can list as many as you like. The render controller decides which one is shown. Tips for painting skins are in Pixel textures.
geometry
Short names for each model. The value is the identifier written inside the .geo.json file, not the file name.
"geometry": {
"default": "geometry.wiki.ruby_golem"
}A mob can have several models. Vanilla chickens, for example, have a normal, a cold and a baby model.
animations
Short names for animations and animation controllers. You can mix your own with vanilla ones.
"animations": {
"walk": "animation.wiki.ruby_golem.walk",
"look_at_target": "animation.common.look_at_target",
"attack_controller": "controller.animation.wiki.ruby_golem.attack"
}Naming them is not enough: they only play when they are listed in scripts.animate (below) or started by an animation controller.
Handy vanilla animations to borrow, if your bones have the matching names:
| Animation | Moves | Bones it expects |
|---|---|---|
animation.common.look_at_target | The head toward what the mob looks at | head |
animation.quadruped.walk | Four legs while walking | leg0 to leg3 |
animation.humanoid.move | Arms and legs while walking | leftarm, rightarm, leftleg, rightleg |
animation_controllers
Older client files list controllers in their own array instead of in animations:
"animation_controllers": [
{ "attack": "controller.animation.wiki.ruby_golem.attack" }
]Each entry is an object with one short name. Controllers listed here run by themselves, without scripts.animate. With format_version 1.10.0 and newer, putting controllers in animations and starting them from scripts.animate is the usual way, as in the full example.
render_controllers
A render controller picks which geometry, texture and material to draw. The list can hold several, and they all draw.
"render_controllers": ["controller.render.wiki.ruby_golem"]For a mob with one model, one skin and one material, you do not need your own. Vanilla controller.render.default draws the ones named default. To swap textures, write a small controller of your own:
{
"format_version": "1.8.0",
"render_controllers": {
"controller.render.wiki.ruby_golem": {
"geometry": "Geometry.default",
"materials": [{ "*": "Material.default" }],
"textures": [
"q.property('wiki:mood') == 'angry' ? Texture.angry : Texture.default"
]
}
}
}Geometry.default, Material.default and Texture.angry refer to the short names from the client file. The * in materials means "every bone". The texture line is a Molang question: angry golems get the angry skin.
This only works because the property has "client_sync": true in the behavior pack. Without it, the resource pack cannot see the value.
You can also switch a whole render controller on and off with a Molang condition. Vanilla creepers do this for their charged glow:
"render_controllers": [
"controller.render.wiki.ruby_golem",
{ "controller.render.wiki.ruby_golem_glow": "q.property('wiki:mood') == 'angry'" }
]scripts
scripts holds small bits of Molang that run on the player's device.
| Script | When it runs | What it is for |
|---|---|---|
initialize | Once, when the mob first appears | Setting starting values for variables |
pre_animation | Every frame, before animations | Working out values the animations need |
animate | Every frame | Which animations and controllers to play |
scale | Every frame | Making the whole model bigger or smaller |
variables | Not a script: a list | Marking variables as public so attachables can read them |
animate
Each entry is a short name from animations. Wrap it in an object to play it with a strength from 0 to 1:
"animate": [
{ "walk": "q.modified_move_speed" },
"look_at_target",
"attack_controller"
]walk plays harder the faster the golem moves, and stops when it stands still. look_at_target always plays.
scale
"scale": "q.is_baby ? 0.5 : 1.2"This only changes how the mob looks. Its collision box, set in the behavior pack, stays the same size. Vanilla bats use "0.35" to shrink their model.
pre_animation
"pre_animation": [
"v.is_angry = q.property('wiki:mood') == 'angry';"
]Work out a value once here and use v.is_angry in many animations, instead of repeating the same long expression everywhere.
spawn_egg
Without spawn_egg, the mob has no egg in the creative inventory. There are two ways to make one.
Two colors. The game draws a standard egg with a background color and spots:
"spawn_egg": {
"base_color": "#9b111e",
"overlay_color": "#f4c2c2"
}Your own picture. Use a short name from item_texture.json, just like an item icon (see Item textures):
"spawn_egg": {
"texture": "wiki_ruby_golem_egg"
}If that short name has a list of several textures, add "texture_index" to pick one. It starts at 0. The egg also needs "is_spawnable": true in the behavior pack, and a name in the lang file:
entity.wiki:ruby_golem.name=Ruby Golem
item.spawn_egg.entity.wiki:ruby_golem.name=Ruby Golem Spawn EggOther fields
| Field | What it does |
|---|---|
enable_attachables | true shows armor and held items on the mob, using attachables |
hide_armor | true hides any armor the mob wears |
held_item_ignores_lighting | true draws held items fully lit, even in the dark |
locators | Named points on the model, like where a lead attaches |
particle_effects | Short names for particles, for use in animations |
sound_effects | Short names for sounds, for use in animations |
min_engine_version | Only load this file when the pack targets this game version or newer |
When something goes wrong
| What you see | Most likely cause |
|---|---|
| The mob is invisible, only a shadow | The identifier does not match the behavior pack, or the geometry name is wrong |
| Purple and black checkers | The texture path is wrong, or it ends in .png |
| Holes look black instead of see-through | Use entity_alphatest instead of entity |
| An animation never plays | It is in animations but not in scripts.animate or a controller |
| No spawn egg | spawn_egg is missing, or is_spawnable is false in the behavior pack |
| The texture never changes | The property is missing "client_sync": true |
More help is in Troubleshooting. For the full walkthrough of making a mob, see Your first custom mob.