1. Wiki
  2. /Entities
  3. /The client entity file

The client entity file

The resource pack side of a Bedrock mob: the client entity file with materials, textures, geometry, animations, render controllers, scripts and spawn egg.

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

Resource pack
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.json

Only 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.

RP/entity/ruby_golem.entity.json
{
  "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.

RP/entity/ruby_golem.entity.json (description)
"materials": {
  "default": "entity_alphatest",
  "glow": "entity_emissive_alpha"
}
MaterialUse it for
entityFully solid skins, no transparent pixels
entity_alphatestSkins with fully transparent holes. The safest default.
entity_alphablendHalf-transparent pixels, like glass or slime
entity_emissive_alphaParts 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.

RP/entity/ruby_golem.entity.json (description)
"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.

RP/entity/ruby_golem.entity.json (description)
"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.

RP/entity/ruby_golem.entity.json (description)
"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:

AnimationMovesBones it expects
animation.common.look_at_targetThe head toward what the mob looks athead
animation.quadruped.walkFour legs while walkingleg0 to leg3
animation.humanoid.moveArms and legs while walkingleftarm, rightarm, leftleg, rightleg

animation_controllers

Older client files list controllers in their own array instead of in animations:

Older style
"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.

RP/entity/ruby_golem.entity.json (description)
"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:

RP/render_controllers/ruby_golem.render_controllers.json
{
  "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:

A render controller with a condition
"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.

ScriptWhen it runsWhat it is for
initializeOnce, when the mob first appearsSetting starting values for variables
pre_animationEvery frame, before animationsWorking out values the animations need
animateEvery frameWhich animations and controllers to play
scaleEvery frameMaking the whole model bigger or smaller
variablesNot a script: a listMarking 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:

RP/entity/ruby_golem.entity.json (scripts)
"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

RP/entity/ruby_golem.entity.json (scripts)
"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

RP/entity/ruby_golem.entity.json (scripts)
"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:

RP/entity/ruby_golem.entity.json (description)
"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):

RP/entity/ruby_golem.entity.json (description)
"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:

RP/texts/en_US.lang
entity.wiki:ruby_golem.name=Ruby Golem
item.spawn_egg.entity.wiki:ruby_golem.name=Ruby Golem Spawn Egg

Other fields

FieldWhat it does
enable_attachablestrue shows armor and held items on the mob, using attachables
hide_armortrue hides any armor the mob wears
held_item_ignores_lightingtrue draws held items fully lit, even in the dark
locatorsNamed points on the model, like where a lead attaches
particle_effectsShort names for particles, for use in animations
sound_effectsShort names for sounds, for use in animations
min_engine_versionOnly load this file when the pack targets this game version or newer

When something goes wrong

What you seeMost likely cause
The mob is invisible, only a shadowThe identifier does not match the behavior pack, or the geometry name is wrong
Purple and black checkersThe texture path is wrong, or it ends in .png
Holes look black instead of see-throughUse entity_alphatest instead of entity
An animation never playsIt is in animations but not in scripts.animate or a controller
No spawn eggspawn_egg is missing, or is_spawnable is false in the behavior pack
The texture never changesThe property is missing "client_sync": true

More help is in Troubleshooting. For the full walkthrough of making a mob, see Your first custom mob.

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