Bedrock Beta Add-On Documentation

From Minecraft Wiki
Jump to: navigation, search
Mclogo.svg

Contents

Version: 1.8.0-beta.1[edit]

This is documentation for a beta release of Minecraft. New component names and parameters, and parameter changes for old components in this release are not final and might change before the final release. Make sure to check the documentation once the release is out of beta if your add-on isn't working properly

This section contains the latest documentation for the new Add-on features of the 1.8.0-beta.1 release of Minecraft:

Client Entity Documentation[edit]

This document contains a walkthrough on how to create new client entity definitions in Minecraft.

Overview[edit]

The schema should follow the current Minecraft JSON paradigms:

  • Fields should be lower-case and use underscores (no spaces)
  • Field values should be direct where possible (floats should be just the float, not a string)
  • All JSON files in the "entity" directory are required for the entity to render in the world

For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Resource Packs.

Getting Started[edit]

New client entity definitions are contained within a Resource Pack.

Entity[edit]

To start, create a new folder and name it "entity" inside the root of the Resource Pack. In the entity folder create a JSON file and give it a name. The JSON file needs a format version and minecraft:client_entity information.

Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the client entity definitions JSON to be used when using the Experimental Gameplay toggle.

Example client entity definitions JSON for the pig

{   
  "format_version": "1.8.0-beta.1",   
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:pig",
      "materials": { 
        "default": "pig"
      },
      "textures": {
        "default": "textures/entity/pig/pig",
        "saddled": "textures/entity/pig/pig_saddle"
      },
      "geometry": {
        "default": "geometry.pig"
      },
      "animations": {
        "setup": "animation.pig.setup",
        "walk": "animation.quadruped.walk",
        "look_at_target": "animation.common.look_at_target",
        "baby_transform": "animation.pig.baby_transform"
      },
      "animation_controllers": [
        {
          "setup": "controller.animation.pig.setup" 
        },
        {
          "move": "controller.animation.pig.move"
        },
        {
          "baby": "controller.animation.pig.baby"
        }
      ],
      "render_controllers": [ "controller.render.pig" ],
      "locators": {
        "lead": { 
          "head": [ 0.0, 14.0, -6.0 ]
        }
      },
      "spawn_egg": {
        "texture": "spawn_egg",
        "texture_index": 2
      }
    }
  }
}

The minecraft:client_entity section contains the description for the entity. Under description there are a number of things that you can set about an entity. Generally, this file is defining what resources a mob requires and gives a friendly name to each, that the other definition files can use.

Identifier[edit]

The identifier is used to register the entity with the server. In the Client Entity Definitions JSON the identifier sets the appearance of the entity (materials, textures, geometry, etc.) The matching identifier in the Entity Behavior JSON in the Behavior Pack is what gives the entity its behaviors.

min_engine_version[edit]

When present, players can set the min version needed to allow the JSON to be parsed. The version in the definition is compared to the engine version for which the top resource pack was built. If a definition's min_engine_version is newer than that pack's engine version then the definition is not parsed.

Multiple definition files may use the same identifier, in which case only one of those definitions will be loaded. The definition with the same or closest and not greater min_engine_version, as compared to the top resource pack's engine version, will be parsed; all other definitions with the same identifier will not be parsed.

This can be useful for continuing to support an older version of an entity, when an older resource pack is used at the top of the resource pack stack, while also supporting a newer version of the entity in all other cases.

Materials, Textures, and Geometry[edit]

Players can set the materials, texture and geometry used for the entity in this section. Players can set one or more materials, textures, and geometries that can be used by the mob. Players must set user defined names for them. These names are used in the Render Controllers JSON. Players can reference materials, textures, and geometry from the vanilla Minecraft Resource Pack or create their own. Custom materials, textures, and geometry should be in the corresponding folder at the root of the Resource Pack.

Scripts[edit]

Scripts allow players to use MoLang to compute calculations once and store that value. This value than can be used over and over again without the need to constantly recompute the calculations. Scripts currently support pre-animation and scale. More script types will be added later.

  • Pre-animation scripts are evaluated immediately before animations are processed.
  • Scale sets the scale of the mob's geometry.

Example pre-animation script for cod

       
"scripts": {
  "pre_animation": [
    "Entity.ZRot == !Entity.IsInWater ? Math.cos((Entity.Member.TimeStamp + Params.FrameAlpha) * 14.32) * 90 : 0.0;",
    "Entity.AnimationAmountBlend == Math.lerp(Entity.AnimationAmountPrev, Entity.AnimationAmount, Params.FrameAlpha);"
  ]
},

Example scale script for the bat

"scripts": {
  "scale": "0.35"
},

Animation[edit]

Allows the player to assign names to reference the long name for animations. These names are used by the animation controller JSON. Players can reference animations from the vanilla Minecraft Resource Pack or create their own. Custom animations should be in the animation folder at the root of the Resource Pack.

Animation controllers[edit]

Animation controllers decide which animations to play when. Each Controller contains a list of states that play one or more animations. Allows the player to assign names to reference the long names for animation controllers. Names are required and need to be unique from all other names in the animation controllers for that mob. Players can reference animation controllers from the vanilla Minecraft Resource Pack or create their own. Custom animation controllers should be in the animation_controllers folder at the root of the Resource Pack.

Particle[edit]

Allows the player to assign a key to reference the long name for particles. When these are present, the particle is created when the entity is spawned. keys are required and need to be unique from all other keys in the animation controllers. Players can reference particles from the vanilla Minecraft Resource Pack or create their own. Custom particles should be in the particle folder at the root of the Resource Pack.

Render Controllers[edit]

Specifies the names of render controllers. This name needs to match the name of a corresponding JSON located in the Render Controllers folder. Players can reference Render Controllers from the vanilla Minecraft Resource Pack or create their own. Custom Render Controllers should be in the textures folder at the root of the Resource Pack.

Locators[edit]

Locator offsets are specified in model space. An example of a locator is the "lead" locator used to specify where the lead will attach to graphically.

Example

"locators": {
  "lead": {
    "head": [ 0.0, 14.0, -6.0 ] 
  }
}

Enable_attachables[edit]

This determines if the entity can equip attachables when this is set to true. This allows the entity to render armor.

Example

"enable_attachables": true

Spawn Egg[edit]

This sets the color or texture used for the entity Spawn Egg. There are 2 ways to do this. The first is to use the hex value for the base color and the overlay color.

Example Spawn Egg using hex value

"spawn_egg": {
  "base_color": "#53443E",
  "overlay_color": "#2E6854"
}

The other way is to specify a texture.

Example Spawn Egg specifying a texture. The texture is located in the "items_texture" JSON in the textures folder of the Resource Pack. When there are more than one texture associated with a texture name you can use an index to pick the one that you want. If no index is specified than it is assumed to be 0 and the first texture in the list is used.

"spawn_egg": {
  "texture": "spawn_egg",
  "texture_index": 2
}

Data Driven Animation Documentation[edit]

This document contains a detailed explanation of the Data Driven Animation system for Minecraft.

Overview[edit]

The scheme should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – All JSON files in the definitions directory and subtree will be read into and interpreted by the animation system – For the October Technical Preview, you will need to enable the "Use Experimental Gameplay" option in the world

Getting Started[edit]

There are a number of new directories in resource packs with the addition of animations. – resource_pack_root\ – animation_controllers – animations – entity

Animations are stored in the 'animations' folder of a resource pack in a .json format, and referenced by the entity's .json definition file. Resource packs on the stack will overwrite previously specified animations of the same name in stack order (top overwriting bottom). They can be organized in any number of files with any names (ending in .json).

Adding Animations[edit]

In order to define what animations an entity has, you must add both animations and animation controllers to an entity's entity definition file.

Here you can see the entity definition for pig.json:

 
{
  "format_version": "1.8.0-beta.1",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:pig",
      "materials": { "default": "pig" },
      "textures": {
        "default": "textures/entity/pig/pig",
        "saddled": "textures/entity/pig/pig_saddle"
      },
      "geometry": {
        "default": "geometry.pig"
      },
      "animations": {
        "setup": "animation.pig.setup",
        "walk": "animation.quadruped.walk",
        "look_at_target": "animation.common.look_at_target",
        "baby_transform": "animation.pig.baby_transform"
      },
      "animation_controllers": [
        { "setup": "controller.animation.pig.setup" },
        { "move": "controller.animation.pig.move" },
        { "baby": "controller.animation.pig.baby" }
      ],
      "render_controllers": [ "controller.render.pig" ],
      "locators": {
        "lead": { 
          "head": [ 0.0, 14.0, -6.0 ] 
        }
      },
      "spawn_egg": {
        "texture": "spawn_egg",
        "texture_index": 2
      }
    }
  }
}

Note: the walk animation for pig is the same for cows and sheep, and thus uses animation.quadruped.walk instead of defining its own. This means you will not see the move animation in the pig.json animation file either. If you would like to make a custom pig walk you can change this line to point to your custom animation.

Animations are specified as a short name, followed by their full name. The short name is used in the animation controller, while the long name is used in the animations file.

Animation Controller[edit]

One needs to be able to control how animations are played, when, and how they interact with other animations. Animation controllers allow for blending of multiple animations based on parameters such as those exposed by the entity (eg: ground speed, rotation speed, etc).

Here is Pig's animation controller:

{
  "format_version": "1.8.0-beta.1",
  "animation_controllers": {
    "controller.animation.pig.setup": {
      "states": {
        "default": {
          "animations": {
            "setup": {}
          }
        }
      }
    },
    "controller.animation.pig.baby": {
      "states": {
        "baby": {
          "parameters": [ "Entity.Flags.BABY" ],
          "animations": {
            "baby_transform": [
              {
                "0.0": 0.0,
                "1.0": 1.0
              }
            ]
          }
        }
      }
    },
    "controller.animation.pig.move": {
      "states": {
        "default": {
          "parameters": [ "Entity.Member.WalkSpeed" ],
          "animations": {
            "walk": [
              {
                "0.0": 0.0,
                "1.0": 1.0
              }
            ],
            "look_at_target": {}
          }
        }
      }
    }
  }
}

Animations[edit]

At the beginning of each frame, the skeleton is reset to its default pose from its geometry definition and then animations are applied additively in order.

Here is an example from pig.json in the vanilla resource pack's animation folder:

 
{   
  "format_version": "1.8.0-beta.1",
  "animations": {
    "animation.pig.setup": {
      "loop": true,
	  "bones": {
	    "body": {
          "rotation": [ "-this", 0.0, 0.0 ]
        }       
      }
    },
    "animation.pig.idle": {       
      "loop": true, 
	  "bones": {
        "head": { 
          "rotation": [ "Math.cos(Params.{{code|AnimTime * 38}}.17) * 2.0 + Math.cos(Params.{{code|AnimTime * 27}}.0) * 2.0", "Math.cos(Params.{{code|AnimTime * 15}}.1) * 4.0", 0.0 ] 
        }
      }     
    },     
    "animation.pig.baby_transform": {       
      "loop": true,
	  "bones": {         
        "head": {          
          "scale": 2.0, "position": [ 0.0, 8.0, 4.0 ]         
        }       
      }     
    }   
  } 
}

Here is a small example from sheep.animation.json:

{         
  "animation.sheep.grazing": {             
    "bones": {                 
      "head": {                     
        "position": {                         
          "0.0": [ 0.0, 0.0, 0.0 ], 
          "0.2": [ 0.0, 9.0, 0.0 ], 
          "1.8": [ 0.0, 9.0, 0.0 ], 
          "2.0": [ 0.0, 0.0, 0.0 ]                     
        },
        "rotation": {                         
          "0.2": {                             
            "pre": [ 36.0, 0.0, 0.0 ], 
            "post": [ "180.0 * (0.2 + 0.{{code|07 * Math}}.Sin(Params.{{code|KeyFrameLerpTime * 1644}}.39))", 0.0, 0.0 ],                        
          },                         
          "1.8": {                             
            "pre": [ "180.0 * (0.2 + 0.{{code|07 * Math}}.Sin(Params.{{code|KeyFrameLerpTime * 1644}}.39))", 0.0, 0.0 ], 
            "post": [ 36.0, 0.0, 0.0 ]                         
          }                     
        }                 
      }             
    }         
  }
}
  • Note that animation data can be either raw data:
     
"rotation": [90.0, 0.0, 0.0]  // by default, if three values are specified, then values are in degrees, in euler X then Y then Z format     
"rotation": [0.373, 0.577, 0.687, 0.235]  // if four values are specified, then values represent a quaternion. This behavior is overrideable per component
  • or a run-time interpreted script:
     "rotation": [ "cos(Params.{{code|AnimPos * 38}}.17) * 80.{{code|0 * Params}}.AnimSpeed", 0.0, 0.0 ]

Animation Hierarchy[edit]

  • Animations are channel based (rotation, position, or scale), and within that, they are key-framed:
    • EntityAnimation animation name
    • BoneAnimation [] bone name to animation for this animation
    • AnimationChannel [] rotation, scale, or translation to animate
    • KeyFrame [] the value for the channel to be at, at a specific time

All of the above concepts are described in a detailed, bottom-up approach below


Names[edit]

  • All names: animations, bones, states, etc, must all start with a letter and contain only alphanumerics, underscore, or period.
  • All lower case letters is recommended.

Transforms[edit]

  • For each of scale, rotation, position, one can set the fields individually or uniformly with a single value. For example, these are equivalent.
"scale": [2.0, 2.0, 2.0]     "scale": 2.0     "scale": [2.0]
  • To clarify order of operations, vertices are scaled, rotated, then translated.
  • Animation data is assumed to be hierarchical, and is applied to a bone by name matching the bone name in the animation data to the targeted geometry's skeleton.
  • Not every bone needs to be animated
  • You can animate bones that don't exist in the targeted geometry (missing bones are ignored).

Scripting vs Raw Data[edit]

  • When specifying a transform (scale, rotation, or position), one can specify either a specific value, or a script:

    "position": [3.0, 10.0, 2.0] "position": [3.0, "10.0 * Math.cos(Params.AnimTime * Math.Pi + 3.3)", 2.0]

Scripting Language[edit]

  • Refer to the MoLang documentation for details on scripting
  • Note: when scripting rotations, it is assumed that angles are in degrees.

Parameters and Member Variables[edit]

- There are a few parameters currently exposed to all scripts to help control animation:

Parameters[edit]

Name Meaning
Params.AnimTime time into this animation
Params.DeltaTime time since this animation was last updated
Params.KeyFrameLerpTime amount of blending between key frames from 0.0 === start key frame to 1.0 === end key frame
Params.LifeTime time since this entity was created

Member Variables[edit]

Name Meaning
Entity.Member.Variant The variant this Entity is (eg. which cat/horse texture)
Entity.Member.YawSpeed How fast this Entity is turning (in degrees)
Entity.Member.WalkSpeed How fast this Entity is moving
  • See the Animation Controller section below for details on how these are used

Entity Flags[edit]

  • Animation scripts can query the current entity for any entity flag such as ONFIRE, ISBABY, GLIDING, etc. See Entity.h for the complete up-to-date list. These are boolean values that can be used to affect the animation via the ?: operator.

For example, changing the position of a bone based on whether the Mob is a baby or not:

"position": [ 0.0, "EntityFlag::BABY ? -8.0 : 0.0", "EntityFlag::BABY ? 4.0 : 0.0" ]

Channels (rotation, position, scale)[edit]

  • The engine tracks the animation of rotation, position, and scale separately.
  • Within a channel, one or more key frames are specified at arbitrary times, in seconds, from the start of the animation.
  • If no key frames are specified, a single key frame is created at t==0.0 and all channel data is stored within that key frame.

Entity Animation Format[edit]

  • The json format for an animation is as follows:

Note Matching the geometry format, units are in 1/16ths of meters.

"<animation_name>": { 
  // optional 
  "loop": <bool> // default == false. Should the animation loop back to t==0.0 when it finishes? 
  "blend_weight": <expression> // default == "1.0". How much this animation is blended with the others. 0.0 == off. 1.0 == fully apply all transforms. Can be an expression – see the Animation Controller section below 
  "animation_length": <float> // default == time of last key frame. At what time does the system consider this animation finished? 
  "override_previous_animation": <bool> // default == false. Should the animation pose of the bone be set to the bind pose before applying this animation, thereby overriding any previous animations to this point?

  // required
  "bones": [
    {
       "<bone_name>": {                     // must match the name of the bone specified in the geometry skeleton

            // various flavours of setting data
            // omitting a channel skips that channel for this animation of this bone
            // any number of floats below can be replaced by a string expression as described above; you don't have to replace all the floats on a line with expressions, only the ones you want to be expression-based

            "position": 1.0,                      // set x, y, and z to 1 
            "position": [1.0],                    // set x, y, and z to 1 
            "position": [1.0, 2.0, 3.0],          // set x==1 , y==2 , and z==3 

            "rotation": 45.0,                     // set x, y, and z to 45 degrees
            "rotation": [45.0],                   // set x, y, and z to 45 degress
            "rotation": [30.0, 0.0, 45.0],        // set x, y, and z to the respective values (in degrees)
            "rotation": [0.373, 0.577, 0.687, 0.235], // set x, y, z, and w to the respective values (in radians)

            // note: only uniform scaling is supported at this time
            "scale": 2.0,                         // scales the bone by 2.0
            "scale": [2.0],                       // scales the bone by 2.0

            // Key frame data is described below
            // Note that any of the above styles of values will work for "pre" and "post", and "pre" does not have to have the same format as "post"
            "rotation": {
                "0.0": [80.0, 0.0, 0.0],
                "0.1667": [-80.0, 0.0, 0.0],
                "0.333": [80.0, 0.0, 0.0]
            }

            // For discontinuous channel curve, you can specify a different value when interpolating to/from this key frame
            "rotation": {
                "0.3": {                                                  // the key field is the time stamp for this key frame : the value can be any of the above examples
                    "pre": [30.0, 0.0, 45.0],                             // when interpolating towards this keyframe from the previous, use this value
                    "post": "180.{{code|0 * Math}}.Sin(Params.KeyFrameLerpTime)"  // when interpolating away from this key frame to the next, use this value
                }
            }

            // another example
            "rotation": {
                "0.0": [80.0, 0.0, 0.0],           // start at an x rotation of 80 degrees
                "0.4": {
                    "pre": [80.0, 0.0, 0.0],       // stay at 80 until 0.4 seconds have elapsed
                    "post": [0.0, 0.0, 0.0],       // discontinuously pop the x rotation to 0.0 degrees
                },
                "0.8": [-80.0, 0.0, 0.0]           // using the previous frame's lerp mode, lerp to a x rotation of -80 degrees by 0.8 seconds
            }
        }
    }
]

Key Frames[edit]

  • A key frame defines two values for a channel-specific transform to a specific bone at a specified time, one as time approaches the key frame time, and the second from that key frame time onwards.
  • As such, when interpolating between two key frames, one can define the slope of the animation curve in either a continuous or discontinuous manner.

Interpolation[edit]

  • Key frame "pre" and "post" settings allow for controlling the interpolation curve at a key frame.
  • For interpolation, currently only linear is supported – Key frames do not need to be specified in order in the json. They will be sorted by time on import.

Continuous Example – This example spins the bone "head" around the y axis 1 rotation in 1 second. – Note that because interpolation is linear, at .25 seconds the head will be rotated to 90 degrees.

 
"head": {     
  "rotation": {       
    "0.0":[0, 0, 0], "0.5": [ 0, 180, 0], "1.0": [0, 360, 0]   
  } 
}

Discontinuous Example – Discontinuous just means that there won't be a smooth transition between key frames. It is useful if you want something to happen immediately. – This example scales the bone "head" – From 0 to 0.5 seconds (in the "pre" tag), the head bone is set to its normal scale of 1 in all dimensions [X, Y, Z] – At 0.5 seconds, the bone will instantly scale up to 2 times its normal size and then – From 0.5 to 1 second ("post"), the bone will re-scale back to its normal size of scale of 1 in all dimensions

 
"head": {     
  "scale": {     
    "0.5": {          
	  "pre": [ 1, 1, 1 ], 
	  "post": 2.0       
    }        
    "1.0": [ 1.0 ]   
  } 
}

Note In the larger example above of the file format, "pre" and "post" can also be defined by a MoLang expression that calculates that value at runtime. Allowing you to have a mathematically defined curve instead of being purely linear.

Animation Controllers[edit]

  • Animation controllers decide which animations to play when.
  • Each Controller contains a list of states that play one or more animations
  • Each animation can be blended based on one or more parameters.
  • Controller files are stored as json in the resource pack's definitions/animation_controllers folder.
  • The format is as follows:
   
  "<controller_name>": {     
    "states": {       
      "<state_name>": {         
        "parameters": [ <parameter 0 script>, ... ],  // optional         
          "animations": {           
            "<animation 0 name>": [             
              {               
                "min": 0.0, // optional               
                "peak": 0.1,               
                "max": 0.3 // optional             
              }           
            ],           
            ...         
          },         
          "transitions": [             
            { 
              "<target_state_name>", "<expression>" 
            },             
            ...         
          ]       
        },       
        ...     
      }   
    },

States[edit]

  • A controller contains n states. A state defines how one or more animations interact with zero or more parameters.
  • Each state has an optional parameters section, listing any number of parameters used by the animations to control their blending
  • Each state also has one or more animations, using the name given in the entity's definition json

State Parameters[edit]

  • Parameters are either set by the game or by a user defined script that can be found in the entity definition json found in definitions/entity/<entityname>.json
  • For Example:
   
"animation.controller.pig.move": {     
  "states": {       
    "default": {  
      "parameters": [ "Params.GroundSpeed" ], 
      "animations": {           
        "walk": [ 
          {               
            "0.0": 0.0, 
            "2.3": 1.0,             
          } 
        ]         
      }       
    }     
  }   
}
  • This defines a controller with a single state default that references the entity's ground speed (in metres per second).
  • It will play one animation walk that will blend from 0.0 to 1.0 as the ground speed increases from stopped to 2.3 m/s.
  • If the ground speed is greater than 2.3 m/s, the walk blend value will remain at 1.0.
  • If the ground speed is 0.0, the blend value will be 0.0 and the animation will be skipped.
  • If we change the example to this:
   
"controller.animation.pig.move": {     
  "states": {       
    "default": {         
      "parameters": [ "Params.GroundSpeed" ], 
      "animations": {           
        "idle": [ 
          {               
            "0.0": 1.0, 
            "0.1": 0.0
          } 
        ],           
        "walk": [ 
          {               
            "0.1": 0.0, 
            "2.7": 1.0, 
            "3.88": 0.0            
          } 
        ],           
        "run": [ 
          {               
            "2.7": 0.0, 
            "3.88": 1.0             
          } 
        ]         
      }       
    }     
  }   
}
  • If pig is stopped it will play the idle animation.
  • As the pig's speed increases to 0.1 m/s, the idle animation will be faded out.
  • As the pig's speed goes from 0.0 to 2.7 m/s, the walk animation will be blended in from 0.0 to 1.0.
  • As the pig's speed goes from 2.7 to 3.88 m/s, the walk animation will be blended out from 1.0 to 0.0 and the run animation will be blended in from 0.0 to 1.0
  • Any speed higher than 3.88 m/s will simply play the run animation at a blend value of 1.0.

User Defined Script[edit]

Example In definitions\entity\tiger.json:

 
{    
  "custom:tiger":{       
    "scripts":{          
      "pre_animation": { //determine these values before the animation happens each frame 
        "Entity.foo == Math.sin(Params.LifeTime)" 
      } 
    }    
  } 
}

This script will set foo to the result of the sin of Params.LifeTime to later be used in the animation or animation controller. Note: "pre_animation" tells the script to figure out the values of those variables once a frame, before animation occurs, so that the animation can use those values in their own formulas. If a variable didn't exist, it will create a new variable and its default value will be 0.0

 
"controller.animation.tiger.move": {    
  "states": {       
    "default": {          
      "parameters":  ["Entity.foo"], "animations": {  
        //animations are ADDITIVE unless otherwise specified             
        //in this case, base_pose will always be playing in the default state             
        //walk will play as well if Entity.foo is greater than 0.0             
        "base_pose": {},              
        "walk": [ 
          {                   
            "0.0": 0.0, //play none of the walk animation if foo is "0.0"                   
            "1.0": 1.0 //play the walk animation fully blended if foo is "1.0"                 
          } 
        ]          
      }      
    }    
  } 
}

Note that because foo is equal to a sin wave, that its values will range from -1 to 1. This means that you will have a period from 0 to -1 to 0 where only "base_pose" will play and then an equal amount of time where Walk will play on top of base_pose as foo goes from 0 to 1 back to 0. Base_pose will have a blend value of 1.0.

Zero parameters[edit]

  • A controller with zero parameters will simply play its animation(s).

Multi-parameter blending[edit]

  • If the controller has multiple parameters, the resulting blend values are simply multiplied together. If you want a turn animation to play if a pig is turning, but fade it out if the pig is moving:
   
"animation.controller.pig.move": {     
  "states": {       
    "default": {         
      "parameters": [ "Params.YawSpeed", "Params.GroundSpeed" ], 
        "animations": {           
          "turn_right": [ 
            {                   // this first entry maps to parameter 0 (YawSpeed in this example)               
              "0.0": 0.0, 
              "90.0": 1.0             
            },             
            {                   // the second entry maps to parameter 1 (GroundSpeed in this example)               
              "0.0": 1.0,               
              "1.2": 0.0             
            }           
          ]         
        }       
     }  
  }   
}
  • Blend in the turn_right animation from 0.0 to 1.0 as the yaw speed increases from 0.0 to 90.0 degrees / second.
  • Scale that value by 1.0 to 0.0 as the ground speed increases from 0.0 to 1.3 m/s.
  • So if the pig is standing still, the first parameter will result in a blend weight of 0.0 and the second will be 1.0, which, when multiplied together gives 0.0.
  • If the pig is rotating at 90.0 degrees per second, the first will be 1.0 and the second will be 1.0, so the turn animation will be blended at 1.0.
  • If the pig is turning at 30.0 degrees per second and moving forwards at 0.9 m/s, the first will be 0.333, the second will be 0.75, so the turn animation will be weighted by 0.25.

State Transitions[edit]

  • A state can specify any number of transition scripts, listed in order.
  • Each transition has a target state to switch to, and a script for whether it should switch or not.
  • For each transition in order, evaluate the script, and if it returns non-zero, switch to the specified state immediately.
  • Only one transition will be processed per frame.
   
"<controller_name>": {     
  "states": {
    "<state_name>": {         
	},         
	"transitions": [             
      // Evaluate the below expressions in order.             
      // The first to return non-zero is the state to transition to.            
      // If all are zero, then don't transition.             
      { "<target_state_name>", 
	    "<expression>" 
      },             
      ...         
    ]       
  },       
  ...     
}   
  • For example:
 
"controller.animation.tiger.move": {  
  "states": {     
    "default": {        
      "parameters":  [
	    "Entity.WalkBlendAmount"
	  ],        
      "animations": {           
	    //animations are ADDITIVE unless otherwise specified           
	    //in this case, base_pose will always be playing in the default state           
	    //walk will play as well if Entity.WalkBlendAmount is greater than 0.0           
	    "base_pose": {},            
	    "walk": [                  
	      {                 
            "0.0": 0.0, //play none of the walk animation if WalkBlendAmount is "0.0"                 
		    "1.0": 1.0 //play the walk animation fully if WalkBlendAmount is "1.0"               
          }           
        ]        
      },        
      "transitions": [           
        { 
	      "angry" : "Entity.Flags.ANGRY" // transition to angry state if the ANGRY flag is true } 
      ] 
    },        
    "angry": {           
      "animations": {              
        "prowl": {} // play the prowl animation in the angry state           
      },           
	  "transitions": [              
	    { "default" : "!Entity.Flags.ANGRY" } // transition back to default state if the ANGRY flag is false           
      ]        
    }     
  }  
} 

Entity Flags[edit]

  • Entity Flags are boolean variables set by the engine under different circumstances.
  • They are able to be used in MoLang expressions
  • Useful for controlling things like, changing position/textures/ animations if a mob is a baby. For example:

Example of changing position of a bone if the Mob is a baby or not:

"position": [ 0.0, "EntityFlag::BABY ? -8.0 : 0.0", "EntityFlag::BABY ? 4.0 : 0.0" ]

List of Entity Flags:[edit]

Name True IF
ONFIRE Mob is on fire
SNEAKING Mob is Sneaking (i.e. players and ocelots)
RIDING Player/ Mob is riding another Mob
SPRINTING Mob is Sprinting
USINGITEM Mob is using an item (i.e. players eating food, or players and witches using potions)
INVISIBLE Mob is invisible/ affected by Invisibility potion effect
TEMPTED Mob is tempted by a food item
INLOVE Mob is in its "Love" state by being fed it's tempt item
SADDLED Mob has a saddle on its back (i.e. pigs and horses)
POWERED If mob is charged (i.e. Creeper's blue shield). Added via minecraft:charged component
IGNITED If a mob is ignited. Added through the is_ignited and explode components
BABY Mob is a baby
CRITICAL when a critical attach is achieved (i.e. when the player firs a fully charged bow or gets a critical melee attach this causes the particles to play
WALLCLIMBING Mob is currently climbing a wall (i.e. spiders)
CANCLIMB Mob is able to climb
CANSWIM Mob is able to swim
CANFLY Mob is able fly
CANWALK Mob is able to walk
RESTING Pet sleeping with its owner or boat is resting
SITTING Mob is currently sitting (i.e. dogs and cats)
ANGRY Mob is currently angry (i.e. wolves that been hit, zombie pigman once hit). Added via the minecraft:angry component
INTERESTED Mob is attracted to food the player is holding food they like (added via the minecraft:behavior.beg.) (i.e. tamed wolf sits and turn its head)
CHARGED This is set on a mob by the charge_charged_trigger parameter on the minecraft:behavior.ranged_attack component (i.e. the blaze's fireball attack)
TAMED If Mob is currently tamed (i.e. Dogs use this to draw their collars)
ORPHANED Pets that have lost their owners.
LEASHED Mob currently has a leash on it.
SHEARED Mob has been sheared. Set with the Minecraft:sheared component
GLIDING Player is gliding (using elytra)
ELDER If the Mob is an elder version (only used on Elder Guardian)
MOVING Mob is currently swimming through water
BREATHING if false, HUD bubbles render (water only)
CHESTED If the Mob has a chest on them (i.e. Horses and Donkey chests)
STACKABLE Used on minecarts and boats so that they don't collide through each other. Set via minecraft:stackable component
STANDING Mob is stomping (i.e. zombie's minecraft:behavior.stomp_turtle_egg, or Horses and the player jumping )
SHAKING When Mobs shake off water (i.e. Wolves shaking off water when wet from swimming/rain
IDLING Used when the Agent is idling
CASTING Mob is casting a spell. (i.e. Evoker animation of arms in air and to have particles play next to its hands)
CHARGING Mob is using a charge attack (i.e. the vex's charge attack)
WASD_CONTROLLED When the mob is being controller by a player riding it
CAN_POWER_JUMP Mob can power jump (added with the minecraft:can_power_jump component
LINGERING Used on potions that are thrown to know it creates a lingering effect.
HAS_COLLISION Used to indicate if a mob can collide with things
HAS_GRAVITY if a Mob is affected by gravity (set by minecraft:physics component)
FIRE_IMMUNE If the mob has minecraft:fire_immune component or the fire resistance potion applied
DANCING When a mob is dancing (i.e. used by parrots to indicate they should dance)
IS_TRANSFORMING This flag is set by the minecraft:transformation component(i.e. Zombie villagers when they are transforming back to villagers)
DAMAGENEARBYMOBS Set by the player's spin attack using the Trident
SWIMMING True if the Mob is currently swimming
BRIBED Added when the mob is bribed (added through the minecraft:bribable component
IS_PREGNANT Set by some turtle behavior goals. Used to make pregnant turtles render larger
LAYING_EGG If the turtle is laying an egg
RIDER_CAN_PICK This is set by the "rider_can_interact" Parameter of the minecraft:rideable component.

Particle Documentation[edit]

This document contains a detailed walkthrough on how to create new particles in Minecraft.

Overview[edit]

The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "particle" directory and subtrees will be read into and interpreted by the particle system – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use the particle feature in Resource Packs

Getting Started[edit]

New particles are contained within a Resource Pack. To begin create a new folder named "particle" in the root of the Resource Pack that you want to add the new particle in. In the particle folder create a JSON file and give it a name. The JSON file needs a format and particle information.

Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the particle to be used when using the Experimental Gameplay toggle.

Particle Information contains the particles name, basic render parameters and a set of components. When giving the particle a name, namespacing should be used.

Naming – All particle effects should be namespaced – Namespacing involves adding a <name:> prefix on the effect tag – A name is required and is used to reference the particle from scripts, the particle /command, or a list of entities – All Vanilla Minecraft particles use the minecraft: namespace prefix

Basic render parameters Particle effects consist of basic render parameters and a set of components. The basic render parameters need to appear just after the version and contains a material and a texture. For materials there are 2 material types to choose from: – "particles_alpha" – "particles_opaque"

For textures, the particle system can use any particle that can be read by Minecraft. Components can be placed in any order, and know which category they belong in. Below is an example of a Smoke Puff particle. You can copy and paste this into your particle JSON to get started. Make sure you change the name if you are trying to create a new particle (instead of just replacing an old one.)

 
{   
  "format_version": "1.8.0-beta.1",   
  "particles": {     
    "minecraft:test_smoke_puff": {       
      "basic_render_parameters": {         
        "material": "particles_alpha", "texture": "textures/particle/particles"       
      },       
	  "components": {         
        "minecraft:emitter_rate_instant": {
          "num_particles": 100         
        },         
		"minecraft:emitter_lifetime_once": {           
          "active_time": 0         
        },         
		"minecraft:emitter_shape_sphere": {           
          "radius": 0.1, "direction": "outwards"         
		},         
		"minecraft:particle_initial_speed": "Math.random(0.0, 15.0)", "minecraft:particle_initial_spin": {           
		  "rotation": "Math.random(0, 360)", "rotation_rate": "Math.random(-300, 300)"         
        },         
		"minecraft:particle_lifetime_expression": {           
          "max_lifetime": "Math.random(1.0, 4.0)"         
		},         
		"minecraft:particle_motion_dynamic": {           
          "linear_acceleration": [ 0, 2.0, 0 ], "linear_drag_coefficient": 5, "rotation_drag_coefficient": 0.3         
        },         
		"minecraft:particle_appearance_billboard": {           
          "size": [ "0.1 + Entity.{{code|ParticleAge * 0}}.3f", "0.1 + Entity.{{code|ParticleAge * 0}}.3f" ],           
		  "facing_camera_mode": "lookat_xyz",           
		  "uv": {             
            "texturewidth": 128,             
            "textureheight": 128,             
            "flipbook": {               
              "base_UV": [ 56, 0 ],               
              "size_UV": [ 8, 8 ],               
              "step_UV": [ -8, 0 ],               
              "frames_per_second": 8,               
              "max_frame": 8,               
              "stretch_to_lifetime": true,               
              "loop": false             
            }           
          }         
        },         
		"minecraft:particle_appearance_tinting": {           
          "color": [ "Entity.ParticleRandom1*0.5", "Entity.ParticleRandom1*0.5", "Entity.ParticleRandom1*0.5", 1.0 ]         
        },         
        "minecraft:particle_appearance_lighting": {}       
      }     
    }   
  } 
}

MoLang Integration[edit]

Where it makes sense, any field can use a MoLang expression (strings). Field will be the result of the MoLang string, cast to the expected type. In addition to the regular MoLang parameters, the Particle system uses some special parameters that particle MoLang expressions can use:

Name Meaning
Entity.ParticleLifetime How long the particle lives for
Entity.ParticleAge How long the particle has lived
Entity.ParticleRandom1 A random from 0.0 to 1.0 that is constant for the lifetime of the particle
Entity.ParticleRandom2 Another random from 0.0 to 1.0 that is constant for the lifetime of the particle
Entity.EmitterLifetime How long the current loop lasts for the emitter
Entity.EmitterAge Age since the current loop started for the emitter
Entity.EmitterRandom1 A random from 0.0 to 1.0 that is constant for the current loop of the emitter
Entity.EmitterRandom2 Another random from 0.0 to 1.0 that is constant for the current loop of the emitter

When a component field is for an emitter, then the special parameters are for the emitter itself. When a component field is for a particular particle, then the special parameters are for that particle only.
For example, Lifetime means how long the emitter has been alive, or how long the particle has been alive.

Particles Components[edit]

This is the documentation for the attributes properties, and components available to use in particle JSON files. Below is a list of components that can be used in the particle JSON files.

Emitter Initial State Components[edit]

minecraft:emitter_local_space This component specifies the frame of reference of the emitter.

Parameters

Type Name Default Value Description
Bool position false When true, particle will simulate in entity space, otherwise it will simulate in world space
Bool rotation false When true, particle will simulate in entity space, otherwise it will simulate in world space

Emitter Rate Components[edit]

minecraft:emitter_rate_instant This component causes all the particles to come out at once. The particles do not come out again unless the emitter loops.

Parameters

Type Name Default Value Description
Float, MoLang num_particles 10 The number of particles that are emitted at once

minecraft:emitter_rate_steady This component causes the particles to come out at a steady rate over time.

Parameters

Type Name Default Value Description
Float, MoLang spawn_rate 1 The number of particles that are emitted per second
Float, MoLang num_particles 50 Maximum number of particles that can be active at once for this emitter

minecraft:emitter_rate_manual This component has particle emission only occur when the emitter is told to emit through code. This is used for legacy particle effects and should not be added to new particles.

Type Name Default Value Description
Float, MoLang max_particles 50 The max number of particles emitted

Emitter Lifetime Components[edit]

minecraft:emitter_lifetime_looping This component causes the emitter to loop until the component is removed

Parameters

Type Name Default Value Description
Float, MoLang active_time 10 The emitter will emit particles for this time per loop Float, MoLang sleep_time 0 The emitter will pause emitting particles this time per loop

minecraft:emitter_lifetime_once This component causes the emitter to execute once. When the lifetime ends or the number of particles allowed to emit is reached the emitter expires.

Parameters

Type Name Default Value Description
Float, MoLang active_time 10 The emitter will emit particles for this time per loop

minecraft:emitter_lifetime_expression This component turns an emitter on when there is a non-zero value. The emitter turns off when there is a zero value. This component is used when controlling an entity attached emitter.

Parameters

Type Name Default Value Description
Float, MoLang activation_expression 1 When the value is non-zero the emitter emits particles
Float, MoLang expiration_expression 0 When the value is non-zero the emitter expires

Emitter Shape Components[edit]

Shape controls both where the particles are emitted from and the initial direction of the particles.

minecraft:emitter_shape_point This component causes all particles emerge from a point that is offset from the emitter.

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang) offset 0, 0, 0 Specifies an offset from the emitter to emit the particles
(Float, MoLang), (Float, MoLang), (Float, MoLang) direction 0, 0, 0 Specifies the direction of the particles

minecraft:emitter_shape_sphere This component causes all particles to come out of a sphere from an offset from the emitter.

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang) offset 0, 0, 0 Specifies an offset from the emitter to emit the particles
radius 1 Specifies the radius of the sphere
Bool surface_only false Cause the particles to emit only from the surface of the sphere
(Float, MoLang), (Float, MoLang), (Float, MoLang) direction outwards Specifies the direction of the particles. Defaults to outwards, but players can specify inwards or give an x, y, z value

minecraft:emitter_custom_shape This component allows players to create a custom shape for the particle

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang) offset 0, 0, 0 Specifies an offset from the emitter to emit the particles
(Float, MoLang), (Float, MoLang), (Float, MoLang) direction Specifies the direction of the particles

minecraft:emitter_shape_entity_aabb This component causes all particles to come out of the aabb for the attached entity. If there is no entity then it comes out of the emitter point.

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang) direction 0, 0, 0 Specifies the direction of the particles

Particle Initial State Components[edit]

minecraft:particle_initial_spin This component starts the particle with a specified rotation and rotation rate.

Parameters

Type Name Default Value Description
Float, MoLang rotation 0 Specifies the initial rotation in degrees
Float, MoLang rotation_rate 0 Specifies the spin rate in degrees per second

minecraft:particle_initial_speed This component starts the particle with a specified speed. Component uses the direction specified by the emitter shape. The speed can be defined by a float or MoLang with a default value of 0.

Particle Motion Components[edit]

minecraft:particle_motion_dynamic This component specifies the dynamic properties of the particle. This determines what forces affects the particle. The dynamic properties alters the velocity of the particle (Affects the speed and direction of the particle.) Direction is always the direction of the velocity.

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang) linear_acceleration 0, 0, 0 Specifies the initial rotation in degrees
Float, MoLang linear_drag_coefficient 0 Specifies the amount of drag that is applied to the particle. The higher the value the more drag that is applied to the particle
Float, MoLang rotation_acceleration 0 Specifies the amount of rotation speed that's applied to the particle. Rotation slows down over time.
Float, MoLang rotation_drag_coefficient 0 Specifies the amount of drag that is applied to particle rotation. The higher the value the more drag that is applied to particle rotation.

minecraft:particle_motion_parametric This component is used to directly control the particle. If a specific position is applied then velocity is ignored.

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang) relative_position 0, 0, 0
(Float, MoLang), (Float, MoLang), (Float, MoLang) direction 0, 0, 0 Specifies the 3D direction of the particle
Float, MoLang rotation 0 Specifies the rotation of the particle

minecraft:particle_motion_collision This component enables collision between blocks and the particle. The particle will not have collision if this particle doesn't exist.

Parameters

Type Name Default Value Description
Bool, MoLang enabled true enables the collision when the value is true
Float collision_drag 0 Specifies the amount of drag that is applied to a particle when it collides with a block
Float coefficient_of_restitution 0 Specifies the amount of bounce the particle has when it collides (value between 0.0-1.0)
Float collision_radius Used to minimize the interpenetration of the particles with the environment. This must be less than or equal to 1/2 block

Particle Appearance Components[edit]

minecraft:particle_appearance_billboard This component specifies the size and facing mode for the particle. If this component isn't specified then all particles will aim upwards.

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang) size Specifies the x and y size of the billboard
String face_camera_mode A string used to determine the orientation of the billboard
Strings
String Description
rotate_xyz Aligned to the camera, perpendicular to the view axis
rotate_y Aligned to the camera, but rotating around the world on the Y axis
lookat_xyz Aimed at the camera, biased toward world y up
lookat_y Aimed at the camera, but rotating around the world on the Y axis
direction Billboard is aligned perpendicular to the direction vector
uv Specifies the UVs for the particle
Type Name Default Value Description
int texturewidth 1 Specifies the assumed texture width of the particle
int textureheight 1 Specifies the assumed texture height of the particle
[Float/MoLang], Float/MoLang] uv Assuming the texture width and height use these uv coordinates
[Float/MoLang], Float/MoLang] uv_size
flipbook Specifies a flipbook animation

Parameters

Type Name Default Value Description
[Float, Float] base_UV Specifies the upper-left corner of the UV patch
[Float, Float] size_UV Specifies the size of the UV patch
[Float, Float] step_UV Specifies how far to move the UV patch each frame
Float frames_per_second Specifies the default frames per second
Float max_frame Specifies the maximum frame number (with the first frame being frame 1)
Bool stretch_to_lifetime false Adjusts the Frames per Second to match the lifetime of the particle (optional)
Bool loop false Loops the animation when it reaches the end (optional)

minecraft:particle_appearance_tinting This component specifies the color of the vertices of the billboard

Parameters

Type Name Default Value Description
(Float, MoLang), (Float, MoLang), (Float, MoLang), (Float, MoLang) color 1, 1, 1, 1 Specifies the color of the vertices of the billboard

minecraft:particle_appearance_lighting When this component is present, particles will be tinted by local lighting conditions in-game.

Particle Lifetime Components[edit]

minecraft:particle_lifetime_expression This component controls when the particle expires

Parameters

Type Name Default Value Description
Float, MoLang expiration_expression 0
Float, MoLang max_lifetime Specifies the amount of time before the particle expires

minecraft:particle_expire_if_in_blocks This component causes the particles to expire when in one of the block types in the list. When adding a block name to the list ensure the at the "minecraft:" prefix appears for the block name (ex. minecraft:water, minecraft:dirt, etc.)

minecraft:particle_expire_if_not_in_blocks This component causes the particles to expire when it is not in one of the block types in the list. When adding a block name to the list ensure the at the "minecraft:" prefix appears for the block name (ex. minecraft:water, minecraft:dirt, etc.)

Render Controllers Documentation[edit]

This document contains a walkthrough on how to create new render controllers in Minecraft. Entities can have multiple render controllers.

Overview[edit]

The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "render_controllers" directory (located in the definitions folder of the Resource Pack) determine what renders on the entity – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Resource Packs

Getting Started[edit]

New Render Controllers are contained within a Resource Pack. To begin create a new folder named "render_controllers" in the root of the Resource Pack that you want to add the new Render Controller JSON inside.

Example render controllers JSON for the ocelot

 
{   
  "format_version": "1.8.0-beta.1",   
  "render_controllers": {     
    "controller.render.ocelot": {       
      "arrays": {         
        "textures": {           
            "Array.skins": [ "Texture.wild", "Texture.black", "Texture.red", "Texture.siamese" ]         
        }       
      },       
      "geometry": "Geometry.default",       
      "materials": [ { "*": "Material.default" } ],       
      "textures": [ "Array.skins[Entity.Variant]" ]     
    }   
  } 
}

Render Controllers[edit]

The Render Controller needs an identifier and needs to follow the format of "controller.render.<name>". This name needs to match the name set in the Client Entity Definitions JSON.

Render Controllers are a way for the player to determine what renders on the entity. Players can set the geometry, materials, textures, and part visibility of the entity. In addition to setting the keys directly, players can use arrays to have the entity choose between different options.

Example Array for geometry from the sheep JSON

       
"arrays": {         
  "geometries": {           
    "Array.geos": [ "Geometry.default", "Geometry.sheared" ]         
  }       
},       
"geometry": "Array.geos[Entity.Flags.SHEARED]",

Example Array for textures from the villager JSON

  
"arrays": {
  "textures": {
    "Array.skins": [ "Texture.farmer", "Texture.librarian", "Texture.priest", "Texture.smith", "Texture.butcher" ]
  }
},
"textures": [ "Array.skins[Entity.Variant]" ]

Example Array for materials from the spider JSON

       
"arrays": {         
  "materials": {           
    "Array.materials": [ "Material.default", "Material.invisible" ]         
  }       
},       
"materials": [ { "*": "Array.materials[Entity.Flags.INVISIBLE]" } ],

Example with part_visibility for turning on and off visibility of parts from Llama JSON:

 
{   
  "format_version": "1.8.0-beta.1",   
  "render_controllers": {     
    "controller.render.llama": {       
      "arrays": {         
        "textures": {           
          "Array.base": [ "Texture.creamy", "Texture.white", "Texture.brown", "Texture.gray" ],           
          "Array.decor": [ "Texture.decor_none", "Texture.decor_white", "Texture.decor_orange", "Texture.decor_magenta", "Texture.decor_light_blue", "Texture.decor_yellow", "Texture.decor_lime", "Texture.decor_pink", "Texture.decor_gray", "Texture.decor_silver", "Texture.decor_cyan", "Texture.decor_purple", "Texture.decor_blue", "Texture.decor_brown", "Texture.decor_green", "Texture.decor_red", "Texture.decor_black"]         
        }       
      },       
    "geometry": "Geometry.default",       
    "part_visibility": [ { "chest*": "Entity.Flags.CHESTED" } ],       
    "materials": [ { "*": "Material.default" } ],       
    "textures": ["Array.base[Entity.Variant]", "Array.decor[Entity.DecorTextureIndex]", "Texture.decor_none"]     
    }   
  }

Note The arrays for Materials and Part visibility are applied in the order specified. Materials and Part visibility specified later in the file will override previous materials or parts.

Material array example from Horse render controllers:

       
"materials": [         
  { "*": "Material.default" },         
  { "TailA": "Material.horse_hair" },         
  { "Mane": "Material.horse_hair" },         
  { "*Saddle*": "Material.horse_saddle" }       
  ],

Saddle will override Mane, which will override TailA, etc.

Attachables Documentation[edit]

This document contains a walkthrough on how to create new attachables definitions in Minecraft.

Overview[edit]

The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "attachables" directory are required for the armor to render on an entity – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Resource Packs

Getting Started[edit]

New attachables definitions are contained within a Resource Pack.

Attachables[edit]

Attachables are a way for you to specify what materials, textures, and geometry equipped armor will use.

In the root of the Resource Pack create a new folder and name it "attachables". In the "attachables" folder create a JSON file and give it a name. The JSON file needs a format version and minecraft:attachable information.

Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the attachables JSON to be used when using the Experimental Gameplay toggle.

Example attachables JSON for the chainmail_boots JSON

{ 
  "format_version": "1.8.0-beta.1", 
  "minecraft:attachable": { 
    "description": { 
      "identifier": "minecraft:chainmail_boots", 
      "materials": { 
        "default": "armor", 
        "enchanted": "armor_enchanted" 
      }, 
      "textures": { 
        "default": "textures/models/armor/chain_1", 
        "enchanted": 
        "textures/misc/enchanted_item_glint" 
      }, 
      "geometry": { 
        "default": "geometry.humanoid.armor.boots" 
      }, 
      "render_controllers": [ 
        "controller.render.armor" 
      ] 
    } 
  } 
}

The minecraft:attachable section contains the description for the attachable. Under description there are a number of things that you can set and have the client run on the attachable.

Identifier[edit]

The identifier is used to register the attachable with the server. In the attachables JSON the identifier sets the appearance of the entity (materials, textures, geometry, etc.) The matching identifier needs to match a corresponding identifier in the "items_client" JSON of the resource pack.

Materials, Texture, and Geometry[edit]

Players can set the materials, textures, and geometry used for the attachable in this section. Players can set one or more materials, textures, and geometries that can be used by the attachable. Players can set create user defined keys of when materials, textures and geometries are used. These keys are set in the Render Controllers JSON. Players can reference materials from the vanilla Minecraft Resource Pack or create their own. Custom materials, textures, and geometries should be placed in the corresponding folder at the root of the Resource Pack.

Render Controllers[edit]

Specifies the identifier of the Render Controller. This identifier needs to match the identifier of a corresponding JSON located in the "render_controllers" folder. Players can reference Render Controllers from the vanilla Minecraft Resource Pack or create their own. Custom Render Controllers should be in the "textures" folder at the root of the Resource Pack.

Server Entity Documentation[edit]

This document contains a walkthrough on the changes to the entity behavior JSONs in Minecraft.

Overview[edit]

The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – All JSON files in the "entities" directory are required for the behaviors to be applied to the entity – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world to use this feature in Behavior Packs.

Updates[edit]

Format version[edit]

Format version is no longer contained within "minecraft:entity". It is pulled out into its own section.

Important For the October Technical Preview the format version needs to be 1.8.0.-beta.1. This allows the entity behavior JSON to be used when using the Experimental Gameplay toggle.

Example

 
{   
  "format_version": "1.8.0-beta.1",   
  "minecraft:entity": {

Description[edit]

Under description there are a number of things that you can set about an entity.

Identifier[edit]

The identifier determines the behavior on the entity. The matching identifier in a Resource Pack sets the appearance of the entity (materials, textures, geometry, etc.)

minecraft:runtime_identifier[edit]

The "minecraft:runtime_identifier allows you to set what vanilla Minecraft entity's hard coded behaviors you want to set on your mob. For example, chicken laying eggs are currently a hard coded behavior. If you want a new entity to use this behavior (without having to replace the chicken) you can set the minecraft:runtime_identifier to the minecraft:chicken

Example:

       
"minecraft:runtime_identifier": {         
  "id": "minecraft:chicken"       
  },
minecraft:spawn_egg[edit]

The "minecraft:spawn_egg allows players to determine in the entity will use a spawn egg. If the value is true, the spawn egg shows up in the Creative Inventory. If the value is set to false, then it will not show up in the Creative Inventory.

Example:

       
  "minecraft:spawn_egg": {         
    "value": true       },
minecraft:is_summonable[edit]

" The "minecraft:is_summonable" allows players to have this entity summonable using the /summon command. If the value is true, the entity can be summoned using the /summon command. The entity name will also appear as part of the autocomplete for the command. If the value is false the entity cannot be summoned using the /summon command

        
  "minecraft:is_summonable": {         
    "value": true       
  },
minecraft:is_experimental[edit]

The "minecraft:is_experimental allows players to require the "Use Experimental Gameplay" toggle to be set to true for the entity to be used. If the value is set to false the entity can be used in normal gameplay.

Example:

       
"minecraft:is_experimental": 
  {         
    "value": true       
  }

Data Driven Spawning Documentation[edit]

This document contains a detailed walkthrough on how to Data Drive Spawning in Minecraft. As part of the effort to enable adding entities to the game from an add-on we now have the to add our entities to the spawning rules of a biome from JSON data. This document covers: – How to adjust the spawn conditions of mobs, including new mobs added to the game to spawn naturally in biomes. – How to add/remove a mob's spawn egg to the creative inventory and set the mob's spawn egg. – How to add/remove a to the /summon command.

Overview[edit]

The schema should follow the current Minecraft JSON paradigms. – Fields should be lower-case and use underscores (no spaces) – Field values should be direct where possible (floats should be just the float, not a string) – For the October Technical Preview you will need to enable the "Use Experimental Gameplay" option in the world

To add spawn eggs to the creative menu and/or allow the entities in the be summonable using the /command system

Spawn Rules[edit]

Getting Started New Spawn Rules are contained within a Behavior Pack. To begin, create a new folder named "spawn_rules" in the root of the Behavior Pack that you want to add the new biome spawn rules in. In the spawn_rules folder, create a JSON file and give it a name. The JSON file needs a format, description and conditions.

Important For the October Technical Preview the format version needs to be 1.8.0-beta.1. This allows Data Driven Spawning to be used when using the Experimental Gameplay toggle.

Spawn Rules information contains description and conditions.

Description[edit]

  • All Spawn Rules JSON need to have an ID (located under the description section). All IDs need to use namespacing.

Namespacing – All IDs need to be namespaced – Namespacing involves adding a "name:" prefix on the effect tag – For vanilla minecraft, we will use "minecraft:" prefix

Example Spawn Rules for the zombie

 
{   
  "format_version": "1.8.0-beta.1",   
  "minecraft:spawn_rules": {     
    "description": {       
      "identifier": "minecraft:zombie",       
      "population_control": "monster"     
    },     
    "conditions": [       
      {         
        "minecraft:spawns_on_surface": {},         
        "minecraft:brightness_filter": {           
          "min": 0,           
          "max": 7,           
          "adjust_for_weather": true         
        },         
        "minecraft:difficulty_filter": {           
          "min": "easy",           
          "max": "hard"         
        },         
        "minecraft:weight": {           
          "default": 100         
        },         
        "minecraft:herd": {           
          "min_size": 2,           
          "max_size": 4         
        },         
        "minecraft:permute_type": [           
          {             
            "weight": 95           
          },           
          {             
            "weight": 5,             
            "entity_type": "minecraft:zombie_villager"           
          }         
        ],         
        "minecraft:biome_filter": {           
          "test": "has_biome_tag", "operator": "===", "value": "monster"         
        }       
      }     
    ]   
  } 
}

When changing an existing mob use the ID that appears in the entity JSON for that entity. When creating your own mob, make sure the mobs have the same ID in all the entity's JSON files.

Spawn Rules also needs to define the pool that is used for population control. Each pool has their own spawn limit, By setting an entity to a pool it will spawn as long as that pool hasn't reached the spawn limit.

There are 3 pools that entities can be assigned to: – "animal" – "water_animal" – "monster"

Conditions[edit]

Conditions contain different components that players can use to customize natural biome spawning.

Condition Components[edit]

minecraft:spawns_on_surface This component allows the mob to spawn on the ground. Adding the component cause it to be true, removing it cause the mob to stop spawning on the surface.

minecraft:spawns_underwater This component allows the mob to spawn underwater. Adding the component cause it to be true, removing it cause the mob to stop spawning on the surface.

minecraft:brightness_filter This component allows players to set the light level range that causes the mob to spawn.

Parameters

Type Name Default Value Description
float min This is the minimum light level value that allows the mob to spawn
float max This is the maximum light level value that allows the mob to spawn
Bool adjust_for_weather This determines if weather can affect the light level conditions that cause the mob to spawn (allowing hostile mobs to spawn during the day when it rains.)

minecraft:weight This component allows players to give a priority to how often that mob should spawn. Mobs with lower weight values have a higher chance to spawn than mobs with higher weight values.

Type Name Default Value Description
float default This is the priority of the mob spawning

minecraft:difficulty_filter This component allows players determine what mobs spawn when certain difficulty levels are set.

Type Name Default Value Description
string default This is the minimum difficulty level that a mob spawns
string default This is the maximum difficulty level that a mob spawns

minecraft:herd This component allows players to determine the herd size of animals.

Type Name Default Value Description
Float min_size This is the minimum number of mobs that spawn in a herd
Float max_size This is the maximum number of mobs that spawn in a herd
String event This is an event that can be triggered from spawning
Float event_skip_count This is the number of mobs spawned that before the specified event is triggered

minecraft:biome_filter This component allows the players to specify which biomes the mob spawns in.

Example

         
  "minecraft:biome_filter": {           
    "any_of": [             
      {"test": "has_biome_tag", "operator":"===", "value": "river"},             
      {"test": "has_biome_tag", "operator":"===", "value": "swamp"}       
    ]
  }

Tags[edit]

Each biome in the game has one or more tags. These are used to determine what biomes mobs spawn in. Here is the list of Biome tags that can be used:

  • monster
  • animal
  • ocean
  • nether
  • the_end
  • mooshroom_island
  • plains
  • desert
  • jungle
  • taiga
  • extreme_hills
  • savanna
  • frozen
  • cold
  • lukewarm
  • warm
  • river
  • swamp
  • beach
  • flower_forest
  • forest
  • birch
  • dark_oak
  • hills
  • mutated
  • edge
  • lakes
  • plateau
  • deep
  • mesa
  • ice_plains
  • ice
  • mountain
  • shore
  • stone
  • roofed
  • mega

Tagged Biomes[edit]

  • Plains: animal, monster, plains
  • Desert: monster, desert
  • Mountain: animal, monster, extreme_hills
  • Forest: animal, monster, forest
  • Taiga: animal, monster, taiga
  • Swamp: animal, monster, swamp
  • River: river
  • Nether: nether
  • The End: the_end
  • Frozen Ocean: ocean, frozen
  • Frozen River: river, frozen
  • Snowy Tundra: frozen, ice_plain, ice
  • Snowy Mountains: frozen, ice, mountain
  • Mushroom Fields: mooshroom_island
  • Mushroom Fields Shore: mooshroom_island, shore
  • Beach: monster, beach, warm
  • Desert Hills: monster, desert, hills
  • Forest Hills: animal, monster, hills
  • Taiga Hills: animal, monster, taiga, hills
  • Mountain Edge: animal, monster, extreme_hills, edge, mountain
  • Jungle: animal, monster, jungle
  • Jungle Hills: animal, monster, jungle, hills
  • Jungle Edge: animal, monster, jungle, edge
  • Snowy Beach: monster, beach, cold
  • Stone Shore: monster, beach, stone
  • Birch Forest: animal, monster, birch, forest,
  • Birch Forest Hills: animal, monster, birch, forest, hills
  • Dark Forest: animal, monster, forest, roofed
  • Snowy Taiga: animal, monster, taiga, cold
  • Snowy Taiga Hills: animal, monster, taiga, cold, hills
  • Giant Tree Taiga: animal, monster, taiga, mega
  • Giant Tree Taiga Hills: animal, monster, taiga, mega, hills
  • Wooded Mountain: animal, monster, extreme_hills, forest, mountain
  • Savanna: animal, monster, savanna
  • Savanna Plateau: animal, monster, savanna
  • Mesa: monster
  • Mesa Plateau Stone: monster, plataeu
  • Mesa Plateau: monster, mesa
  • Ocean: ocean, monster
  • Deep Ocean: ocean, monster, deep
  • Warm Ocean: ocean, warm, monster
  • Deep Warm Ocean: ocean, warm, monster, deep
  • Lukewarm Ocean: ocean, lukewarm, monster
  • Deep Lukewarm Ocean: ocean, lukewarm, monster, deep
  • Cold Ocean: ocean, cold, monster
  • Deep Cold Ocean: ocean, cold, monster, deep
  • Frozen Ocean: ocean, frozen, monster
  • Deep Frozen Ocean: ocean, frozen, monster, deep
  • Plains M: animal, monster, plains, mutated
  • Swamp M: animal, monster, swamp, mutated
  • Snowy Tundra M: monster, frozen, ice_plains, mutated
  • Cold Taiga M: animal, monster, taiga, cold, mutated
  • Savanna M: animal, monster, savanna, mutated
  • Savanna Plateau M: animal, monster, savanna, plateau, mutated
  • Dark Forest M: animal, monster, roofed, forest, mutated
  • Desert M: monster, desert, mutated
  • Forest M: monster, flower_forest, forest, mutated
  • Taiga M: animal, monster, taiga, mutated
  • Jungle M: animal, monster, jungle, mutated
  • Jungle Edge M: animal, monster, jungle, edge, mutated
  • Mesa M: animal, monster, mesa, mutated
  • Mesa Plateau M: monster, mesa, plateau, mutated
  • Mesa Plateau Stone M: monster, mesa, plateau, mutated, stone
  • Birch Forest M: animal, monster, forest, birch, mutated
  • Birch Forest Hills M: animal, monster, forest, birch, mutated, hills
  • Giant Trees Taiga M: animal, monster, mutated, mega
  • Mountain M: animal, monster, extreme_hills, mutated
  • Mountain + M: animal, monster, extreme_hills, mutated, forest
  • Giant Tree Taiga Hills M: animal, monster, taiga, mega, hills, mutated

MoLang[edit]

Why Does MoLang Exist?[edit]

MoLang is a simple expression-based language designed for fast calculation of values at run-time. Its focus is solely to enable script-like capabilities in high-performance systems where JavaScript is not performant at scale. We need scripting capabilities in these low-level systems to support end-user modding capabilities, custom entities, their rendering, and animation.

Lexical Structure[edit]

The language structure is largely based on simple C-style syntax, focusing on handling math expressions. A script is made of either one expression for simple cases, or can be made of several where intermediate values are required or to help reduce compute time.

In all cases, the value of the last expression in a script provides the script's value. In a multi-expression script, all but the last expression must assign a value to a variable. The last expression can as well, but doesn't need to as it's value is assumed to be the used as the return value.

Values[edit]

  • Value types are concretely specified, or numeric if not.
  • All numerical values are floats.
  • Boolean values such as actor flags are converted to a float value of either 0.0 or 1.0 for values of false or true respectively.
  • For boolean tests, a float value equivalent to 0.0 is false, and anything not equal to 0.0 is true.
  • For array indices, floats are c-style cast to ints, and clamped at zero for negative values or wrapped by the array size for large values.
  • Other supported types are textures, materials, and geometry where they make sense (such as render controllers).
  • Errors generally return a value of 0.0.

Variables[edit]

There are several domains a variable may belong to:

Domain Variable Scope Example
Temp The current expression Temp.foo == Math.sin(Params.AnimTime); return Temp.foo * Temp.foo;
Entity The current entity, be it an actor, particle system, etc Entity.mySavedVar == Entity.mySavedVar + 1
Entity.Member Entity-specific values Entity.Member.GroundSpeed
Entity.Flags Entity-specific flags Entity.moo == Entity.Flags.BABY ? 4.1 : 2.3
Geometry The current render controller "geometry": "Array.geos[Entity.Flags.SHEARED]"
Material The current render controller "materials": [ { "*": "Material.default" }, { "leg*": "Material.legs" } ],
Texture The current render controller "textures": [ "Array.skins[Entity.Flags.SADDLED]" ]

Reserved Words[edit]

String Meaning
<float> Numerical constant value
( ) Parentheses for expression term evaluation control
[ ] Brackets for array access
Entity.Flags.<flag name> Access to an actor's flags
Math.<function> Various math functions (see below)
Params.<parameter name> Access to environment parameters
Temp.<variable name> Store an intermediate value for the duration of the current expression
Entity.<variable name> Store a value on the attached entity for later use
Geometry.<texture name> A reference to a texture named in the entity definition
Material.<texture name> A reference to a texture named in the entity definition
Texture.<texture name> A reference to a texture named in the entity definition
! && || < <== >== > === !== Logical operations
* / + - Basic math operations
<test> ? <if true> : <if false> Conditional operator
this The current value before executing the script (context sensitive)
return For complex expressions, this evaluates the following statement and stops execution of the script, returns the value computed

'all identifiers not in a scope listed above are reserved for future use'

Supported Math Functions[edit]

Name Function
Math.abs(<value>) absolute value
Math.sin(<value>) sine (in degrees)
Math.cos(<value>) cosine (in degrees)
Math.exp(<value>) e^<value>
Math.ln(<value>) natural log(<value>)
Math.pow(<base>, <exponent>) <base> ^ <exponent>
Math.sqrt(<value>) square root of <value>
Math.random(<low>, <high>) random value between <low> and <high> inclusive
Math.ceil(<value>) round <value> up to nearest integral number
Math.round(<value>) round <value> to nearest integral number
Math.trunc(<value>) round <value> towards zero
Math.floor(<value>) round <value> down to nearest integral number
Math.mod(<value>, <denominator>) return the remainder of value / denominator
Math.min(<A>, <B>) return lowest value of <A> or <B>
Math.max(<A>, <B>) return highest value of <A> or <B>
Math.clamp(<value>, <min>, <max>) clamp <value> to between <min> and <max> inclusive
Math.lerp(<start>, <end>, <0_to_1>) lerp from <start> to <end> via <0_to_1>
Math.lerprotate(<start>, <end>, <0_to_1>) lerp the shortest direction around a circle from <start> degrees to <end> degrees via <0_to_1>

Parameters[edit]

Name Value
Params.AnimTime Time since the current animation start
Params.DeltaTime Time since the last time this animation was updated
Params.KeyFrameLerpTime Normalized time between current key frames as [0-1]
Params.LifeTime Lifetime of the current actor
Params.FrameAlpha The render frame interpolation amount between AI frames (assuming the rendering is running at a different rate than the AI) as [0-1]

Members[edit]

Name Value
Entity.Member.GroundSpeed Entity speed in meters/sec
Entity.Member.IsInWater Is entity in water
Entity.Member.IsInWaterOrRain Is entity in water or rain
Entity.Member.TargetXRot Mob-relative X rotation to aim at current target
Entity.Member.TargetYRot Mob-relative Y rotation to aim at current target
Entity.Member.Variant Mob variant
Entity.Member.WalkPosition A complicated value roughly equal to the distance the mob has traveled
Entity.Member.WalkSpeed A complicated value roughly equal to the speed the mob is moving
Entity.Member.YawSpeed The yaw rotation speed of the mob in degrees/sec

Types, Values, and Variables[edit]

In general, all expression values are floats. In render controllers, some expressions result in a texture or material depending on the context. All array index expressions are processed as floats, and cast to integers when performing the final lookup into the array. Positive array indices wrap by the size of the array. Negative array indices clamp to 0.

Simple vs Complex Expresions[edit]

A simple expression is a single statement, the value of which is returned to the system that evaluated the expression. eg:

Math.sin(Params.AnimTime * 1.23)

A complex expression is one with multiple statements, each ending in a ';'. Each statement is evaluated in order. In the current implementation, the last statement requires the use of the return keyword and defines the resulting value of the expression. eg:

 Temp.myTempVar == Math.sin(Params.{{code|AnimTime * 1}}.23); Temp.myOtherTempVar == Math.cos(Params.LifeTime + 2.0); return Temp.{{code|myTempVar * Temp}}.myTempVar + Temp.myOtherTempVar;

Note that in a simple expression, ';' is not allowed, whereas in a complex expression, each statement requires a ';' including the last.

Domain Examples[edit]

Entity Definition Scripts[edit]

In the definition file there is a section for pre-computing values:

     
  "scripts": {       
    "pre_animation": [         
      "Entity.myConstant == (Math.cos(Params.{{code|AnimPos * 38}}.17) * Params.AnimSpeed;",         
      "Entity.myConstant2 == Math.exp(1.5);",       
    ]     
  },

These are executed immediately before animation and render controllers are processed, and stored in the entity. The purpose is to pre-compute any expensive and complex values you may want to reuse in your scripts, long-living index variable updates, or generally any one-off computation per render tick.

Animation and Animation Controller files[edit]

These are always numerical operations to control which animations are playing and how to animate bones. "Entity.<variable>" and "Entity.Flag.<entity flag>" refers to the entity currently being rendered. They have access to everything in the language except material, texture, and geometry types.

Render Controllers[edit]

There are a few different kinds of expressions here, where context implies what is allowed. As with animations, the entity accessors refer to the current entity, however depending on the context one also has access to materials, textures, and geometries. There are two sections in a render controller:

  • Array definitions (optional)
  • Resource usage (required)

The array definition section allows you to create arrays of resources by resource type if you so desire. These can then be referenced in the resource usage section.

  { "controller.render.<my render controller name>": { // array definitions "arrays": 
    { "materials": 
      { "Array.<array name>": [ 
          "Material.<material name>", "Array.<array name>, ...
        ], 
		... 
      }, 
      "textures": { 
        "Array.<array name>": [ "Texture.<texture name>", "Array.<array name>, ...], 
		... 
      }, 
      "geometries": { 
        "Array.<array name>": [ "Geometry.<geometry name>", "Array.<array name>", ...], 
	    ... 
      } 
    },
    // resource usage 
    "geometry": "<geometry expression>", 
    "materials": [ 
      { <string regex>: "<material expression>" }, 
      ... 
    ], 
    "textures": [ 
      "Array.<array name>[<numerical expression>]", 
      ... 
    ] 
  } 
} 

Array Expressions[edit]

For each of the three resource types (materials, textures, and geometry), you can define an array of resources. The name of the resource is the nice-name from the definition file. Using materials as an example:

     
"arrays": {       
  "materials": {         
    "Array.myArray1": [ "Material.a", "Material.b", "Material.c" ],         
    "Array.myArray2": [ "Material.d", "Material.e" ],         
    "Array.myArray3": [ "Array.myArray1", "Material.myArray2" ],         
    "Array.myArray4": [ "Array.myArray2", "Material.myArray3" ],         
    "Array.myArray5": [ "Array.myArray1", "Material.myArray1", "Material.myArray4" ],         
    "Array.myArray6": [ "Array.myArray1", "Material.f" ],         
    ...       
  },

Note that all elements of an array must be of the same type. eg: a texture array must only contain textures.

An array can reference any combination of zero or more arrays (including duplicates if desired) and/or zero or more materails (again, including duplicates if you like), and you can have as many arrays as you like, each with as many elements as you like. If an array includes arrays in its members, they do not need to be the same length. When indexing into an array in the resource usage section, you use numerical expressions. If the resulting number is negative, it will use zero as the index. Any non-negative index will converted to an integer, and will wrap based on the size of the array:

 index == max(0, <expression_result>) % <array_size>

Resource Expression[edit]

A resource expression must return a single resource of a specific type depending on the context. For example, in the

"geometry"

section, you must produce an expression that will result in a single geometry. Some examples:

 
  "geometry": "Geometry.myGeo" // always use a specific geometry 
  "geometry": "Entity.Flag.SHEARED ? Geometry.sheared : Geometry.woolly" // will pick a geo based on an entity flag 
  "geometry": "Array.myGeometries[Params.AnimTime]" // will repeatedly cycle through an array of geometries at a rate of one per second
  "geometry": "Entity.Flag.SLEEPING ? Geometry.mySleepingGeo : Array.myGeos[Math.cos(Params.{{code|AnimTime * 12}}.3 + 41.9) * 10 + 0.6]" // if sleeping, use specific geo, else flip through an array based on a cosine curve, using index zero for almost half the time while the cosine curve is negative

Resource Sections[edit]

Geometry[edit]

The geometry section specifies which geometry to use when rendering. As you can specify as many render controllers as you like in the definition file, a single render controller is only concerned with how to render a single geometry. Note that a geometry can be arbitrarily complex using any number of bones and polygons.

Materials[edit]

The materials section specifies how to map what material to what bone of the geometry. A single material is mapped to a whole bone. Material expressions are evaluated in the order listed. The first part of each statement is the name of the model part to apply the material to, and the second part is the material to use. The model part name can use * for wild-card matching of characters. For example:

     
"materials": [       
  { "*": "Material.default" },       
  { "TailA": "Array.hairColors[Entity.HairColor]" },       
  { "Mane": "Array.hairColors[Entity.HairColor]" },       
  { "*Saddle*": "Entity.IsLeatherSaddle ? Material.leatherSaddle : Material.ironSaddle" }     
],
  • This will start by applying Material.default to all model parts.
  • Next, it will set the material on a model part named "TailA" to the result of the expression "Array.hairColors[Entity.HairColor]". This will look up some previously created variable set on the entity named HairColor and use that to index into a material array called "Array.hairColors" defined in this render controller. This will overwrite the Material.default material set in the line above.
  • Third, it will look up the same material as the expression is identical, and apply it to the "Mane" model part.
  • Lastly, if will find any model part starting with, ending with, or containing "Saddle" (case sensitive) and change its material to either Material.leatherSaddle or Material.ironSaddle depending on the previously set entity variable Entity.IsLeatherSaddle.

Under the hood, it writes the desired look-up expression into the model part at initialization time. For each model part, the resulting expression is evaluated at run-time each frame when it is rendered.

Entity Definition Properties[edit]

These properties are part of the Entity Definition as a whole and go before the Component or Component Groups. Make sure to place them before any Components, Component Groups or Events sections or they will be ignored.

do_not_upgrade[edit]

Disables all current and future backwards compatibility for this entity. If new components or properties are added or changed to the vanilla version of this entity, they will not be applied.

format_version[edit]

Specifies the version of the game this entity was made in. If the version is lower than the current version, any changes made to the entity in the vanilla version will be applied to it.
Vanilla entities that use this
Example
{
 "minecraft:entity": {
   "format_version": "1.2.0",    "do_not_upgrade": {},
   "component_groups": {...} ...}

Entity Description Properties[edit]

This section defines properties required to identify and construct the entity

minecraft:identifier[edit]

Sets the name for this entity's description.
Parameters
Type Name Default Value Description
String id The identifier for this entity

minecraft:is_experimental[edit]

Sets whether or not this entity is experimental. Experimental entities are only enabled when the experimental toggle is enabled.
Parameters
Type Name Default Value Description
Boolean value false Flag to mark this entity as being experimental or not.

minecraft:is_summonable[edit]

Sets whether or not we can summon this entity using commands such as /summon.
Parameters
Type Name Default Value Description
Boolean value false Flag to mark this entity as being summonable or not.

minecraft:runtime_identifier[edit]

Sets the name for the Vanilla Minecraft identifier this entity will use to build itself from.
Parameters
Type Name Default Value Description
String id The identifier for the class to construct this entity with

minecraft:spawn_egg[edit]

Sets whether or not this entity has a spawn egg in the creative ui.
Parameters
Type Name Default Value Description
Boolean value false Set to determine if this entity has a spawn egg.

Attributes[edit]

minecraft:attack[edit]

Defines an entity's melee attack and any additional effects on it.
Parameters
Type Name Default Value Description
Range [a, b] damage Range of the random amount of damage the melee attack deals
Decimal effect_duration 0.0 Duration in seconds of the status ailment applied to the damaged entity
String effect_name Name of the status ailment to apply to an entity attacked by this entity's melee attack

minecraft:spell_effects[edit]

Defines what mob effects to add and remove to the entity when adding this component.
Parameters
Type Name Default Value Description
List add_effects List of effects to add to this entity after adding this component
Parameters
Type Name Default Value Description
String effect Effect to add to this entity. Includes 'duration' in seconds, 'amplifier' level, 'ambient' if it is to be considered an ambient effect, and 'visible' if the effect should be visible
String remove_effects List of names of effects to be removed from this entity after adding this component

minecraft:strength[edit]

Defines the entity's strength to carry items.
Parameters
Type Name Default Value Description
Integer max 5 The maximum strength of this entity
Integer value 1 The initial value of the strength

Properties[edit]

minecraft:ambient_sound_interval[edit]

Sets the entity's delay between playing its ambient sound.
Parameters
Type Name Default Value Description
Decimal range 16.0 Maximum time is seconds to randomly add to the ambient sound delay time.
Decimal value 8.0 Minimum time in seconds before the entity plays its ambient sound again

minecraft:can_climb[edit]

Allows this entity to climb up ladders.

minecraft:can_fly[edit]

Marks the entity as being able to fly, the pathfinder won't be restricted to paths where a solid block is required underneath it.

minecraft:can_power_jump[edit]

Allows the entity to power jump like the horse does in vanilla.

minecraft:collision_box[edit]

Sets the width and height of the Entity's collision box.
Parameters
Type Name Default Value Description
Decimal height 1.0 Height of the Collision Box in Blocks
Decimal width 1.0 Width and Depth of the Collision Box in Blocks

minecraft:color[edit]

Defines the entity's color. Only works on vanilla entities that have predefined color values (sheep, llama, shulker).
Parameters
Type Name Default Value Description
Integer value 0 The Palette Color value of the entity

minecraft:color2[edit]

Defines the entity's second texture color. Only works on vanilla entities that have a second predefined color values (tropical fish).
Parameters
Type Name Default Value Description
Integer value 0 The second Palette Color value of the entity

minecraft:default_look_angle[edit]

Sets this entity's default head rotation angle.
Parameters
Type Name Default Value Description
Decimal value 0.0f Angle in degrees

minecraft:equipment[edit]

Sets the Equipment table to use for this Entity.
Parameters
Type Name Default Value Description
String slot_drop_chance A list of slots with the chance to drop an equipped item from that slot.
String table The path to the equipment table, relative to the Behavior Pack's root

minecraft:fire_immune[edit]

Sets that this entity doesn't take damage from fire.

minecraft:floats_in_liquid[edit]

Sets that this entity can float in liquid blocks.

minecraft:flying_speed[edit]

Speed in Blocks that this entity flies at.
Parameters
Type Name Default Value Description
Decimal value 0.02 Flying speed in blocks per tick

minecraft:foot_size[edit]

Sets the number of blocks the entity can step without jumping.
Parameters
Type Name Default Value Description
Decimal value 0.5 The value of the size of the entity's step

minecraft:friction_modifier[edit]

Defines how much does friction affect this entity.
Parameters
Type Name Default Value Description
Decimal value 1.0 The higher the number, the more the friction affects this entity. A value of 1.0 means regular friction, while 2.0 means twice as much

minecraft:ground_offset[edit]

Sets the offset from the ground that the entity is actually at.
Parameters
Type Name Default Value Description
Decimal value 0.0 The value of the entity's offset from the terrain, in blocks

minecraft:input_ground_controlled[edit]

When configured as a rideable entity, the entity will be controlled using WASD controls.

minecraft:is_baby[edit]

Sets that this entity is a baby.

minecraft:is_charged[edit]

Sets that this entity is charged.

minecraft:is_chested[edit]

Sets that this entity is currently carrying a chest.

minecraft:is_dyeable[edit]

Allows dyes to be used on this entity to change its color.
Parameters
Type Name Default Value Description
String interact_text The text that will display when interacting with this entity with a dye when playing with Touch-screen controls

minecraft:is_ignited[edit]

Sets that this entity is currently on fire.

minecraft:is_saddled[edit]

Sets that this entity is currently saddled.

minecraft:is_shaking[edit]

Sets that this entity is currently shaking.

minecraft:is_sheared[edit]

Sets that this entity is currently sheared.

minecraft:is_stackable[edit]

Sets that this entity can be stacked.

minecraft:is_tamed[edit]

Sets that this entity is currently tamed.

minecraft:item_controllable[edit]

Defines what items can be used to control this entity while ridden
Parameters
Type Name Default Value Description
List control_items List of items that can be used to control this entity

minecraft:loot[edit]

Sets the loot table for what items this entity drops upon death.
Parameters
Type Name Default Value Description
String table The path to the loot table, relative to the Behavior Pack's root

minecraft:mark_variant[edit]

Additional variant value. Can be used to further differentiate variants.
Parameters
Type Name Default Value Description
Integer value 0 The ID of the variant. By convention, 0 is the ID of the base entity

minecraft:push_through[edit]

Sets the distance through which the entity can push through.
Parameters
Type Name Default Value Description
Decimal value 0.0 The value of the entity's push-through, in blocks

minecraft:scale[edit]

Sets the entity's visual size.
Parameters
Type Name Default Value Description
Decimal value 1.0 The value of the scale. 1.0 means the entity will appear at the scale they are defined in their model. Higher numbers make the entity bigger

minecraft:sound_volume[edit]

Sets the entity's base volume for sound effects.
Parameters
Type Name Default Value Description
Decimal value 1.0 The value of the volume the entity uses for sound effects

minecraft:type_family[edit]

Defines the families this entity belongs to.
Parameters
Type Name Default Value Description
List family List of family names

minecraft:variant[edit]

Used to differentiate the component group of a variant of an entity from others (e.g. ocelot, villager)
Parameters
Type Name Default Value Description
Integer value 0 The ID of the variant. By convention, 0 is the ID of the base entity

minecraft:walk_animation_speed[edit]

Sets the speed multiplier for this entity's walk animation speed.
Parameters
Type Name Default Value Description
Decimal value 1.0 The higher the number, the faster the animation for walking plays. A value of 1.0 means normal speed, while 2.0 means twice as fast

minecraft:wants_jockey[edit]

Sets that this entity wants to become a jockey.

Component IDs[edit]

JSON Name ID
0
minecraft.behavior.scared 0
minecraft:addrider -1014528905
minecraft:ageable 1092934985
minecraft:ambient_sound_interval -1314051310
minecraft:angry 725411499
minecraft:attack 1651346034
minecraft:behavior.avoid_mob_type 386517767
minecraft:behavior.beg 1346418048
minecraft:behavior.break_door -1798237626
minecraft:behavior.breed 51166360
minecraft:behavior.charge_attack -1921442265
minecraft:behavior.circle_around_anchor -698025586
minecraft:behavior.controlled_by_player 1633000292
minecraft:behavior.defend_village_target 1469600895
minecraft:behavior.door_interact -286762735
minecraft:behavior.dragonchargeplayer 1808565780
minecraft:behavior.dragondeath -1541162059
minecraft:behavior.dragonflaming -865288877
minecraft:behavior.dragonholdingpattern 1066617362
minecraft:behavior.dragonlanding -152352492
minecraft:behavior.dragonscanning -1003941066
minecraft:behavior.dragonstrafeplayer -1510265153
minecraft:behavior.dragontakeoff -1912535317
minecraft:behavior.drop_item_for 1846615759
minecraft:behavior.eat_block 1972447274
minecraft:behavior.enderman_leave_block -717580550
minecraft:behavior.enderman_take_block -537294220
minecraft:behavior.find_mount 731306871
minecraft:behavior.find_underwater_treasure -1602192311
minecraft:behavior.flee_sun -617664229
minecraft:behavior.float 1758503000
minecraft:behavior.float_wander -1122048364
minecraft:behavior.follow_caravan 9936402
minecraft:behavior.follow_mob -1524701626
minecraft:behavior.follow_owner 1213259599
minecraft:behavior.follow_parent 2127040136
minecraft:behavior.go_home -1579225026
minecraft:behavior.guardian_attack -579215554
minecraft:behavior.harvest_farm_block 10843010
minecraft:behavior.hurt_by_target -1710404297
minecraft:behavior.lay_down -2074934675
minecraft:behavior.lay_egg -1207740530
minecraft:behavior.leap_at_target 256926956
minecraft:behavior.look_at_entity -1735428573
minecraft:behavior.look_at_player -1892159379
minecraft:behavior.look_at_target -885375871
minecraft:behavior.look_at_trading_player -2094605693
minecraft:behavior.make_love -1551283431
minecraft:behavior.melee_attack 1848335663
minecraft:behavior.mount_pathing 1112137677
minecraft:behavior.move_indoors 2107078532
minecraft:behavior.move_through_village 779377630
minecraft:behavior.move_to_land -943551837
minecraft:behavior.move_to_water 1886139445
minecraft:behavior.move_towards_restriction 1288087401
minecraft:behavior.move_towards_target -166537884
minecraft:behavior.nearest_attackable_target -2032255557
minecraft:behavior.ocelot_sit_on_block -1327999383
minecraft:behavior.ocelotattack 560197714
minecraft:behavior.offer_flower -885387854
minecraft:behavior.open_door -906200433
minecraft:behavior.owner_hurt_by_target 530667419
minecraft:behavior.owner_hurt_target 995655261
minecraft:behavior.panic -169886247
minecraft:behavior.peek 211304085
minecraft:behavior.pet_sleep_with_owner 1379392240
minecraft:behavior.pickup_items 644287189
minecraft:behavior.play -505601580
minecraft:behavior.player_ride_tamed 603869698
minecraft:behavior.raid_garden -1145687602
minecraft:behavior.random_breach 928528911
minecraft:behavior.random_fly -446385505
minecraft:behavior.random_look_around 1177762851
minecraft:behavior.random_sitting 1722716662
minecraft:behavior.random_stroll -1643504294
minecraft:behavior.random_swim -1465281278
minecraft:behavior.ranged_attack -2093407250
minecraft:behavior.receive_love 1156694272
minecraft:behavior.restrict_open_door 715583988
minecraft:behavior.restrict_sun -382716017
minecraft:behavior.roll 817471653
minecraft:behavior.run_around_like_crazy -1390363669
minecraft:behavior.send_event -823429137
minecraft:behavior.share_items 2045906118
minecraft:behavior.silverfish_merge_with_stone 321908121
minecraft:behavior.silverfish_wake_up_friends 484391748
minecraft:behavior.skeleton_horse_trap 530952387
minecraft:behavior.slime_attack -1315951081
minecraft:behavior.slime_float -1480876341
minecraft:behavior.slime_keep_on_jumping -1844762087
minecraft:behavior.slime_random_direction 1437515506
minecraft:behavior.snacking 875141064
minecraft:behavior.sneeze 1528584076
minecraft:behavior.squid_dive 1626998843
minecraft:behavior.squid_flee 1304043261
minecraft:behavior.squid_idle 1741234679
minecraft:behavior.squid_move_away_from_ground 892387674
minecraft:behavior.squid_out_of_water -1347598607
minecraft:behavior.stay_while_sitting 1346980478
minecraft:behavior.stomp_attack -1851446496
minecraft:behavior.stomp_turtle_egg 851839416
minecraft:behavior.summon_entity -2005850647
minecraft:behavior.swell -1473132493
minecraft:behavior.swim_wander -1576142514
minecraft:behavior.swoop_attack 770804235
minecraft:behavior.take_flower 1218648257
minecraft:behavior.tempt 422904556
minecraft:behavior.trade_with_player -2048563493
minecraft:behavior.vex_copy_owner_target -643459543
minecraft:behavior.vex_random_move -1117822165
minecraft:behavior.wither_random_attack_pos_goal -528895885
minecraft:behavior.wither_target_highest_damage -1065562072
minecraft:boostable -8316315
minecraft:breathable -707187232
minecraft:breedable -1616430100
minecraft:bribeable 0
minecraft:burns_in_daylight 1256874605
minecraft:can_climb -550459594
minecraft:can_fly 985724318
minecraft:can_power_jump -763124853
minecraft:collision_box -1277663508
minecraft:color 1069623177
minecraft:color2 0
minecraft:damage_over_time 0
minecraft:damage_sensor -82616534
minecraft:default_look_angle -815556357
minecraft:environment_sensor 687748970
minecraft:equipment 714661022
minecraft:equippable -1164142226
minecraft:explode -1683058581
minecraft:fire_immune -1071767182
minecraft:floats_in_liquid 179778474
minecraft:flying_speed -570508595
minecraft:foot_size 1133270874
minecraft:friction_modifier -714364556
minecraft:genetics -82484670
minecraft:ground_offset -1816881803
minecraft:healable -54247424
minecraft:hurt_when_wet 237531867
minecraft:identifier 0
minecraft:input_ground_controlled -646415617
minecraft:insomnia -300455606
minecraft:interact -1996861528
minecraft:inventory 1941951218
minecraft:is_baby 1853172763
minecraft:is_charged 125340337
minecraft:is_chested -817599379
minecraft:is_dyeable 1381448355
minecraft:is_experimental 0
minecraft:is_ignited 905710223
minecraft:is_saddled 1037901616
minecraft:is_shaking 523951884
minecraft:is_sheared 1154836813
minecraft:is_stackable 1184456737
minecraft:is_summonable 0
minecraft:is_tamed 1646421078
minecraft:item_controllable 1868311069
minecraft:item_hopper -447601772
minecraft:jump.dynamic 945664737
minecraft:jump.static 1064987526
minecraft:leashable 893445039
minecraft:lookat -1329707008
minecraft:loot 1775814032
minecraft:mark_variant 663621689
minecraft:movement.amphibious 0
minecraft:movement.basic 3354475
minecraft:movement.fly -1487316136
minecraft:movement.generic 0
minecraft:movement.jump 1256268727
minecraft:movement.skip -1828832272
minecraft:movement.sway 0
minecraft:nameable -595398763
minecraft:navigation.climb -1075360945
minecraft:navigation.float -842998036
minecraft:navigation.fly -1997823129
minecraft:navigation.generic 0
minecraft:navigation.swim 1908076634
minecraft:navigation.walk 1909033775
minecraft:on_death -49357854
minecraft:on_friendly_anger -1009986313
minecraft:on_hurt -1028603471
minecraft:on_hurt_by_player -599009831
minecraft:on_ignite -1911489054
minecraft:on_start_landing -555648368
minecraft:on_start_takeoff 426083399
minecraft:on_target_acquired 1063277906
minecraft:on_target_escape -1373130027
minecraft:on_wake_with_owner -1543219003
minecraft:peek -863721039
minecraft:projectile 1922456869
minecraft:push_through -138030768
minecraft:rail_movement -78235634
minecraft:rail_sensor 1273161273
minecraft:rideable 1656173828
minecraft:runtime_identifier 0
minecraft:scaffolding_climber 169799877
minecraft:scale 77854436
minecraft:scale_by_age 64881972
minecraft:shareables 1301057082
minecraft:shooter 184150118
minecraft:sittable -1376274106
minecraft:sound_volume 937951776
minecraft:spawn_egg 0
minecraft:spawn_entity 1991964333
minecraft:spell_effects 523264365
minecraft:strength 648564399
minecraft:tameable 932870003
minecraft:tamemount 1615660288
minecraft:target_nearby_sensor 1309819882
minecraft:teleport -1900891127
minecraft:tick_world -381759296
minecraft:timer 1862095863
minecraft:trade_table 50480315
minecraft:transformation -457894577
minecraft:trusting 936499892
minecraft:type_family -255011285
minecraft:variant -1789583977
minecraft:walk_animation_speed 972393614
minecraft:wants_jockey 1832515141

Components[edit]

minecraft:addrider[edit]

Adds a rider to the entity. Requires minecraft:rideable.
Parameters
Type Name Default Value Description
String entity_type The entity type that will be riding this entity

minecraft:ageable[edit]

Adds a timer for the entity to grow up. It can be accelerated by giving the entity the items it likes as defined by feedItems.
Parameters
Type Name Default Value Description
List drop_items List of items that the entity drops when it grows up.
Decimal duration 1200.0 Amount of time before the entity grows
List feedItems List of items that can be fed to the entity. Includes 'item' for the item name and 'growth' to define how much time it grows up by
String grow_up Event to run when this entity grows up

minecraft:angry[edit]

Defines the entity's 'angry' state using a timer.
Parameters
Type Name Default Value Description
Boolean broadcastAnger false If true, other entities of the same entity definition within the broadcastRange will also become angry
Integer broadcastRange 20 Distance in blocks within which other entities of the same entity definition will become angry
String calm_event Event to run after the number of seconds specified in duration expires (when the entity stops being 'angry')
Integer duration 25 The amount of time in seconds that the entity will be angry
Integer duration_delta 0 Variance in seconds added to the duration [-delta, delta]

minecraft:boostable[edit]

Defines the conditions and behavior of a rideable entity's boost
Parameters
Type Name Default Value Description
List boost_items List of items that can be used to boost while riding this entity. Each item has the following properties:
Parameters
Type Name Default Value Description
Integer damage 1 This is the damage that the item will take each time it is used
String item Name of the item that can be used to boost
String replaceItem The item used to boost will become this item once it is used up
Integer duration 3 Time in seconds for the boost
Decimal speed_multiplier 1.0 Factor by which the entity's normal speed increases. E.g. 2.0 means go twice as fast

minecraft:breathable[edit]

Defines what blocks this entity can breathe in and gives them the ability to suffocate
Parameters
Type Name Default Value Description
List breatheBlocks List of blocks this entity can breathe in, in addition to the above
Boolean breathesAir true If true, this entity can breathe in air
Boolean breathesLava false If true, this entity can breathe in lava
Boolean breathesSolids false If true, this entity can breathe in solid blocks
Boolean breathesWater false If true, this entity can breathe in water
Boolean generatesBubbles true If true, this entity will have visible bubbles while in water
Decimal inhaleTime 0.0 Time in seconds to recover breath to maximum
List nonBreatheBlocks List of blocks this entity can't breathe in, in addition to the above
Integer suffocateTime -20 Time in seconds between suffocation damage
Integer totalSupply 15 Time in seconds the entity can hold its breath

minecraft:breedable[edit]

Defines the way an entity can get into the 'love' state.
Parameters
Type Name Default Value Description
Boolean allowSitting false If true, entities can breed while sitting
Boolean blend_attributes true If true, the entities will blend their attributes in the offspring after they breed. For example, horses blend their health, movement, and jump_strength in their offspring.
Decimal breedCooldown 60.0 Time in seconds before the Entity can breed again
List breedItems The list of items that can be used to get the entity into the 'love' state
List breedsWith The list of entity definitions that this entity can breed with.
Parameters
Type Name Default Value Description
String babyType The entity definition of this entity's babies
String breed_event Event to run when this entity breeds
String mateType The entity definition of this entity's mate
Boolean causes_pregnancy false If true, the entity will become pregnant instead of spawning a baby.
List environment_requirements The list of nearby block requirements to get the entity into the 'love' state.
block 
Description
The block types required nearby for the entity to breed.
count 
Description
The number of the required block types nearby for the entity to breed.
radius 
Description
How many blocks radius from the mob's center to search in for the required blocks. Bounded between 0 and 16.
Decimal extraBabyChance 0.0 Chance that up to 16 babies will spawn between 0.0 and 1.0, where 1.0 is 100%
Boolean inheritTamed true If true, the babies will be automatically tamed if its parents are
JSON Object mutation_factor Determines how likely the babies are to NOT inherit one of their parent's variances. Values are between 0.0 and 1.0, with a higher number meaning more likely to mutate
Parameters
Type Name Default Value Description
Decimal color 0.0 The percentage chance of a mutation on the entity's color
Decimal extra_variant 0.0 The percentage chance of a mutation on the entity's extra variant type
Decimal variant 0.0 The percentage chance of a mutation on the entity's variant type
Boolean requireTame true If true, the entities need to be tamed first before they can breed.

minecraft:bribeable[edit]

Defines the way an entity can get into the 'bribed' state.
Parameters
Type Name Default Value Description
Decimal bribe_cooldown 2.0 Time in seconds before the Entity can be bribed again
List bribe_items The list of items that can be used to bribe the entity

minecraft:burns_in_daylight[edit]

Specifies if/how a mob burns in daylight.

minecraft:damage_over_time[edit]

Applies defined amount of damage to the entity at specified intervals
Parameters
Type Name Default Value Description
Integer damagePerHurt 1 Amount of damage caused each hurt
Integer timeBetweenHurt 0 Time in seconds between damage

minecraft:damage_sensor[edit]

Defines what events to call when this entity is damaged by specific entities or items. Can be either an array or a single instance.
Parameters
Type Name Default Value Description
String cause Type of damage that triggers this set of events
Boolean deals_damage true If true, the damage dealt to the entity will take off health from it. Set to false to make the entity ignore that damage
List on_damage List of triggers with the events to call when taking this specific kind of damage. Allows specifying filters for entity definitions and events

minecraft:environment_sensor[edit]

Creates a trigger based on environment conditions.
Parameters
Type Name Default Value Description
List on_environment The list of triggers that fire when the environment conditions match the given filter criteria.

minecraft:equippable[edit]

Defines an entity's behavior for having items equipped to it
Parameters
Type Name Default Value Description
List slots List of slots and the item that can be equipped
Parameters
Type Name Default Value Description
List accepted_items The list of items that can go in this slot
String interact_text Text to be displayed when the entity can be equipped with this item when playing with Touch-screen controls
String item Name of the item that can be equipped for this slot
String on_equip Event to trigger when this entity is equipped with this item
String on_unequip Event to trigger when this item is removed from this entity
Integer slot 0 The slot number of this slot

minecraft:explode[edit]

Defines how the entity explodes.
Parameters
Type Name Default Value Description
Boolean breaks_blocks true If true, the explosion will destroy blocks in the explosion radius
Boolean causesFire false If true, blocks in the explosion radius will be set on fire
Boolean destroyAffectedByGriefing false If true, whether the explosion breaks blocks is affected by the mob griefing game rule
Boolean fireAffectedByGriefing false If true, whether the explosion causes fire is affected by the mob griefing game rule
Range [a, b] fuseLength [0.0, 0.0] The range for the random amount of time the fuse will be lit before exploding. A negative value means the explosion will be immediate
Boolean fuseLit false If true, the fuse is already lit when this component is added to the entity
Decimal maxResistance Infinite Blocks with less resistance than this value will be broken by the explosion
Decimal power 3.0 The radius of the explosion in blocks and the amount of damage the explosion deals

minecraft:genetics[edit]

Defines the way a mob's genes and alleles are passed on to it's offspring, and how those traits manifest in the child. Compatible parent genes are crossed together, the alleles are handed down from the parents to the child, and any matching genetic variants fire off JSON events to modify the child and express the traits.
Parameters
Type Name Default Value Description
List genes The list of genes that this entity has and will cross with a partner during breeding.
Parameters
Type Name Default Value Description
Integer allele_range The range of positive integer allele values for this gene. Spawned mobs will have a random number in this range assigned to them.
Parameters
Type Name Default Value Description
Integer range_max 0 Upper bound of the allele values for this gene.
Integer range_min 0 Lower bound of the allele values for this gene.
List genetic_variants The list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied.
Parameters
Type Name Default Value Description
String birth_event Event to run when this mob is created and matches the above allele conditions.
Integer both_allele -1 If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with both. Can also be a range of integers.
Integer either_allele -1 If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with either. Can also be a range of integers.
Integer hidden_allele -1 If this value is non-negative, compare the mob's hidden allele with this value for a match. Can also be a range of integers.
Integer main_allele -1 If this value is non-negative, compare the mob's main allele with this value for a match. Can also be a range of integers.
String name The name of the gene.
Decimal mutation_rate 0.03125 Chance that an allele will be replaced with a random one instead of the parent's allele during birth.

minecraft:healable[edit]

Defines the interactions with this entity for healing it.
Parameters
Type Name Default Value Description
Minecraft Filter filters The list of conditions for this trigger
Boolean force_use false Determines if item can be used regardless of entity being full health
List items The list of items that can be used to heal this entity
Parameters
Type Name Default Value Description
Minecraft Filter filters The filters to test before applying any healing for the item
Decimal heal_amount 1.0 The amount of health this entity gains when fed this item
String item Name of the item this entity likes and can be used to heal this entity

minecraft:hurt_when_wet[edit]

Specifies if an actor is hurt when wet.

minecraft:insomnia[edit]

Adds a timer since last rested to see if phantoms should spawn.
Parameters
Type Name Default Value Description
Decimal days_until_insomnia 3.0 Number of days the mob has to stay up until the insomnia effect begins.

minecraft:interact[edit]

Defines interactions with this entity.
Parameters
Type Name Default Value Description
JSON Object add_items Loot table with items to add to the player's inventory upon successful interaction
Parameters
Type Name Default Value Description
String table File path, relative to the Behavior Pack's path, to the loot table file
Decimal cooldown 0.0 Time in seconds before this entity can be interacted with again
Integer hurt_item 0 The amount of damage the item will take when used to interact with this entity. A value of 0 means the item won't lose durability
String interact_text Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls
String on_interact Event to fire when the interaction occurs
JSON Object particle_on_start Particle effect that will be triggered at the start of the interaction
particle_offset_towards_interactor 
Description
Whether or not the particle will appear closer to who performed the interaction
particle_type 
Description
The type of particle that will be spawned
particle_y_offset 
Description
Will offset the particle this amount in the y direction
String play_sounds List of sounds to play when the interaction occurs
String spawn_entities List of entities to spawn when the interaction occurs
JSON Object spawn_items Loot table with items to drop on the ground upon successful interaction
Parameters
Type Name Default Value Description
String table File path, relative to the Behavior Pack's path, to the loot table file
Boolean swing false If true, the player will do the 'swing' animation when interacting with this entity
String transform_to_item The item used will transform to this item upon successful interaction. Format: itemName:auxValue
Boolean use_item false If true, the interaction will use an item

minecraft:inventory[edit]

Defines this entity's inventory properties.
Parameters
Type Name Default Value Description
Integer additional_slots_per_strength 0 Number of slots that this entity can gain per extra strength
Boolean can_be_siphoned_from false If true, the contents of this inventory can be removed by a hopper
String container_type none Type of container this entity has. Can be horse, minecart_chest, minecart_hopper, inventory, container or hopper
Integer inventory_size 5 Number of slots the container has
Boolean private false If true, only the entity can access the inventory
Boolean restrict_to_owner false If true, the entity's inventory can only be accessed by its owner or itself

minecraft:item_hopper[edit]

Determines that this entity is an item hopper

minecraft:jump.dynamic[edit]

Defines a dynamic type jump control that will change jump properties based on the speed modifier of the mob.

minecraft:jump.static[edit]

Gives the entity the ability to jump.
Parameters
Type Name Default Value Description
Decimal jump_power 0.42 The initial vertical velocity for the jump

minecraft:leashable[edit]

Allows this entity to be leashed and Defines the conditions and events for this entity when is leashed.
Parameters
Type Name Default Value Description
Decimal hard_distance 6.0 Distance in blocks at which the leash stiffens, restricting movement
Decimal max_distance 10.0 Distance in blocks at which the leash breaks
String on_leash Event to call when this entity is leashed
String on_unleash Event to call when this entity is unleashed
Decimal soft_distance 4.0 Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it

minecraft:lookat[edit]

Defines the behavior when another entity looks at this entity.
Parameters
Type Name Default Value Description
String filters player Defines the entities that can trigger this component
Range [a, b] look_cooldown [0.0, 0.0] The range for the random amount of time during which the entity is 'cooling down' and won't get angered or look for a target
String look_event Event to run when the entities specified in filters look at this entity
Boolean mAllowInvulnerable false If true, invulnerable entities (e.g. Players in creative mode) are considered valid targets
Decimal searchRadius 10.0 Maximum distance this entity will look for another entity looking at it
Boolean setTarget true If true, this entity will set the attack target as the entity that looked at it

minecraft:movement.amphibious[edit]

This move control allows the mob to swim in water and walk on land.
Parameters
Type Name Default Value Description
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:movement.basic[edit]

This component accents the movement of an entity.
Parameters
Type Name Default Value Description
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:movement.fly[edit]

This move control causes the mob to fly.
Parameters
Type Name Default Value Description
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:movement.generic[edit]

This move control allows a mob to fly, swim, climb, etc.
Parameters
Type Name Default Value Description
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:movement.jump[edit]

Move control that causes the mob to jump as it moves with a specified delay between jumps.
Parameters
Type Name Default Value Description
Range [a, b] jump_delay [0.0, 0.0] Delay after landing when using the slime move control.
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:movement.skip[edit]

This move control causes the mob to hop as it moves.
Parameters
Type Name Default Value Description
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:movement.sway[edit]

This move control causes the mob to sway side to side giving the impression it is swimming.
Parameters
Type Name Default Value Description
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.

minecraft:nameable[edit]

Allows this entity to be named (e.g. using a name tag)
Parameters
Type Name Default Value Description
Boolean allowNameTagRenaming true If true, this entity can be renamed with name tags
Boolean alwaysShow false If true, the name will always be shown
String default_trigger Trigger to run when the entity gets named
JSON Object name_actions Describes the special names for this entity and the events to call when the entity acquires those names
Parameters
Type Name Default Value Description
String name_filter List of special names that will cause the events defined in 'on_named' to fire
String on_named Event to be called when this entity acquires the name specified in 'name_filter'

minecraft:navigation.climb[edit]

Allows this entity to generate paths that include vertical walls like the vanilla Spiders do.
Parameters
Type Name Default Value Description
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water

minecraft:navigation.float[edit]

Allows this entity to generate paths by flying around the air like the regular Ghast.
Parameters
Type Name Default Value Description
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water

minecraft:navigation.fly[edit]

Allows this entity to generate paths in the air like the vanilla Parrots do.
Parameters
Type Name Default Value Description
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water

minecraft:navigation.generic[edit]

Allows this entity to generate paths by walking, swimming, flying and/or climbing around and jumping up and down a block.
Parameters
Type Name Default Value Description
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water

minecraft:navigation.swim[edit]

Allows this entity to generate paths that include water.
Parameters
Type Name Default Value Description
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water

minecraft:navigation.walk[edit]

Allows this entity to generate paths by walking around and jumping up and down a block like regular mobs.
Parameters
Type Name Default Value Description
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water

minecraft:peek[edit]

Defines the entity's 'peek' behavior, defining the events that should be called during it
Parameters
Type Name Default Value Description
String on_close Event to call when the entity is done peeking
String on_open Event to call when the entity starts peeking
String on_target_open Event to call when the entity's target entity starts peeking

minecraft:projectile[edit]

Allows the entity to be a thrown entity.
Parameters
Type Name Default Value Description
Decimal angleoffset 0.0 Determines the angle at which the projectile is thrown
Boolean catchFire false If true, the entity hit will be set on fire
Boolean critParticleOnHurt false If true, the projectile will produce additional particles when a critical hit happens
Boolean destroyOnHurt false If true, this entity will be destroyed when hit
String filter Entity Definitions defined here can't be hurt by the projectile
Boolean fireAffectedByGriefing false If true, whether the projectile causes fire is affected by the mob griefing game rule
Decimal gravity 0.05 The gravity applied to this entity when thrown. The higher the value, the faster the entity falls
String hitSound The sound that plays when the projectile hits something
Boolean homing false If true, the projectile homes in to the nearest entity
Decimal inertia 0.99 The fraction of the projectile's speed maintained every frame while traveling in air
Boolean isdangerous false If true, the projectile will be treated as dangerous to the players
Boolean knockback true If true, the projectile will knock back the entity it hits
Boolean lightning false If true, the entity hit will be struck by lightning
Decimal liquid_inertia 0.6 The fraction of the projectile's speed maintained every frame while traveling in water
Boolean multipletargets true If true, the projectile can hit multiple entities per flight
Vector [a, b, c] offset [0.0, 0.5, 0.0] The offset from the entity's anchor where the projectile will spawn
Decimal onFireTime 5.0 Time in seconds that the entity hit will be on fire for
String particle iconcrack Particle to use upon collision
Integer potionEffect -1 Defines the effect the arrow will apply to the entity it hits
Decimal power 1.3 Determines the velocity of the projectile
Boolean reflectOnHurt false If true, this entity will be reflected back when hit
Boolean semirandomdiffdamage false If true, damage will be randomized based on damage and speed
String shootSound The sound that plays when the projectile is shot
Boolean shoottarget true If true, the projectile will be shot towards the target of the entity firing it
Boolean shouldbounce false If true, the projectile will bounce upon hit
Boolean splashPotion false If true, the projectile will be treated like a splash potion
Decimal splashRange 4.0 Radius in blocks of the 'splash' effect
Decimal uncertaintyBase 0.0 The base accuracy. Accuracy is determined by the formula uncertaintyBase – difficultyLevel * uncertaintyMultiplier
Decimal uncertaintyMultiplier 0.0 Determines how much difficulty affects accuracy. Accuracy is determined by the formula uncertaintyBase – difficultyLevel * uncertaintyMultiplier

minecraft:rail_movement[edit]

Defines the entity's movement on the rails. An entity with this component is only allowed to move on the rail.
Parameters
Type Name Default Value Description
Decimal max_speed 0.4 Maximum speed that this entity will move at when on the rail

minecraft:rail_sensor[edit]

Defines the behavior of the entity when the rail gets activated or deactivated.
Parameters
Type Name Default Value Description
Boolean check_block_types false If true, on tick this entity will trigger its on_deactivate behavior
Boolean eject_on_activate true If true, this entity will eject all of its riders when it passes over an activated rail
Boolean eject_on_deactivate false If true, this entity will eject all of its riders when it passes over a deactivated rail
String on_activate Event to call when the rail is activated
String on_deactivate Event to call when the rail is deactivated
Boolean tick_command_block_on_activate true If true, command blocks will start ticking when passing over an activated rail
Boolean tick_command_block_on_deactivate false If false, command blocks will stop ticking when passing over a deactivated rail

minecraft:rideable[edit]

Determines whether this entity can be ridden. Allows specifying the different seat positions and quantity.
Parameters
Type Name Default Value Description
Integer controlling_seat 0 The seat that designates the driver of the entity
Boolean crouching_skip_interact true If true, this entity can't be interacted with if the entity interacting with it is crouching
List family_types List of entities that can ride this entity
String interact_text The text to display when the player can interact with the entity when playing with Touch-screen controls
Boolean pull_in_entities false If true, this entity will pull in entities that are in the correct family_types into any available seats
Boolean rider_can_interact false If true, this entity will be picked when looked at by the rider
Integer seat_count 1 The number of entities that can ride this entity at the same time
List seats The list of positions and number of riders for each position for entities riding this entity
Parameters
Type Name Default Value Description
Decimal lock_rider_rotation 181.0 Angle in degrees that a rider is allowed to rotate while riding this entity. Omit this property for no limit
Integer max_rider_count 0 Defines the maximum number of riders that can be riding this entity for this seat to be valid
Integer min_rider_count 0 Defines the minimum number of riders that need to be riding this entity before this seat can be used
Vector [a, b, c] position [0.0, 0.0, 0.0] Position of this seat relative to this entity's position
Decimal rotate_rider_by 0.0 Offset to rotate riders by

minecraft:scaffolding_climber[edit]

Allows the player to detect and manuever on the scaffolding block.

minecraft:scale_by_age[edit]

Defines the entity's size interpolation based on the entity's age.
Parameters
Type Name Default Value Description
Decimal end_scale 1.0 Ending scale of the entity when it's fully grown
Decimal start_scale 1.0 Initial scale of the newborn entity

minecraft:shareables[edit]

Defines a list of items the mob wants to share. Each item must have the following parameters:
Parameters
Type Name Default Value Description
List items List of items that the entity wants to share
craft_into 
Description
Defines the item this entity wants to craft with the item defined above. Should be an item name
item 
Description
The name of the item
surplus_amount 
Description
Number of this item considered extra that the entity wants to share
want_amount 
Description
Number of this item this entity wants to share

minecraft:shooter[edit]

Defines the entity's ranged attack behavior.
Parameters
Type Name Default Value Description
Integer auxVal -1 ID of the Potion effect to be applied on hit
String def Entity definition to use as projectile for the ranged attack. The entity definition must have the projectile component to be able to be shot as a projectile

minecraft:sittable[edit]

Defines the entity's 'sit' state.
Parameters
Type Name Default Value Description
String sit_event Event to run when the entity enters the 'sit' state
String stand_event Event to run when the entity exits the 'sit' state

minecraft:spawn_entity[edit]

Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).
Parameters
Type Name Default Value Description
Integer max_wait_time 600 Maximum amount of time to randomly wait in seconds before another entity is spawned
Integer min_wait_time 300 Minimum amount of time to randomly wait in seconds before another entity is spawned
String spawn_entity Identifier of the entity to spawn. Leave empty to spawn the item defined above instead
String spawn_event minecraft:entity_born Event to call when the entity is spawned
String spawn_item egg Name of the item to spawn
String spawn_method born Method to use to spawn the entity
String spawn_sound plop Name of the sound effect to play when the entity is spawned

minecraft:tameable[edit]

Defines the rules for a mob to be tamed by the player.
Parameters
Type Name Default Value Description
Decimal probability 1.0 The chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100%
List tameItems The list of items that can be used to tame this entity
String tame_event Event to run when this entity becomes tamed

minecraft:tamemount[edit]

Allows the Entity to be tamed by mounting it.
Parameters
Type Name Default Value Description
Integer attemptTemperMod 5 The amount the entity's temper will increase when mounted
JSON Object autoRejectItems The list of items that, if carried while interacting with the entity, will anger it
Parameters
Type Name Default Value Description
String item Name of the item this entity dislikes and will cause it to get angry if used while untamed
JSON Object feedItems The list of items that can be used to increase the entity's temper and speed up the taming process
Parameters
Type Name Default Value Description
String item Name of the item this entity likes and can be used to increase this entity's temper
Decimal temperMod 0.0 The amount of temper this entity gains when fed this item
String feed_text The text that shows in the feeding interact button
Integer maxTemper 100 The maximum value for the entity's random starting temper
Integer minTemper 0 The minimum value for the entity's random starting temper
String ride_text The text that shows in the riding interact button
String tame_event Event that triggers when the entity becomes tamed

minecraft:target_nearby_sensor[edit]

Defines the entity's range within which it can see or sense other entities to target them.
Parameters
Type Name Default Value Description
Decimal inside_range 1.0 Maximum distance in blocks that another entity will be considered in the 'inside' range
String on_inside_range Event to call when an entity gets in the inside range. Can specify 'event' for the name of the event and 'target' for the target of the event
String on_outside_range Event to call when an entity gets in the outside range. Can specify 'event' for the name of the event and 'target' for the target of the event
Decimal outside_range 5.0 Maximum distance in blocks that another entity will be considered in the 'outside' range

minecraft:teleport[edit]

Defines an entity's teleporting behavior.
Parameters
Type Name Default Value Description
Decimal darkTeleportChance 0.01 Modifies the chance that the entity will teleport if the entity is in darkness
Decimal lightTeleportChance 0.01 Modifies the chance that the entity will teleport if the entity is in daylight
Decimal maxRandomTeleportTime 20.0 Maximum amount of time in seconds between random teleports
Decimal minRandomTeleportTime 0.0 Minimum amount of time in seconds between random teleports
Vector [a, b, c] randomTeleportCube [32.0, 16.0, 32.0] Entity will teleport to a random position within the area defined by this cube
Boolean randomTeleports true If true, the entity will teleport randomly
Decimal targetDistance 16.0 Maximum distance the entity will teleport when chasing a target
Decimal target_teleport_chance 1.0 The chance that the entity will teleport between 0.0 and 1.0. 1.0 means 100%

minecraft:tick_world[edit]

Defines if the entity ticks the world and the radius around it to tick.
Parameters
Type Name Default Value Description
Decimal distance_to_players 128 The distance at which the closest player has to be before this entity despawns. This option will be ignored if never_despawn is true. Min: 128 blocks.
Boolean never_despawn true If true, this entity will not despawn even if players are far away. If false, distance_to_players will be used to determine when to despawn.
Positive Integer radius 2 The area around the entity to tick. Default: 2. Allowed range: 2-6.

minecraft:timer[edit]

Adds a timer after which an event will fire.
Parameters
Type Name Default Value Description
Boolean looping true If true, the timer will restart every time after it fires
Boolean randomInterval true If true, the amount of time on the timer will be random between the min and max values specified in time
Range [a, b] time [0.0, 0.0] Amount of time in seconds for the timer. Can be specified as a number or a pair of numbers (min and max)
String time_down_event Event to fire when the time on the timer runs out

minecraft:trade_table[edit]

Defines this entity's ability to trade with players.
Parameters
Type Name Default Value Description
String display_name Name to be displayed while trading with this entity
String table File path relative to the resource pack root for this entity's trades

minecraft:transformation[edit]

Defines an entity's transformation from the current definition into another
Parameters
Type Name Default Value Description
JSON Object add List of components to add to the entity after the transformation
Parameters
Type Name Default Value Description
List component_groups Names of component groups to add
String begin_transform_sound Sound to play when the transformation starts
JSON Object delay Defines the properties of the delay for the transformation
Parameters
Type Name Default Value Description
Decimal block_assist_chance 0.0 Chance that the entity will look for nearby blocks that can speed up the transformation. Value must be between 0.0 and 1.0
Decimal block_chance 0.0 Chance that, once a block is found, will help speed up the transformation
Integer block_max 0 Maximum number of blocks the entity will look for to aid in the transformation. If not defined or set to 0, it will be set to the block radius
Integer block_radius 0 Distance in Blocks that the entity will search for blocks that can help the transformation
List block_types List of blocks that can help the transformation of this entity
Boolean keep_owner If this entity is owned by another entity, it should remain owned after transformation.
Decimal value 0.0 Time in seconds before the entity transforms
Boolean drop_equipment Cause the entity to drop all equipment upon transformation
String into Entity Definition that this entity will transform into
String transformation_sound Sound to play when the entity is done transforming

minecraft:trusting[edit]

Defines the rules for a mob to trust players.
Parameters
Type Name Default Value Description
Decimal probability 1.0 The chance of the entity trusting with each item use between 0.0 and 1.0, where 1.0 is 100%
String trust_event Event to run when this entity becomes trusting
List trust_items The list of items that can be used to get the entity to trust players

AI Goals[edit]

minecraft.behavior.scared[edit]

Allows the a mob to become scared when the weather outside is thundering
Parameters
Type Name Default Value Description
Integer sound_interval 0 The interval in which a sound will play when active in a 1/delay chance to kick off

minecraft:behavior.avoid_mob_type[edit]

Allows this entity to avoid certain mob types.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entity types this mob avoids.
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Boolean ignore_visibility false If true, visbility between this entity and the mob type will not be checked.
Decimal max_dist 0.0 Maximum distance to look for an entity
Decimal max_flee 0.5 Distance in blocks within the mob considers it should stop fleeing.
Decimal probability_per_strength 1.0 Determines how likely it is that this entity will stop avoiding another entity based on that entity's strength
Decimal sprint_speed_multiplier 1.0 Multiplier for running speed. 1.0 means keep the regular speed, while higher numbers make the running speed faster
Decimal walk_speed_multiplier 1.0 Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster

minecraft:behavior.beg[edit]

Allows this mob to look at and follow the player that holds food they like.
Parameters
Type Name Default Value Description
List items List of items that this mob likes
Decimal look_distance 8.0 Distance in blocks the mob will beg from
Range [a, b] look_time [2, 4] The range of time in seconds this mob will stare at the player holding a food they like, begging for it

minecraft:behavior.break_door[edit]

Allows this mob to break doors.

minecraft:behavior.breed[edit]

Allows this mob to breed with other mobs.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.charge_attack[edit]

Allows the mob to attack its target by running at it.

minecraft:behavior.circle_around_anchor[edit]

Allows the mob to move in a circle around a point or a target.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Range [a, b] height_above_target_range [0.0, 0.0] When the mob finds a target, the range of height in blocks above the target to start the anchor point.
Integer height_change_chance 350 A random value to determine when to change the height of the mob from the anchor point. This has a 1/value chance every tick to do so.
Range [a, b] height_offset_range [0.0, 0.0] The range of height in blocks offset the mob can have from it's anchor point.
Integer radius_change_chance 250 A random value to determine when to increase the size of the radius up to the maximum. This has a 1/value chance every tick to do so.
Range [a, b] radius_range [5.0, 15.0] Range of radius in blocks of the circle to move around.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.controlled_by_player[edit]

Allows the mob to be controlled by the player.

minecraft:behavior.defend_village_target[edit]

Allows the mob to stay in the village and fight mobs hostile to the villagers.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entity types this mob considers a threat to the village
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

minecraft:behavior.door_interact[edit]

Allows the mob to open and close doors.

minecraft:behavior.dragonchargeplayer[edit]

Allows the dragon to attack a player by flying fast at them. The player is chosen by the dragonscanning goal. Can only be used by the Ender Dragon.

minecraft:behavior.dragondeath[edit]

Allows the dragon to go out with glory. This controls the Ender Dragon's death animation and can't be used by other mobs.

minecraft:behavior.dragonflaming[edit]

Allows the dragon to use its flame breath attack. Can only be used by the Ender Dragon.

minecraft:behavior.dragonholdingpattern[edit]

Allows the Dragon to fly around in a circle around the center podium. Can only be used by the Ender Dragon.

minecraft:behavior.dragonlanding[edit]

Allows the Dragon to stop flying and transition into perching mode. Can only be used by the Ender Dragon.

minecraft:behavior.dragonscanning[edit]

Allows the dragon to look around for a player to attack while in perch mode. Can only be used by the Ender Dragon.

minecraft:behavior.dragonstrafeplayer[edit]

Allows the dragon to fly around looking for a player and shoot fireballs at them. Can only be used by the Ender Dragon.

minecraft:behavior.dragontakeoff[edit]

Allows the dragon to leave perch mode and go back to flying around. Can only be used by the Ender Dragon.

minecraft:behavior.drop_item_for[edit]

Allows the mob to move near a target and drop an item.
Parameters
Type Name Default Value Description
Decimal drop_item_chance [1.0] The probability that the mob will drop an item.
JSON Object entity_types List of entity types this mob will drop items for.
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
String loot_table Loot table to select items from.
Decimal max_dist 0.0 Maximum distance in blocks this mob will look for entities to drop an item for.
Decimal offering_distance [1.0] The distance in blocks the mob will try to be away from the entity when it drops the item.
String on_drop_attempt Event to run when this mob attempts to drop an item.
Integer search_height 1 Height in blocks from the target the mob can be.
Integer search_range 0 The distance in blocks from the target the mob can be.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Range [a, b] time_of_day_range [0.0, 1.0] The valid times of day that this goal can be used. For reference: noon is 0.0, sunset is 0.25, midnight is 0.5, and sunrise is 0.75, and back to noon for 1.0.

minecraft:behavior.eat_block[edit]

Allows the mob to eat a block (for example, sheep eating grass).
Parameters
Type Name Default Value Description
Trigger on_eat Trigger to fire when the mob eats a block of grass

minecraft:behavior.enderman_leave_block[edit]

Allows the enderman to drop a block they are carrying. Can only be used by Endermen.

minecraft:behavior.enderman_take_block[edit]

Allows the enderman to take a block and carry it around. Can only be used by Endermen.

minecraft:behavior.find_mount[edit]

Allows the mob to look around for another mob to ride atop it.
Parameters
Type Name Default Value Description
Boolean avoid_water false If true, the mob will not go into water blocks when going towards a mount
Decimal mount_distance -1.0 This is the distance the mob needs to be, in blocks, from the desired mount to mount it. If the value is below 0, the mob will use its default attack distance
Integer start_delay 0 Time the mob will wait before starting to move towards the mount
Boolean target_needed false If true, the mob will only look for a mount if it has a target
Decimal within_radius 0.0 Distance in blocks within which the mob will look for a mount

minecraft:behavior.find_underwater_treasure[edit]

Allows the mob to move towards the nearest underwater ruin or shipwreck.
Parameters
Type Name Default Value Description
Integer search_range 0 The range that the mob will search for a treasure chest within a ruin or shipwreck to move towards.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal stop_distance 2.0 The distance the mob will move before stopping.

minecraft:behavior.flee_sun[edit]

Allows the mob to run away from direct sunlight and seek shade.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.float[edit]

Allows the mob to stay afloat while swimming.

minecraft:behavior.float_wander[edit]

Allows the mob to float around like the Ghast.
Parameters
Type Name Default Value Description
Range [a, b] float_duration [0.0, 0.0] Range of time in seconds the mob will float around before landing and choosing to do something else
Boolean must_reach false If true, the point has to be reachable to be a valid target
Boolean random_reselect false If true, the mob will randomly pick a new point while moving to the previously selected one
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
Decimal y_offset 0.0 Height in blocks to add to the selected target position

minecraft:behavior.follow_caravan[edit]

Allows the mob to follow mobs that are in a caravan.
Parameters
Type Name Default Value Description
Integer entity_count 1 Number of entities that can be in the caravan
JSON Object entity_types List of entity types that this mob can follow in a caravan
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.follow_mob[edit]

Allows the mob to follow other mobs.
Parameters
Type Name Default Value Description
Integer search_range 0 The distance in blocks it will look for a mob to follow
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal stop_distance 2.0 The distance in blocks this mob stops from the mob it is following

minecraft:behavior.follow_owner[edit]

Allows the mob to follow the player that owns them.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal start_distance 10.0 The distance in blocks that the owner can be away from this mob before it starts following it
Decimal stop_distance 2.0 The distance in blocks this mob will stop from its owner while following it

minecraft:behavior.follow_parent[edit]

Allows the mob to follow their parent around.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.go_home[edit]

Allows the mob to move back to the position they were spawned.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
String on_home Event to run when this mob gets home.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.guardian_attack[edit]

Allows the guardian to use its laser beam attack. Can only be used by Guardians and Elder Guardians.

minecraft:behavior.harvest_farm_block[edit]

Allows the villager to harvest nearby farms. Can only be used by Villagers.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.hurt_by_target[edit]

Allows the mob to target another mob that hurts them.
Parameters
Type Name Default Value Description
Boolean alert_same_type false If true, nearby mobs of the same type will be alerted about the damage
JSON Object entity_types List of entity types that this mob can target when hurt by them
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Boolean hurt_owner false If true, the mob will hurt its owner and other mobs with the same owner as itself

minecraft:behavior.lay_down[edit]

Allows mobs to lay down at times
Parameters
Type Name Default Value Description
Integer interval 120 A random value to determine at what intervals something can occur. This has a 1/interval chance to choose this goal
Integer random_stop_interval 120 a random value in which the goal can use to pull out of the behavior. This is a 1/interval chance to play the sound

minecraft:behavior.lay_egg[edit]

Allows the mob to lay an egg block on a sand block if the mob is pregnant.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
String on_lay Event to run when this mob lays the egg.
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Integer search_height 1 Height in blocks the mob will look for sand block to move towards
Integer search_range 0 The distance in blocks it will look for a sand block to move towards
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.leap_at_target[edit]

Allows monsters to jump at and attack their target. Can only be used by hostile mobs.
Parameters
Type Name Default Value Description
Boolean must_be_on_ground true If true, the mob will only jump at its target if its on the ground. Setting it to false will allow it to jump even if its already in the air
Decimal yd 0.0 The height in blocks the mob jumps when leaping at its target

minecraft:behavior.look_at_entity[edit]

Allows the mob to look at nearby entities.
Parameters
Type Name Default Value Description
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Minecraft Filter filters Filter to determine the conditions for this mob to look at the entity
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Range [a, b] look_time [2, 4] Time range to look at the entity
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%

minecraft:behavior.look_at_player[edit]

Allows the mob to look at the player when the player is nearby.
Parameters
Type Name Default Value Description
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Range [a, b] look_time [2, 4] Time range to look at the entity
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%

minecraft:behavior.look_at_target[edit]

Allows the mob to look at the entity they are targetting.
Parameters
Type Name Default Value Description
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Range [a, b] look_time [2, 4] Time range to look at the entity
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%

minecraft:behavior.look_at_trading_player[edit]

Allows the mob to look at the player they are trading with.
Parameters
Type Name Default Value Description
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Range [a, b] look_time [2, 4] Time range to look at the entity
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%

minecraft:behavior.make_love[edit]

Allows the villager to look for a mate to spawn other villagers with. Can only be used by Villagers.

minecraft:behavior.melee_attack[edit]

Allows the mob to use close combat melee attacks.
Parameters
Type Name Default Value Description
Boolean attack_once false If true, this mob will attack only one time.
String attack_types Defines the entity types this mob will attack
Decimal melee_fov 90.0 The allowable FOV the actor will use to determine if it can make a valid melee attack
Integer random_stop_interval 0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance
Decimal reach_multiplier 2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger)
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target

minecraft:behavior.mount_pathing[edit]

Allows the mob to move around on its own while mounted seeking a target to attack.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal target_dist 0.0 The distance at which this mob wants to be away from its target
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target

minecraft:behavior.move_indoors[edit]

Can only be used by Villagers. Allows them to seek shelter indoors.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.move_through_village[edit]

Can only be used by Villagers. Allows the villagers to create paths around the village.
Parameters
Type Name Default Value Description
Boolean only_at_night false If true, the mob will only move through the village during night time
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.move_to_land[edit]

Allows the mob to move back onto land when in water.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Integer search_height 1 Height in blocks the mob will look for land to move towards
Integer search_range 0 The distance in blocks it will look for land to move towards
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.move_to_water[edit]

Allows the mob to move back into water when on land.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Integer search_height 1 Height in blocks the mob will look for water to move towards
Integer search_range 0 The distance in blocks it will look for water to move towards
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.move_towards_restriction[edit]

Allows Guardians, Iron Golems and Villagers to move within their pre-defined area that the mob should be restricted to. Other mobs don't have a restriction defined.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.move_towards_target[edit]

Allows mob to move towards its current target.
Parameters
Type Name Default Value Description
Decimal within_radius 0.0 Defines the radius in blocks that the mob tries to be from the target. A value of 0 means it tries to occupy the same block as the target

minecraft:behavior.nearest_attackable_target[edit]

Allows the mob to check for and pursue the nearest valid target.
Parameters
Type Name Default Value Description
Integer attack_interval 0 Time in seconds between attacks
JSON Object entity_types List of entity types that this mob considers valid targets
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Boolean must_reach false If true, only entities that this mob can path to can be selected as targets
Boolean must_see false If true, only entities in this mob's viewing range can be selected as targets
Decimal must_see_forget_duration 3.0 Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
Decimal persist_time 0.0f Time in seconds for a valid target to stay targeted when it becomes and invalid target.
Boolean reselect_targets false If true, the target will change to the current closest entity whenever a different entity is closer
Integer scan_interval 10 How many ticks to wait between scanning for a target.
Decimal target_search_height -1.0f Height in blocks to search for a target mob. -1.0f means the height does not matter.
Decimal within_radius 0.0 Distance in blocks that the target can be within to launch an attack

minecraft:behavior.ocelot_sit_on_block[edit]

Allows to mob to be able to sit in place like the ocelot.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.ocelotattack[edit]

Can only be used by the Ocelot. Allows it to perform the sneak and pounce attack.
Parameters
Type Name Default Value Description
Decimal sneak_speed_multiplier 1.0 Multiplier for the sneaking speed. 1.0 means the ocelot will move at the speed it normally sneaks
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed of this mob while using this attack
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed while using this attack

minecraft:behavior.offer_flower[edit]

Allows the mob to offer the player a flower like the Iron Golem does.

minecraft:behavior.open_door[edit]

Allows the mob to open doors. Requires the mob to be able to path through doors, otherwise the mob won't even want to try opening them.
Parameters
Type Name Default Value Description
Boolean close_door_after true If true, the mob will close the door after opening it and going through it

minecraft:behavior.owner_hurt_by_target[edit]

Allows the mob to target another mob that hurts their owner.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entity types that this mob can target if they hurt their owner
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

minecraft:behavior.owner_hurt_target[edit]

Allows the mob to target a mob that is hurt by their owner.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entity types that this entity can target if the potential target is hurt by this mob's owner
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

minecraft:behavior.panic[edit]

Allows the mob to enter the panic state, which makes it run around and away from the damage source that made it enter this state.
Parameters
Type Name Default Value Description
Boolean force false If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it
Boolean prefer_water false If true, the mob will prefer water over land
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.peek[edit]

Allows the mob to peek out. This is what the shulker uses to look out of its shell.

minecraft:behavior.pet_sleep_with_owner[edit]

Allows the pet mob to move onto a bed with it's owner while sleeping.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer search_height 1 Height in blocks from the owner the pet can be to sleep with owner.
Integer search_range 0 The distance in blocks from the owner the pet can be to sleep with owner.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.pickup_items[edit]

Allows the mob to pick up items on the ground.
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Decimal max_dist 0.0 Maximum distance this mob will look for items to pick up
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target

minecraft:behavior.play[edit]

Allows the mob to play with other baby villagers. This can only be used by Villagers.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.player_ride_tamed[edit]

Allows the mob to be ridden by the player after being tamed.

minecraft:behavior.raid_garden[edit]

Allows the mob to eat crops out of farms until they are full.
Parameters
Type Name Default Value Description
List blocks Blocks that the mob is looking for to eat
Integer eat_delay 2 Time in seconds between each time it eats
Integer full_delay 100 Amount of time in seconds before this mob wants to eat again
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer max_to_eat 6 Maximum number of things this entity wants to eat
Integer search_range 0 Distance in blocks the mob will look for crops to eat
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.random_breach[edit]

Allows the mob to randomly break surface of the water.
Parameters
Type Name Default Value Description
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1

minecraft:behavior.random_fly[edit]

Allows a mob to randomly fly around.
Parameters
Type Name Default Value Description
Boolean can_land_on_trees true If true, the mob can stop flying and land on a tree instead of the ground
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1

minecraft:behavior.random_look_around[edit]

Allows the mob to randomly look around.
Parameters
Type Name Default Value Description
Range [a, b] look_time [2, 4] The range of time in seconds the mob will stay looking in a random direction before looking elsewhere

minecraft:behavior.random_sitting[edit]

Allows the mob to randomly sit for a duration.
Parameters
Type Name Default Value Description
Decimal cooldown 100 The cooldown time in seconds before the mob may sit again
Decimal min_sit_time 10 The minimum amount of time in seconds before the mob can stand back up
Decimal start_chance 0.1 This is the chance that the mob will start sitting, from 0 to 1
Decimal stop_chance 0.3 This is the chance that the mob will stop sitting, from 0 to 1

minecraft:behavior.random_stroll[edit]

Allows a mob to randomly stroll around.
Parameters
Type Name Default Value Description
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1

minecraft:behavior.random_swim[edit]

Allows an entity to randomly move through water
Parameters
Type Name Default Value Description
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1

minecraft:behavior.ranged_attack[edit]

Allows the mob to use ranged attacks like shooting arrows.
Parameters
Type Name Default Value Description
Integer attack_interval_max 0 Maximum amount of time in seconds the entity will wait after an attack before launching another
Integer attack_interval_min 0 Minimum amount of time in seconds the entity will wait after an attack before launching another
Decimal attack_radius 0.0 Maxmimum distance the target can be for this mob to fire. If the target is further away, this mob will move first before firing
Decimal burst_interval 0.0 Amount of time in seconds between each individual shot when firing multiple shots per attack
Integer burst_shots 1 Number of shots fired every time the mob uses a charged attack
Decimal charge_charged_trigger 0.0 The minimum amount of time in ticks the mob has to charge before firing a charged attack
Decimal charge_shoot_trigger 0.0 The minimum amount of time in ticks for the mob to start charging a charged shot. Must be greater than 0 to enable burst shots
Decimal ranged_fov 90.0 The allowable FOV the actor will use to determine if it can make a valid ranged attack
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.receive_love[edit]

Allows the villager to stop so another villager can breed with it. Can only be used by a Villager.

minecraft:behavior.restrict_open_door[edit]

Allows the mob to stay indoors during night time.

minecraft:behavior.restrict_sun[edit]

Allows the mob to automatically start avoiding the sun when its a clear day out.

minecraft:behavior.roll[edit]

This allows the mob to roll forward.
Parameters
Type Name Default Value Description
Decimal probability [1.0] The probability that the mob will use the goal.

minecraft:behavior.run_around_like_crazy[edit]

Allows the mob to run around aimlessly.
Parameters
Type Name Default Value Description
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.send_event[edit]

Allows the mob to send an event to another mob.
Parameters
Type Name Default Value Description
Decimal cast_duration Total delay of the steps Time in seconds for the entire event sending process
List sequence List of events to send
Parameters of each event
Type Name Default Value Description
Decimal base_delay 0.0 Amount of time in seconds before starting this step
String event The event to send to the entity
String sound_event The sound event to play when this step happens

minecraft:behavior.share_items[edit]

Allows the mob to give items it has to others.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entities this mob will share items with
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Decimal max_dist 0.0 Maximum distance in blocks this mob will look for entities to share items with
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.silverfish_merge_with_stone[edit]

Allows the mob to go into stone blocks like Silverfish do. Currently it can only be used by Silverfish.

minecraft:behavior.silverfish_wake_up_friends[edit]

Allows the mob to alert mobs in nearby blocks to come out. Currently it can only be used by Silverfish.

minecraft:behavior.skeleton_horse_trap[edit]

Allows Equine mobs to be Horse Traps and be triggered like them, spawning a lightning bolt and a bunch of horses when a player is nearby. Can only be used by Horses, Mules, Donkeys and Skeleton Horses.
Parameters
Type Name Default Value Description
Decimal duration 1.0 Amount of time in seconds the trap exists. After this amount of time is elapsed, the trap is removed from the world if it hasn't been activated
Decimal within_radius 0.0 Distance in blocks that the player has to be within to trigger the horse trap

minecraft:behavior.slime_attack[edit]

Can only be used by Slimes and Magma Cubes. Allows the mob to use a melee attack like the slime's.

minecraft:behavior.slime_float[edit]

Can only be used by Slimes and Magma Cubes. Controls their ability to float in water / lava.

minecraft:behavior.slime_keep_on_jumping[edit]

Can only be used by Slimes and Magma Cubes. Allows the mob to continuously jump around like a slime.

minecraft:behavior.slime_random_direction[edit]

Can only be used by Slimes and Magma Cubes. Allows the mob to move in random directions like a slime.

minecraft:behavior.snacking[edit]

Allows the mob to take a load off and snack on food that it found nearby.
Parameters
Type Name Default Value Description
List items Items that we are interested in snacking on
Decimal snacking_cooldown 7.5 The cooldown time in seconds before the mob is able to snack again
Decimal snacking_cooldown_min 0.5f The minimum time in seconds before the mob is able to snack again
Decimal snacking_stop_chance 0.0017 This is the chance that the mob will stop snacking, from 0 to 1

minecraft:behavior.sneeze[edit]

Allows the mob to stop and sneeze possibly startling nearby mobs and dropping an item.
Parameters
Type Name Default Value Description
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again
Decimal drop_item_chance 1.0 The probability that the mob will drop an item when it sneezes.
JSON Object entity_types List of entity types this mob will startle (cause to jump) when it sneezes.
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
String loot_table Loot table to select dropped items from.
String prepare_sound Sound to play when the sneeze is about to happen.
Decimal prepare_time 1.0 The time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing).
Decimal probability 0.02 The probability of sneezing. A value of 1.00 is 100%
String sound Sound to play when the sneeze occurs.
Decimal within_radius 0.0 Distance in blocks that mobs will be startled.

minecraft:behavior.squid_dive[edit]

Allows the squid to dive down in water. Can only be used by the Squid.

minecraft:behavior.squid_flee[edit]

Allows the squid to swim away. Can only be used by the Squid.

minecraft:behavior.squid_idle[edit]

Allows the squid to swim in place idly. Can only be used by the Squid.

minecraft:behavior.squid_move_away_from_ground[edit]

Allows the squid to move away from ground blocks and back to water. Can only be used by the Squid.

minecraft:behavior.squid_out_of_water[edit]

Allows the squid to stick to the ground when outside water. Can only be used by the Squid.

minecraft:behavior.stay_while_sitting[edit]

Allows the mob to stay put while it is in a sitting state instead of doing something else.

minecraft:behavior.stomp_attack[edit]

Allows the mob to use the polar bear's melee attack.
Parameters
Type Name Default Value Description
Boolean attack_once false If true, this mob will attack only one time.
String attack_types Defines the entity types this mob will attack
Integer random_stop_interval 0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance
Decimal reach_multiplier 2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger)
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target

minecraft:behavior.stomp_turtle_egg[edit]

Allows this mob to stomp turtle eggs
Parameters
Type Name Default Value Description
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Integer search_height 1 Height in blocks the mob will look for turtle eggs to move towards
Integer search_range 0 The distance in blocks it will look for turtle eggs to move towards
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.summon_entity[edit]

Allows the mob to attack the player by summoning other entities.
Parameters
Type Name Default Value Description
List summon_choices List of spells for the mob to use to summon entities. Each spell has the following parameters:
Parameters of each spell
Type Name Default Value Description
Decimal cast_duration Total delay of the steps Time in seconds the spell casting will take
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the spell again
Boolean do_casting true If true, the mob will do the casting animations and render spell particles
Minecraft Filter filters
Decimal max_activation_range -1.0 Upper bound of the activation distance in blocks for this spell
Decimal min_activation_range 1.0 Lower bound of the activation distance in blocks for this spell
Integer particle_color 0 The color of the particles for this spell
List sequence List of steps for the spell. Each step has the following parameters:
Parameters of each step
Type Name Default Value Description
Decimal base_delay 0.0 Amount of time in seconds to wait before this step starts
Decimal delay_per_summon 0.0 Amount of time in seconds before each entity is summoned in this step
Decimal entity_lifespan -1.0 Amount of time in seconds that the spawned entity will be alive for. A value of -1.0 means it will remain alive for as long as it can
String entity_type The entity type of the entities we will spawn in this step
Integer num_entities_spawned 1 Number of entities that will be spawned in this step
String shape line The base shape of this step. Valid values are circle and line
Decimal size 1.0 The base size of the entity
String sound_event The sound event to play for this step
Integer summon_cap 0 Maximum number of summoned entities at any given time
Decimal summon_cap_radius 0.0
String target self The target of the spell. This is where the spell will start (line will start here, circle will be centered here)
String start_sound_event The sound event to play when using this spell
Decimal weight 0.0 The weight of this spell. Controls how likely the mob is to choose this spell when casting one

minecraft:behavior.swell[edit]

Allows the creeper to swell up when a player is nearby. It can only be used by Creepers.
Parameters
Type Name Default Value Description
Decimal start_distance 10.0 This mob starts swelling when a target is at least this many blocks away
Decimal stop_distance 2.0 This mob stops swelling when a target has moved away at least this many blocks

minecraft:behavior.swim_wander[edit]

Has the fish swim around when they can't pathfind
Parameters
Type Name Default Value Description
Decimal speed_multiplier 10 speed of the entity

minecraft:behavior.swoop_attack[edit]

Allows the mob to move to attack a target. The goal ends if it has a horizontal collision or gets hit. Built to be used with flying mobs.
Parameters
Type Name Default Value Description
Range [a, b] delay_range [10.0, 20.0] Range of time in seconds between uses of this goal.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal

minecraft:behavior.take_flower[edit]

Can only be used by Villagers. Allows the mob to accept flowers from Iron Golems.

minecraft:behavior.tempt[edit]

Allows the mob to be tempted by food they like.
Parameters
Type Name Default Value Description
Boolean can_get_scared false If true, the mob can stop being tempted if the player moves too fast while close to this mob
List items List of items this mob is tempted by
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal within_radius 0.0 Distance in blocks this mob can get tempted by a player holding an item they like

minecraft:behavior.trade_with_player[edit]

Allows the player to trade with this mob.

minecraft:behavior.vex_copy_owner_target[edit]

Allows the mob to target the same entity its owner is targeting.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entities this mob can copy the owner from
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

minecraft:behavior.vex_random_move[edit]

Allows the mob to move around randomly like the Vex.

minecraft:behavior.wither_random_attack_pos_goal[edit]

Allows the wither to launch random attacks. Can only be used by the Wither Boss.

minecraft:behavior.wither_target_highest_damage[edit]

Allows the wither to focus its attacks on whichever mob has dealt the most damage to it.
Parameters
Type Name Default Value Description
JSON Object entity_types List of entity types the wither takes into account to find who dealt the most damage to it
Parameters
Type Name Default Value Description
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Boolean must_see false If true, the mob has to be visible to be a valid choice
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

Filters[edit]

Filters allow data objects to specify test critera which allows their use.
For example, a model that includes a filter will only be used when the filter criteria is true.
A typical filter consists of four paramters:
name: the name of the test to apply.
domain: the domain the test should be performed in. An armor slot, for example. This parameter is only used by a few tests.
operator: the comparison to apply with the value, such as 'equal' or 'greater'.
value: the value being compared with the test.
A typical filter looks like the following:
{ "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" }
Which results in the calling entity (self) calculating the moon_intensity at its location and returning true if the result is greater than 0.5.
Tests can be combined into groups using the collections 'all_of' and 'any_of'.
All tests in an 'all_of' group must pass in order for the group to pass.
One or more tests in an 'any_of' group must pass in order for the group to pass.
Example:
"all_of" : [
{ "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" },
{ "test" : "in_water", "subject" : "target", "operator" : "equal", "value" : "true" }
]
This filter group will pass only when the moon_intensity is greater than 0.5 AND the caller's target entity is standing in water.

clock_time[edit]

Compares the current time with a float value in the range (0.0, 1.0).

0.0== Noon 0.25== Sunset 0.5== Midnight 0.75== Sunrise

Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Decimal value (Required) A floating point value.
Examples
Full..
{ "test": "clock_time", "subject": "self", "operator": "equals", "value": "0.00" }
Short (using Defaults)..
{ "test": "clock_time", "value": "0.00" }

has_ability[edit]

Returns true when the subject entity has the named ability.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The Ability type to test
Options Description
flySpeed
flying
instabuild
invulnerable
lightning
mayfly
mute
noclip
walkSpeed
worldbuilder
Examples
Full..
{ "test": "has_ability", "subject": "self", "operator": "equals", "value": "instabuild" }
Short (using Defaults)..
{ "test": "has_ability", "value": "instabuild" }

has_biome_tag[edit]

Tests whether the biome the subject is in has the specified tag.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The tag to look for
Examples
Full..
{ "test": "has_biome_tag", "subject": "self", "operator": "equals", "value": " " }
Short (using Defaults)..
{ "test": "has_biome_tag", "value": " " }

has_component[edit]

Returns true when the subject entity contains the named component.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The component name to look for
Examples
Full..
{ "test": "has_component", "subject": "self", "operator": "equals", "value": "minecraft:explode" }
Short (using Defaults)..
{ "test": "has_component", "value": "minecraft:explode" }

has_damage[edit]

Returns true when the subject entity receives the named damage type.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The Damage type to test
Options Description
anvil
attack
block_explosion
contact
drowning
entity_explosion
fall
falling_block
fatal Any damage which kills the subject
fire
fire_tick
fly_into_wall
lava
magic
none
override
piston
projectile
starve
suffocation
suicide
thorns
void
wither
Examples
Full..
{ "test": "has_damage", "subject": "self", "operator": "equals", "value": "fatal" }
Short (using Defaults)..
{ "test": "has_damage", "value": "fatal" }

has_equipment[edit]

Tests for the presence of a named item in the designated slot of the subject entity.
Parameters
Type Name Default Description
String domain any (Optional) The equipment location to test
Options Description
any
armor
feet
hand
head
leg
torso
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The item name to look for
Examples
Full..
{ "test": "has_equipment", "subject": "self", "domain": "any", "operator": "equals", "value": "dirt" }
Short (using Defaults)..
{ "test": "has_equipment", "value": "dirt" }

in_caravan[edit]

Returns true if the subject entity is in a caravan.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "in_caravan", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "in_caravan" }

in_clouds[edit]

Returns true when the subject entity is in the clouds.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "in_clouds", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "in_clouds" }

in_lava[edit]

Returns true when the subject entity is in lava.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "in_lava", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "in_lava" }

in_water[edit]

Returns true when the subject entity is in water.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "in_water", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "in_water" }

in_water_or_rain[edit]

Returns true when the subject entity is in water or rain.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "in_water_or_rain", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "in_water_or_rain" }

is_altitude[edit]

Tests the current altitude against a provided value. 0== bedrock elevation.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Integer value (Required) The altitude value to compare with
Examples
Full..
{ "test": "is_altitude", "subject": "self", "operator": "equals", "value": "0" }
Short (using Defaults)..
{ "test": "is_altitude", "value": "0" }

is_biome[edit]

Tests whether the Subject is currently in the named biome.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The Biome type to test
Options Description
beach
desert
extreme_hills
flat
forest
ice
jungle
mesa
mushroom_island
ocean
plain
river
savanna
stone_beach
swamp
taiga
the_end
the_nether
Examples
Full..
{ "test": "is_biome", "subject": "self", "operator": "equals", "value": "beach" }
Short (using Defaults)..
{ "test": "is_biome", "value": "beach" }

is_brightness[edit]

Tests the current brightness against a provided value in the range (0.0f, 1.0f).
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Decimal value (Required) The brightness value to compare with.
Examples
Full..
{ "test": "is_brightness", "subject": "self", "operator": "equals", "value": "0.50" }
Short (using Defaults)..
{ "test": "is_brightness", "value": "0.50" }

is_climbing[edit]

Returns true if the subject entity is climbing.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_climbing", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_climbing" }

is_color[edit]

Returns true if the subject entity is the named color.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The Palette Color to test
Options Description
black
blue
brown
cyan
gray
green
light_blue
light_green
magenta
orange
pink
purple
red
silver
white
yellow
Examples
Full..
{ "test": "is_color", "subject": "self", "operator": "equals", "value": "white" }
Short (using Defaults)..
{ "test": "is_color", "value": "white" }

is_daytime[edit]

Returns true during the daylight hours.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_daytime", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_daytime" }

is_difficulty[edit]

Tests the current difficulty level of the game.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The game's difficulty level to test
Options Description
easy
hard
normal
peaceful
Examples
Full..
{ "test": "is_difficulty", "subject": "self", "operator": "equals", "value": "normal" }
Short (using Defaults)..
{ "test": "is_difficulty", "value": "normal" }

is_family[edit]

Returns true when the subject entity is a member of the named family.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The Family name to look for
Examples
Full..
{ "test": "is_family", "subject": "self", "operator": "equals", "value": "player" }
Short (using Defaults)..
{ "test": "is_family", "value": "player" }

is_game_rule[edit]

Tests whether a named game rule is active.
Parameters
Type Name Default Description
String domain (Required) The Game Rule to test.
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_game_rule", "subject": "self", "domain": "domobspawning", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_game_rule", "domain": "domobspawning" }

is_humid[edit]

Tests whether the Subject is in an area with humidity
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_humid", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_humid" }

is_immobile[edit]

Returns true if the subject entity is immobile. An entity is immobile if it lacks AI goals, has just changed dimensions or if it is a mob and has no health.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_immobile", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_immobile" }

is_moving[edit]

Returns true if the subject entity is moving.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_moving", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_moving" }

is_owner[edit]

Returns true if the subject entity is the owner of the calling entity.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_owner", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_owner" }

is_riding[edit]

Returns true if the subject entity is riding on another entity.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_riding", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_riding" }

is_sneaking[edit]

Returns true if the subject entity is sneaking.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_sneaking", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_sneaking" }

is_snow_covered[edit]

Tests whether the Subject is in an area with snow cover
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_snow_covered", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_snow_covered" }

is_target[edit]

Returns true if the subject entity is the target of the calling entity.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_target", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_target" }

is_temperature_type[edit]

Tests whether the current temperature is a given type.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
String value (Required) The Biome temperature catagory to test
Options Description
cold
mild
ocean
warm
Examples
Full..
{ "test": "is_temperature_type", "subject": "self", "operator": "equals", "value": "cold" }
Short (using Defaults)..
{ "test": "is_temperature_type", "value": "cold" }

is_temperature_value[edit]

Tests the current temperature against a provided value in the range (0.0, 1.0) where 0.0f is the coldest temp and 1.0f is the hottest.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Decimal value (Required) The Biome temperature value to compare with.
Examples
Full..
{ "test": "is_temperature_value", "subject": "self", "operator": "equals", "value": "0.50" }
Short (using Defaults)..
{ "test": "is_temperature_value", "value": "0.50" }

is_underground[edit]

Returns true when the subject entity is underground. An entity is considered underground if there are non-solid blocks above it.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_underground", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_underground" }

is_underwater[edit]

Returns true when the subject entity is under water. An entity is considered underwater if it is completely submerged in water blocks.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "is_underwater", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "is_underwater" }

is_variant[edit]

Returns true if the subject entity is the variant number provided.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Integer value (Required) An integer value.
Examples
Full..
{ "test": "is_variant", "subject": "self", "operator": "equals", "value": "0" }
Short (using Defaults)..
{ "test": "is_variant", "value": "0" }

moon_intensity[edit]

Compares the current moon intensity with a float value in the range (0.0, 1.0)
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Decimal value (Required) A floating point value.
Examples
Full..
{ "test": "moon_intensity", "subject": "self", "operator": "equals", "value": "0.00" }
Short (using Defaults)..
{ "test": "moon_intensity", "value": "0.00" }

moon_phase[edit]

Compares the current moon phase with an integer value in the range (0, 7).
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Integer value (Required) An integer value.
Examples
Full..
{ "test": "moon_phase", "subject": "self", "operator": "equals", "value": "0" }
Short (using Defaults)..
{ "test": "moon_phase", "value": "0" }

on_ground[edit]

Returns true when the subject entity is on ground.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "on_ground", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "on_ground" }

on_ladder[edit]

Returns true when the subject entity is on a ladder.
Parameters
Type Name Default Description
String operator equals (Optional) The comparison to apply with 'value'.
Options Description
!== Test for inequality.
< Test for less-than the value.
<== Test for less-than or equal to the value.
<> Test for inequality.
== Test for equality.
=== Test for equality.
> Test for greater-than the value.
>== Test for greater-than or equal to the value.
equals Test for equality.
not Test for inequality.
String subject self (Optional) The subject of this filter test.
Options Description
other The other member of an interaction, not the caller.
parent The caller's current parent.
player The player involved with the interaction.
self The entity or object calling the test
target The caller's current target.
Boolean value true (Optional) true or false.
Examples
Full..
{ "test": "on_ladder", "subject": "self", "operator": "equals", "value": "true" }
Short (using Defaults)..
{ "test": "on_ladder" }

Triggers[edit]

minecraft:on_death[edit]

Only usable by the Ender Dragon. Adds a trigger to call on this entity's death.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_friendly_anger[edit]

Adds a trigger that will run when a nearby entity of the same type as this entity becomes Angry.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_hurt[edit]

Adds a trigger to call when this entity takes damage.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_hurt_by_player[edit]

Adds a trigger to call when this entity is attacked by the player.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_ignite[edit]

Adds a trigger to call when this entity is set on fire.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_start_landing[edit]

Only usable by the Ender Dragon. Adds a trigger to call when this entity lands.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_start_takeoff[edit]

Only usable by the Ender Dragon. Adds a trigger to call when this entity starts flying.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_target_acquired[edit]

Adds a trigger to call when this entity finds a target.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_target_escape[edit]

Adds a trigger to call when this entity loses the target it currently has.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

minecraft:on_wake_with_owner[edit]

Adds a trigger to call when this pet's owner awakes after sleeping with the pet.
Parameters
Type Name Default Value Description
String event The event to run when the conditions for this trigger are met
Minecraft Filter filters The list of conditions for this trigger
String target self The target of the event

Built-in Events[edit]

Name Description
minecraft:entity_born Event called on an entity that is spawned through two entities breeding.
minecraft:entity_spawned Event called on an entity that is placed in the level.
minecraft:entity_transformed Event called on an entity that transforms into another entity.
minecraft:on_prime Event called on an entity whose fuse is lit and is ready to explode.

Entities[edit]

Identifier Full ID Short ID
agent 312 56
area_effect_cloud 95 95
armor_stand 317 61
arrow 12582992 80
balloon 107 107
bat 33043 19
blaze 2859 43
boat 90 90
cat 21323 75
cave_spider 265000 40
chalkboard 78 78
chest_minecart 524386 98
chicken 4874 10
cod 9072 112
command_block_minecart 524388 100
cow 4875 11
creeper 2849 33
dolphin 8991 31
donkey 2118424 24
dragon_fireball 4194383 79
drowned 199534 110
egg 4194386 82
elder_guardian 2866 50
ender_crystal 71 71
ender_dragon 2869 53
ender_pearl 4194391 87
enderman 2854 38
endermite 265015 55
evocation_fang 4194407 103
evocation_illager 2920 104
eye_of_ender_signal 70 70
falling_block 66 66
fireball 4194389 85
fireworks_rocket 72 72
fishing_hook 77 77
ghast 2857 41
guardian 2865 49
hopper_minecart 524384 96
horse 2118423 23
husk 199471 47
ice_bomb 4194410 106
iron_golem 788 20
item 64 64
leash_knot 88 88
lightning_bolt 93 93
lingering_potion 4194405 101
llama 4893 29
llama_spit 4194406 102
magma_cube 2858 42
minecart 524372 84
mooshroom 4880 16
moving_block 67 67
mule 2118425 25
npc 307 51
ocelot 21270 22
painting 83 83
panda 4977 113
parrot 21278 30
phantom 68410 58
pig 4876 12
player 319 63
polar_bear 4892 28
pufferfish 9068 108
rabbit 4882 18
salmon 9069 109
sheep 4877 13
shulker 2870 54
shulker_bullet 4194380 76
silverfish 264999 39
skeleton 1116962 34
skeleton_horse 2186010 26
slime 2853 37
small_fireball 4194398 94
snow_golem 789 21
snowball 4194385 81
spider 264995 35
splash_potion 4194390 86
squid 8977 17
stray 1116974 46
thrown_trident 12582985 73
tnt 65 65
tnt_minecart 524385 97
tripod_camera 318 62
tropicalfish 9071 111
turtle 4938 74
vex 2921 105
villager 783 15
vindicator 2873 57
witch 2861 45
wither 68404 52
wither_skeleton 1116976 48
wither_skull 4194393 89
wither_skull_dangerous 4194395 91
wolf 21262 14
xp_bottle 4194372 68
xp_orb 69 69
zombie 199456 32
zombie_horse 2186011 27
zombie_pigman 68388 36
zombie_villager 199468 44

Blocks[edit]

Name
minecraft:acacia_button
minecraft:acacia_door
minecraft:acacia_fence_gate
minecraft:acacia_pressure_plate
minecraft:acacia_stairs
minecraft:acacia_trapdoor
minecraft:activator_rail
minecraft:air
minecraft:anvil
minecraft:bamboo
minecraft:bamboo_sapling
minecraft:barrier
minecraft:beacon
minecraft:bed
minecraft:bedrock
minecraft:beetroot
minecraft:birch_button
minecraft:birch_door
minecraft:birch_fence_gate
minecraft:birch_pressure_plate
minecraft:birch_stairs
minecraft:birch_trapdoor
minecraft:black_glazed_terracotta
minecraft:blue_glazed_terracotta
minecraft:blue_ice
minecraft:bone_block
minecraft:bookshelf
minecraft:brewing_stand
minecraft:brick_block
minecraft:brick_stairs
minecraft:brown_glazed_terracotta
minecraft:brown_mushroom
minecraft:brown_mushroom_block
minecraft:bubble_column
minecraft:cactus
minecraft:cake
minecraft:carpet
minecraft:carrots
minecraft:carved_pumpkin
minecraft:cauldron
minecraft:chain_command_block
minecraft:chemical_heat
minecraft:chemistry_table
minecraft:chest
minecraft:chorus_flower
minecraft:chorus_plant
minecraft:clay
minecraft:coal_block
minecraft:coal_ore
minecraft:cobblestone
minecraft:cobblestone_wall
minecraft:cocoa
minecraft:colored_torch_bp
minecraft:colored_torch_rg
minecraft:command_block
minecraft:concrete
minecraft:concretePowder
minecraft:conduit
minecraft:coral
minecraft:coral_block
minecraft:coral_fan
minecraft:coral_fan_dead
minecraft:coral_fan_hang
minecraft:coral_fan_hang2
minecraft:coral_fan_hang3
minecraft:crafting_table
minecraft:cyan_glazed_terracotta
minecraft:dark_oak_button
minecraft:dark_oak_door
minecraft:dark_oak_fence_gate
minecraft:dark_oak_pressure_plate
minecraft:dark_oak_stairs
minecraft:dark_oak_trapdoor
minecraft:dark_prismarine_stairs
minecraft:daylight_detector
minecraft:daylight_detector_inverted
minecraft:deadbush
minecraft:detector_rail
minecraft:diamond_block
minecraft:diamond_ore
minecraft:dirt
minecraft:dispenser
minecraft:double_plant
minecraft:double_stone_slab
minecraft:double_stone_slab2
minecraft:double_wooden_slab
minecraft:dragon_egg
minecraft:dried_kelp_block
minecraft:dropper
minecraft:element_0
minecraft:element_1
minecraft:element_10
minecraft:element_100
minecraft:element_101
minecraft:element_102
minecraft:element_103
minecraft:element_104
minecraft:element_105
minecraft:element_106
minecraft:element_107
minecraft:element_108
minecraft:element_109
minecraft:element_11
minecraft:element_110
minecraft:element_111
minecraft:element_112
minecraft:element_113
minecraft:element_114
minecraft:element_115
minecraft:element_116
minecraft:element_117
minecraft:element_118
minecraft:element_12
minecraft:element_13
minecraft:element_14
minecraft:element_15
minecraft:element_16
minecraft:element_17
minecraft:element_18
minecraft:element_19
minecraft:element_2
minecraft:element_20
minecraft:element_21
minecraft:element_22
minecraft:element_23
minecraft:element_24
minecraft:element_25
minecraft:element_26
minecraft:element_27
minecraft:element_28
minecraft:element_29
minecraft:element_3
minecraft:element_30
minecraft:element_31
minecraft:element_32
minecraft:element_33
minecraft:element_34
minecraft:element_35
minecraft:element_36
minecraft:element_37
minecraft:element_38
minecraft:element_39
minecraft:element_4
minecraft:element_40
minecraft:element_41
minecraft:element_42
minecraft:element_43
minecraft:element_44
minecraft:element_45
minecraft:element_46
minecraft:element_47
minecraft:element_48
minecraft:element_49
minecraft:element_5
minecraft:element_50
minecraft:element_51
minecraft:element_52
minecraft:element_53
minecraft:element_54
minecraft:element_55
minecraft:element_56
minecraft:element_57
minecraft:element_58
minecraft:element_59
minecraft:element_6
minecraft:element_60
minecraft:element_61
minecraft:element_62
minecraft:element_63
minecraft:element_64
minecraft:element_65
minecraft:element_66
minecraft:element_67
minecraft:element_68
minecraft:element_69
minecraft:element_7
minecraft:element_70
minecraft:element_71
minecraft:element_72
minecraft:element_73
minecraft:element_74
minecraft:element_75
minecraft:element_76
minecraft:element_77
minecraft:element_78
minecraft:element_79
minecraft:element_8
minecraft:element_80
minecraft:element_81
minecraft:element_82
minecraft:element_83
minecraft:element_84
minecraft:element_85
minecraft:element_86
minecraft:element_87
minecraft:element_88
minecraft:element_89
minecraft:element_9
minecraft:element_90
minecraft:element_91
minecraft:element_92
minecraft:element_93
minecraft:element_94
minecraft:element_95
minecraft:element_96
minecraft:element_97
minecraft:element_98
minecraft:element_99
minecraft:emerald_block
minecraft:emerald_ore
minecraft:enchanting_table
minecraft:end_bricks
minecraft:end_gateway
minecraft:end_portal
minecraft:end_portal_frame
minecraft:end_rod
minecraft:end_stone
minecraft:ender_chest
minecraft:farmland
minecraft:fence
minecraft:fence_gate
minecraft:fire
minecraft:flower_pot
minecraft:flowing_lava
minecraft:flowing_water
minecraft:frame
minecraft:frosted_ice
minecraft:furnace
minecraft:glass
minecraft:glass_pane
minecraft:glowingobsidian
minecraft:glowstone
minecraft:gold_block
minecraft:gold_ore
minecraft:golden_rail
minecraft:grass
minecraft:grass_path
minecraft:gravel
minecraft:gray_glazed_terracotta
minecraft:green_glazed_terracotta
minecraft:hard_glass
minecraft:hard_glass_pane
minecraft:hard_stained_glass
minecraft:hard_stained_glass_pane
minecraft:hardened_clay
minecraft:hay_block
minecraft:heavy_weighted_pressure_plate
minecraft:hopper
minecraft:ice
minecraft:info_update
minecraft:info_update2
minecraft:invisibleBedrock
minecraft:iron_bars
minecraft:iron_block
minecraft:iron_door
minecraft:iron_ore
minecraft:iron_trapdoor
minecraft:jukebox
minecraft:jungle_button
minecraft:jungle_door
minecraft:jungle_fence_gate
minecraft:jungle_pressure_plate
minecraft:jungle_stairs
minecraft:jungle_trapdoor
minecraft:kelp
minecraft:ladder
minecraft:lapis_block
minecraft:lapis_ore
minecraft:lava
minecraft:leaves
minecraft:leaves2
minecraft:lever
minecraft:light_blue_glazed_terracotta
minecraft:light_weighted_pressure_plate
minecraft:lime_glazed_terracotta
minecraft:lit_furnace
minecraft:lit_pumpkin
minecraft:lit_redstone_lamp
minecraft:lit_redstone_ore
minecraft:log
minecraft:log2
minecraft:magenta_glazed_terracotta
minecraft:magma
minecraft:melon_block
minecraft:melon_stem
minecraft:mob_spawner
minecraft:monster_egg
minecraft:mossy_cobblestone
minecraft:movingBlock
minecraft:mycelium
minecraft:nether_brick
minecraft:nether_brick_fence
minecraft:nether_brick_stairs
minecraft:nether_wart
minecraft:nether_wart_block
minecraft:netherrack
minecraft:netherreactor
minecraft:noteblock
minecraft:oak_stairs
minecraft:observer
minecraft:obsidian
minecraft:orange_glazed_terracotta
minecraft:packed_ice
minecraft:pink_glazed_terracotta
minecraft:piston
minecraft:pistonArmCollision
minecraft:planks
minecraft:podzol
minecraft:portal
minecraft:potatoes
minecraft:powered_comparator
minecraft:powered_repeater
minecraft:prismarine
minecraft:prismarine_bricks_stairs
minecraft:prismarine_stairs
minecraft:pumpkin
minecraft:pumpkin_stem
minecraft:purple_glazed_terracotta
minecraft:purpur_block
minecraft:purpur_stairs
minecraft:quartz_block
minecraft:quartz_ore
minecraft:quartz_stairs
minecraft:rail
minecraft:red_flower
minecraft:red_glazed_terracotta
minecraft:red_mushroom
minecraft:red_mushroom_block
minecraft:red_nether_brick
minecraft:red_sandstone
minecraft:red_sandstone_stairs
minecraft:redstone_block
minecraft:redstone_lamp
minecraft:redstone_ore
minecraft:redstone_torch
minecraft:redstone_wire
minecraft:reeds
minecraft:repeating_command_block
minecraft:reserved6
minecraft:sand
minecraft:sandstone
minecraft:sandstone_stairs
minecraft:sapling
minecraft:scaffolding
minecraft:seaLantern
minecraft:sea_pickle
minecraft:seagrass
minecraft:shulker_box
minecraft:silver_glazed_terracotta
minecraft:skull
minecraft:slime
minecraft:snow
minecraft:snow_layer
minecraft:soul_sand
minecraft:sponge
minecraft:spruce_button
minecraft:spruce_door
minecraft:spruce_fence_gate
minecraft:spruce_pressure_plate
minecraft:spruce_stairs
minecraft:spruce_trapdoor
minecraft:stained_glass
minecraft:stained_glass_pane
minecraft:stained_hardened_clay
minecraft:standing_banner
minecraft:standing_sign
minecraft:sticky_piston
minecraft:stone
minecraft:stone_brick_stairs
minecraft:stone_button
minecraft:stone_pressure_plate
minecraft:stone_slab
minecraft:stone_slab2
minecraft:stone_stairs
minecraft:stonebrick
minecraft:stonecutter
minecraft:stripped_acacia_log
minecraft:stripped_birch_log
minecraft:stripped_dark_oak_log
minecraft:stripped_jungle_log
minecraft:stripped_oak_log
minecraft:stripped_spruce_log
minecraft:structure_block
minecraft:tallgrass
minecraft:tnt
minecraft:torch
minecraft:trapdoor
minecraft:trapped_chest
minecraft:tripWire
minecraft:tripwire_hook
minecraft:turtle_egg
minecraft:underwater_torch
minecraft:undyed_shulker_box
minecraft:unlit_redstone_torch
minecraft:unpowered_comparator
minecraft:unpowered_repeater
minecraft:vine
minecraft:wall_banner
minecraft:wall_sign
minecraft:water
minecraft:waterlily
minecraft:web
minecraft:wheat
minecraft:white_glazed_terracotta
minecraft:wooden_button
minecraft:wooden_door
minecraft:wooden_pressure_plate
minecraft:wooden_slab
minecraft:wool
minecraft:yellow_flower
minecraft:yellow_glazed_terracotta

Geometry[edit]

Blocks[edit]

Parameters
Type Name Default Value Description
List elements List of elements that make up the geometry of this block
boxes 
Description
List of cubes that make up the geometry of this element
faces 
Description
List of the 6 faces of the box. If specified, there MUST be 6 faces (front, back, left side, right side, top, bottom)
material 
Description
The material of this face if different from the box's
rotation 
Description
UV Rotation of this face. Only acceptable values are 0, 90 and 270 degrees. This allows reusing a texture and just rotating it for different faces
uv 
Description
Texture coordinates of this face, given as min x, min y, max x, max y withg values between 0.0 and 1.0
material 
Description
The material of this box if different from the element's
origin 
Description
The position of the center of the box relative to the geometry
size 
Description
Scale of the box in the x, y and z coordinates. A typical block is of scale 1, 1, 1
material 
Description
The material of this element if different from the block's
name 
Description
Name of the element
parent 
Description
Name of the parent element of this element. Pivot and box positions are made relative to the parent element's pivot
pivot 
Description
Position in model space of the pivot point of the element. This is used as the "center" position of the element, as well as the point around which to rotate
rotation 
Description
The rotation of this element about its pivot
String format_version 0.0.0.0 Version of the block geometry being used. This is used to determine if backwards compatibility is needed
List materials #0 List of materials used by this model
String parent Parent model of this model