Skip to main content

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 wantMethod in this guideWhen it does not fit
Add a new mob, decoration or display entityBP entity + RP client entity + render controller + geometry-
Change texture or model by stateThe render controller reads a client_sync property with query.propertyThe client cannot read tags. Move the tag into a property
Change the behavior of a vanilla mobOverride the BP file with the same minecraft: identifierHardcoded behavior stays even when components are removed (Entities)
A large model that must be seen farther than 64 blocksNot possible with this guide. Custom entities are not drawn beyond about 64 to 70 blocksA proxy entity near the player, particles (Models and geometry)
Floating textAn entity has collision and pushing problemsScript API TextPrimitive
Change the player model or animationsNot this guideStart from the latest player.entity.json of the installed game (Entities)
Complex decisions and state machinesEvents can only queue commands, add and remove groups, and set propertiesSend 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 than minecraft: (minecraft: overrides vanilla).
  • Folders: BP uses entities/ and spawn_rules/. RP uses entity/ (not entities), models/entity/, render_controllers/, animations/, animation_controllers/.
  • Use a namespace only in the entity identifier. Putting one in a geometry identifier like geometry.bm65:name is 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 geometry value equals description.identifier in the .geo.json.
  • The x in Geometry.x, Texture.x and Material.x used by the render controller is defined as a short name in the client entity. The render controller name is in the client entity render_controllers.
  • A render controller file has format_version and the render_controllers wrapper. textures is an array and geometry is a string.
  • A simple entity (one default geometry, texture and material) can use vanilla controller.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}.
  • animations is an object (short name: ID), and scripts.animate is 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 with controller.animation.. A controller state's animations is 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_controllers key under description. Put controllers in animations too.
  • Write bone and animation names in lowercase without spaces. A head rotation animation needs the bone name to be exactly head.
  • Properties: put type, default and client_sync: true in description.properties. An enum has 2 to 16 values, and a value name starts with a letter and is at most 32 characters. The range of int and float must have a maximum greater than the minimum. A bool takes no range. An entity has at most 32 {measured}.
  • Every behavior.* component has a priority (lower runs first).
  • Events go inside events, and an event reference is an { "event": "name" } object. queue_command takes no /, and animation controller on_entry/on_exit commands do.
  • Write components that must be objects as {}. An old form like "minecraft:fire_immune": true removes the entity once the format is raised. minecraft:scale is { "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 in components.
  • /summon and script spawnEntity need is_summonable: true.
  • A held item is drawn only with "enable_attachables": true (spelled exactly) and a rightItem/leftItem bone.
  • The lang key is entity.<ns:id>.name=Name, and for the spawn egg item.spawn_egg.entity.<ns:id>.name=Name. No spaces around =, and keep a lang file for each game language.

Common mistakes​

SymptomCauseFix
Transparent mob with only a shadow and collision, spawn egg also transparentThe client entity animations/animate shape is wrong, or the render controller textures is not an arrayFix 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 SchemaThe entity format_version is lower than the component, an event or listener is in the wrong place, or the name is not in the schemaRaise 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 objectAn old-form component written as trueChange it to {}
Error parsing render ControllersOld 1.8.0-style render controller form, no wrapperFix to the form above
Mesh Material doesn't existA material name used by the render controller is not in the client entityDefine the short name in materials
geometry not found, model not visibleThe folder is not models/entity/, a JSON error, or a different identifierMatch the path and identifier and fix the JSON
The entity seems to sit in the middle of the map, or is not visibleA large pivot offset, nearly transparent texture pixels, old geometry not convertedCheck pivots and textures, and convert with Blockbench
The texture does not changeThe property has no client_sync: true. For an enum, without default every RP query also failsSet both
Too many properties on the definition (Limit is 32)33 or more propertiesPack bits or split entities {measured}
Works with /playanimation but does not play in gameThe short name is not in scripts.animateAdd it to animate
unknown variableA variable made in pre_animation was read firstInitialize it in scripts.initialize
An animation breaks silentlyMissing && in a transition, a trailing ;, a leftover quote, NaN keyframesFix the expression and replace NaN with 0
math.random in a render controller flickersIt rolls again every frameDecide it once in scripts.initialize, or use math.random_integer in the BP property default
Removing a group does not restore the defaultRemoving a group removes it completelyAdd a group that has the original value again
No natural spawningNo spawn_rules, no biome filter, or low weightAdd the rule and raise weight for testing
/summon failsis_summonable is falseSet it to true
The name shows as a key like entity.wiki:x.nameNo 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 transparentenable_attachables missing or misspelled, wrong bone nameFix the spelling and the rightItem bone
Disappears a few dozen blocks awayEntity render distance limit of about 64 blocksCannot be raised. If it vanishes from behind, enlarge visible_bounds_*
The client freezes right after summoning12 or more render controller textures entriesSplit to 11 or fewer {measured}
Edited files are not appliedNew entity and controller files are not read by /reload allRestart the game fully

Version conditions​

  • Use the latest entity format_version (1.26.40 by 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 a not present in the Schema error 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, interactions of minecraft:interact must be an array.
  • minecraft:remove_in_peaceful is 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​

  1. Put the BP in development_behavior_packs and the RP in development_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.

  2. Turn on the Content Log GUI in the Creator section of the settings.

  3. Summon with /summon wiki:skin_mob, and also check the spawn egg in the creative inventory. With the example, the texture changes skin_0, skin_1, skin_2, skin_0 on each interaction.

  4. If it fails, look for these lines in the log.

    Log textMeaning
    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 %)
  5. 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.

  6. To see whether an event fires, put a say in the event with queue_command.

Further reading​

Sources
idSourceLicenseCommitAccessed
private-researchPrivate research (-)-2026-11-13
bedrock-wikiBedrock WikiCC BY 4.0 (docs/licenses/CC-BY-4.0.md in the repository)0930b392026-11-13
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13
bedrock-samplesMojang bedrock-samplesMinecraft EULA applies, (c) Mojang AB. All rights reserved15701fa9 (guide baseline 46ba6ea)2026-11-13
repo-guideJSON UI comprehensive guide (this repository) (guide/)This project's material2026-11-13