Making a custom entity
A custom entity is two files joined by the same identifier. The behavior pack (BP) entities/*.json sets the behavior the server uses (health, collision, interaction, events, properties), and the resource pack (RP) entity/*.json (the client entity) sets the look. The client entity imports materials, textures, geometry and animations under short names, and a render controller picks those short names to draw. This page has no rule IDs (rule IDs exist only for JSON UI). Judge confidence by the mark at the end of each item.
When to use it
| What you want | Method in this guide | When it does not fit |
|---|---|---|
| Add a new mob, decoration or display entity | BP entity + RP client entity + render controller + geometry | - |
| Change texture or model by state | The render controller reads a client_sync property with query.property | The client cannot read tags. Move the tag into a property |
| Change the behavior of a vanilla mob | Override the BP file with the same minecraft: identifier | Hardcoded behavior stays even when components are removed (Entities) |
| A large model that must be seen farther than 64 blocks | Not possible with this guide. Custom entities are not drawn beyond about 64 to 70 blocks | A proxy entity near the player, particles (Models and geometry) |
| Floating text | An entity has collision and pushing problems | Script API TextPrimitive |
| Change the player model or animations | Not this guide | Start from the latest player.entity.json of the installed game (Entities) |
| Complex decisions and state machines | Events can only queue commands, add and remove groups, and set properties | Send scriptevent with queue_command and handle it in the Script API |
Minimal example
An entity whose int property wiki:skin cycles 0, 1, 2 on each interaction, and whose render controller picks one of three textures by that value. The entity, client entity, render controller and lang are copied as is from the int property example in Render controllers; with the textures set to red, green and blue, that example changed red, green, blue, red on each interaction {measured} (2026-11-27, Windows 1.26.65). The geometry is the example in Models and geometry with only the identifier changed (the way the measured example did it), and the two manifests follow the form of addons/item-icon-slots.
BP/
manifest.json
entities/skin_mob.json
RP/
manifest.json
entity/skin_mob.entity.json
render_controllers/skin_mob.render_controllers.json
models/entity/skin_mob.geo.json
textures/entity/skin_mob_0.png
textures/entity/skin_mob_1.png
textures/entity/skin_mob_2.png
texts/en_US.lang
BP/manifest.json: one data module. This example needs no script. Make new UUIDs for each pack, and the BP and RP header UUIDs must differ.
{
"format_version": 2,
"header": {
"name": "Skin mob BP",
"description": "Custom entity example",
"uuid": "a41cd728-1558-4056-9fb4-25a105fd6b87",
"version": [1, 0, 0],
"min_engine_version": [1, 21, 90]
},
"modules": [
{ "type": "data", "uuid": "85ac1028-29aa-4f18-96ff-4c8a243737bf", "version": [1, 0, 0] }
],
"dependencies": [
{ "uuid": "b1ce02bd-4a60-4a1b-97e5-3df80d75f5ce", "version": [1, 0, 0] }
]
}
RP/manifest.json:
{
"format_version": 2,
"header": {
"name": "Skin mob RP",
"description": "Custom entity example",
"uuid": "b1ce02bd-4a60-4a1b-97e5-3df80d75f5ce",
"version": [1, 0, 0],
"min_engine_version": [1, 21, 90]
},
"modules": [
{ "type": "resources", "uuid": "67d16138-9175-479f-8f00-379091c9ec51", "version": [1, 0, 0] }
]
}
BP/entities/skin_mob.json: the identifier and properties go in description, always-on components in components, and events in events.
{
"format_version": "1.26.40",
"minecraft:entity": {
"description": {
"identifier": "wiki:skin_mob",
"is_spawnable": true,
"is_summonable": true,
"properties": {
"wiki:skin": { "type": "int", "range": [0, 2], "default": 0, "client_sync": true }
}
},
"components": {
"minecraft:type_family": { "family": ["wiki_mob"] },
"minecraft:collision_box": { "width": 0.6, "height": 1.8 },
"minecraft:health": { "value": 20, "max": 20 },
"minecraft:interact": {
"interactions": [
{
"on_interact": {
"filters": { "test": "is_family", "subject": "other", "value": "player" },
"target": "self",
"event": "wiki:next_skin"
}
}
]
}
},
"events": {
"wiki:next_skin": {
"set_property": { "wiki:skin": "math.mod(query.property('wiki:skin') + 1, 3)" }
}
}
}
}
RP/entity/skin_mob.entity.json: imports assets under short names and calls the render controller.
{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "wiki:skin_mob",
"materials": { "default": "entity_alphatest" },
"textures": {
"skin_0": "textures/entity/skin_mob_0",
"skin_1": "textures/entity/skin_mob_1",
"skin_2": "textures/entity/skin_mob_2"
},
"geometry": { "default": "geometry.skin_mob" },
"render_controllers": ["controller.render.skin_mob"]
}
}
}
RP/render_controllers/skin_mob.render_controllers.json:
{
"format_version": "1.10.0",
"render_controllers": {
"controller.render.skin_mob": {
"arrays": {
"textures": {
"Array.skins": ["Texture.skin_0", "Texture.skin_1", "Texture.skin_2"]
}
},
"geometry": "Geometry.default",
"materials": [ { "*": "Material.default" } ],
"textures": [ "Array.skins[query.property('wiki:skin')]" ]
}
}
}
RP/models/entity/skin_mob.geo.json: one bone, one cube.
{
"format_version": "1.12.0",
"minecraft:geometry": [
{
"description": {
"identifier": "geometry.skin_mob",
"texture_width": 64,
"texture_height": 64,
"visible_bounds_width": 2,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 1.25, 0]
},
"bones": [
{ "name": "body", "pivot": [0, 12, 0],
"cubes": [ { "origin": [-4, 12, -2], "size": [8, 12, 4], "uv": [16, 16] } ] }
]
}
]
}
RP/texts/en_US.lang:
entity.wiki:skin_mob.name=Skin Mob
Draw the three PNG textures yourself. UVs map as a ratio of texture_width/texture_height, so a PNG that is not 64x64 still draws {measured}. Do not use semi-transparent pixels that are not fully transparent.
Changing state with component groups
Behavior that turns on and off goes in component_groups, not components, and events put it in and take it out with add and remove. This form comes from the first example on the Entities page.
{
"component_groups": {
"wiki:interacted": { "minecraft:scale": { "value": 2 } }
},
"events": {
"wiki:on_interact": { "add": { "component_groups": [ "wiki:interacted" ] } },
"minecraft:entity_spawned": {
"randomize": [
{ "weight": 95, "add": { "component_groups": [ "minecraft:cow_adult" ] } },
{ "weight": 5, "add": { "component_groups": [ "minecraft:cow_baby" ] } }
]
}
}
}
Event responses are add, remove, randomize (one entry by weight), sequence (branching by filters), queue_command (runs at the end of the tick, without /) and set_property. Default groups are added in minecraft:entity_spawned.
Wiring animations and animation controllers
Animations (RP/animations/) and controllers (RP/animation_controllers/) run only when registered in the client entity animations under a short name and that short name is in scripts.animate. This is the example in Animations (Bedrock Wiki).
{
"animations": {
"blade_controller": "controller.animation.helicopter.blade",
"flying": "animation.helicopter.flying"
},
"scripts": {
"animate": [ { "blade_controller": "q.has_rider" } ]
}
}
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.helicopter.blade": {
"initial_state": "ground",
"states": {
"ground": { "transitions": [ { "flying": "!q.is_on_ground" } ] },
"flying": {
"animations": ["flying"],
"transitions": [ { "ground": "q.is_on_ground" } ]
}
}
}
}
}
Create variables in scripts.initialize and update them in scripts.pre_animation. Both are string arrays.
Spawn rules and spawn eggs
With is_spawnable: true a spawn egg is made automatically. The egg's look is set by spawn_egg in the client entity description. Vanilla pig.entity.json (format 1.10.0) uses an item_texture.json key, and snow_golem.v1.0.entity.json (format 1.8.0) uses two colors.
{ "spawn_egg": { "texture": "spawn_egg_pig" } }
{ "spawn_egg": { "base_color": "#d9f2f2", "overlay_color": "#81a4a4" } }
Natural spawning needs a BP/spawn_rules/ file. Without it the entity appears only from eggs and commands. This is vanilla spawn_rules/pig.json with the identifier changed and the biome conditions cut to one. pig.json writes a single string in minecraft:spawns_on_block_filter. The value also takes an array of strings or an array of { "name": ... } objects (vanilla bat.json, wolf.json).
{
"format_version": "1.8.0",
"minecraft:spawn_rules": {
"description": {
"identifier": "wiki:skin_mob",
"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": 10 },
"minecraft:herd": { "min_size": 1, "max_size": 3 },
"minecraft:biome_filter": {
"any_of": [
{ "test": "has_biome_tag", "operator": "==", "value": "animal" }
]
}
}
]
}
}
For testing, raise minecraft:weight to about 200 (1 is rare). There is no record of running the example entity with this spawn egg and these spawn rules.
Drawing a held item
For an entity to hold an item it needs three things: "minecraft:equipment": {} in the BP, a rightItem bone in the geometry (parent rightArm), and "enable_attachables": true in the client entity. The item is put in with a command. The bone structure below comes from the holder entity of addons/item-icon-slots. A client entity with no visible body, given enable_attachables and an item in the main hand, drew only the item in the air {measured}.
{
"bones": [
{ "name": "root", "pivot": [ 0, 0, 0 ] },
{ "name": "rightArm", "parent": "root", "pivot": [ 0, 12, 0 ] },
{ "name": "rightItem", "parent": "rightArm", "pivot": [ 0, 6, 0 ] }
]
}
replaceitem entity @e[type=wiki:skin_mob] slot.weapon.mainhand 0 minecraft:diamond_sword
From a script, use entity.runCommand("replaceitem entity @s slot.weapon.mainhand 0 <item>"). The equipment of a non-player entity cannot be read or written through script components. The client entity held_item_scale (must be greater than 0) sets the size, and hide_held_items (an expression) hides it {code}. A fox, which has no enable_attachables, drew an item that has an attachable as the item icon when holding it in its mouth {measured}.
Must match
- The BP entity and the client entity have exactly the same
identifier. Write it in lowercase, and use a namespace other thanminecraft:(minecraft:overrides vanilla). - Folders: BP uses
entities/andspawn_rules/. RP usesentity/(notentities),models/entity/,render_controllers/,animations/,animation_controllers/. - Use a namespace only in the entity
identifier. Putting one in a geometry identifier likegeometry.bm65:nameis an error, and animation and material names inside the client entity do not take one either. Animation names cannot contain a colon. - The client entity
geometryvalue equalsdescription.identifierin the.geo.json. - The
xinGeometry.x,Texture.xandMaterial.xused by the render controller is defined as a short name in the client entity. The render controller name is in the client entityrender_controllers. - A render controller file has
format_versionand therender_controllerswrapper.texturesis an array andgeometryis a string. - A simple entity (one
defaultgeometry, texture and material) can use vanillacontroller.render.default. A custom entity that reused another vanilla render controller ID (controller.render.npc) broke{single report}. - Use at most 11 entries in a render controller
textures. From 12 the client froze right after summoning{measured}. animationsis an object (short name: ID), andscripts.animateis an array of short names. A condition is{ "shortname": "expression" }. Do not put spaces in keys or names.- Animation IDs start with the
animation.prefix and controller IDs withcontroller.animation.. A controller state'sanimationsis an array, and the names in it are the client entity's short names. - In a client entity of format 1.10.0 or higher, do not use the
animation_controllerskey underdescription. Put controllers inanimationstoo. - Write bone and animation names in lowercase without spaces. A head rotation animation needs the bone name to be exactly
head. - Properties: put
type,defaultandclient_sync: trueindescription.properties. An enum has 2 to 16 values, and a value name starts with a letter and is at most 32 characters. Therangeof int and float must have a maximum greater than the minimum. A bool takes norange. An entity has at most 32{measured}. - Every
behavior.*component has apriority(lower runs first). - Events go inside
events, and an event reference is an{ "event": "name" }object.queue_commandtakes no/, and animation controlleron_entry/on_exitcommands do. - Write components that must be objects as
{}. An old form like"minecraft:fire_immune": trueremoves the entity once the format is raised.minecraft:scaleis{ "value": 0.5 }. - Component values do not take Molang (only constants). To change a value, use component groups.
- The same component in several groups means only one works, and an entity has only one valid
minecraft:timer. Removing a group does not return to the value incomponents. /summonand scriptspawnEntityneedis_summonable: true.- A held item is drawn only with
"enable_attachables": true(spelled exactly) and arightItem/leftItembone. - The lang key is
entity.<ns:id>.name=Name, and for the spawn eggitem.spawn_egg.entity.<ns:id>.name=Name. No spaces around=, and keep a lang file for each game language.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| Transparent mob with only a shadow and collision, spawn egg also transparent | The client entity animations/animate shape is wrong, or the render controller textures is not an array | Fix the shape as above, and if the file was hand-edited, export it again from Blockbench |
found in the input, but is not present in the Schema | The entity format_version is lower than the component, an event or listener is in the wrong place, or the name is not in the schema | Raise to the latest format and keep events inside events. For rejected names see Entities section 17 |
The entity disappears after raising the format, with expected an object | An old-form component written as true | Change it to {} |
Error parsing render Controllers | Old 1.8.0-style render controller form, no wrapper | Fix to the form above |
Mesh Material doesn't exist | A material name used by the render controller is not in the client entity | Define the short name in materials |
| geometry not found, model not visible | The folder is not models/entity/, a JSON error, or a different identifier | Match the path and identifier and fix the JSON |
| The entity seems to sit in the middle of the map, or is not visible | A large pivot offset, nearly transparent texture pixels, old geometry not converted | Check pivots and textures, and convert with Blockbench |
| The texture does not change | The property has no client_sync: true. For an enum, without default every RP query also fails | Set both |
Too many properties on the definition (Limit is 32) | 33 or more properties | Pack bits or split entities {measured} |
Works with /playanimation but does not play in game | The short name is not in scripts.animate | Add it to animate |
unknown variable | A variable made in pre_animation was read first | Initialize it in scripts.initialize |
| An animation breaks silently | Missing && in a transition, a trailing ;, a leftover quote, NaN keyframes | Fix the expression and replace NaN with 0 |
math.random in a render controller flickers | It rolls again every frame | Decide it once in scripts.initialize, or use math.random_integer in the BP property default |
| Removing a group does not restore the default | Removing a group removes it completely | Add a group that has the original value again |
| No natural spawning | No spawn_rules, no biome filter, or low weight | Add the rule and raise weight for testing |
/summon fails | is_summonable is false | Set it to true |
The name shows as a key like entity.wiki:x.name | No lang line or an empty value. An empty value is the same as no key {measured} | Write the value in the lang file of each game language |
| The held item is not visible, or the entity turns transparent | enable_attachables missing or misspelled, wrong bone name | Fix the spelling and the rightItem bone |
| Disappears a few dozen blocks away | Entity render distance limit of about 64 blocks | Cannot be raised. If it vanishes from behind, enlarge visible_bounds_* |
| The client freezes right after summoning | 12 or more render controller textures entries | Split to 11 or fewer {measured} |
| Edited files are not applied | New entity and controller files are not read by /reload all | Restart the game fully |
Version conditions
- Use the latest entity
format_version(1.26.40by the wiki, also used in the example). On Windows 1.26.65.1 a format 1.26.60 entity rejects unknown members and components with anot present in the Schemaerror and does not load the entity. The old parser of format 1.26.50 ignores some fake keys without a log{measured}. - In format 1.26.50,
interactionsofminecraft:interactmust be an array. minecraft:remove_in_peacefulis rejected on 1.26.65.1 with an error that it is not in the schema{measured, code}.- There is a report that atomic client entities appeared in the 26.70 preview (1.26.70.21)
{unverified}. The wiki has no other fact that changes how to do this task.
How to check
-
Put the BP in
development_behavior_packsand the RP indevelopment_resource_packs, then restart the game. Turn both packs on in the world settings. New entity files and controllers are read only after a full game restart. -
Turn on the Content Log GUI in the Creator section of the settings.
-
Summon with
/summon wiki:skin_mob, and also check the spawn egg in the creative inventory. With the example, the texture changesskin_0,skin_1,skin_2,skin_0on each interaction. -
If it fails, look for these lines in the log.
Log text Meaning this component was found in the input, but is not present in the SchemaThe component does not exist, or the format is low this member was found in the input, but is not present in the SchemaA member inside a component does not exist child '...' not valid hereA typo or a key in the wrong place expected an objectA component that must be an object was written as a value Error parsing render ControllersRender controller format error Mesh Material doesn't existThe material short name does not exist Failed to resolve query ...The query does not exist, or cannot be used in that place unrecognized tokenThe expression has a character Molang does not know (such as %) -
JSON errors appear in the log with a line number. For
[Actor][error]-error parsing entity/x.json:with no details while the JSON is correct, restart the game or import the pack again. -
To see whether an event fires, put a
sayin the event withqueue_command.
Further reading
- Entities (behavior side): components, groups, events concept, file basics and errors, events, properties and variants, spawn rules, equipment, animation wiring, validation rules
- Entities and items appendix: changes by version and open questions
- Render controllers: basic form and errors, texture arrays and variants, part_visibility
- Animations and animation controllers
- Models and geometry: folders and identifiers, visible bounds and culling
- Textures and atlases: texture path rules
- Attachables and item rendering: how items held by entities are drawn
- Entities, items, custom components: handling entities from scripts
- Content and rendering claims measured: the measurement record of the minimal example
| id | Source | License | Commit | Accessed |
|---|---|---|---|---|
private-research | Private research (-) | - | 2026-11-13 | |
bedrock-wiki | Bedrock Wiki | CC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository) | 0930b39 | 2026-11-13 |
ms-learn | Minecraft Creator documentation (Microsoft Learn) | CC BY 4.0 (documentation), MIT (code) | a9fd1c0 | 2026-11-13 |
bedrock-samples | Mojang bedrock-samples | Minecraft EULA applies, (c) Mojang AB. All rights reserved | 15701fa9 (guide baseline 46ba6ea) | 2026-11-13 |
repo-guide | JSON UI comprehensive guide (this repository) (guide/) | This project's material | 2026-11-13 |