实体文档
版本:1.18.10.4

Index

返回顶部

客户端实体文档

Client entity definitions are contained within a Resource Pack.
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.

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.
猪的客户端实体定义JSON示例

"format_version": "1.8.0",
  "minecraft:client_entity": {
     "description": {
       "identifier": "minecraft:pig",
       "min_engine_version": "1.8.0",
       "materials": { "default": "pig" },
       "textures": {
         "default": "textures/entity/pig/pig",
         "saddled": "textures/entity/pig/pig_saddle"
       },
       "geometry": {
         "default": "geometry.pig.v1.8"
       },
       "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
       }
     }
   }


返回顶部

spawn_egg

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


使用了十六进制值的刷怪蛋示例

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


返回顶部



animation_controllers

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.
返回顶部

animations

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.
返回顶部

enable_attachables

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

"enable_attachables": true


返回顶部

hide_armor

This determines if the armor attached to an entity should be hidden when set to true. This overrides the rendering settings specified by 'enable_attachables'

"hide_armor": true


返回顶部

identifier

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.
返回顶部

locators

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.

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


返回顶部

materials、textures和animations

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.
返回顶部

min_engine_version

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.
返回顶部

particle

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

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.
返回顶部

scripts

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.
鳕鱼的预动画脚本示例

"scripts": {
  "pre_animation": [
    "variable.ZRot = !query.is_in_water ? Math.cos((query.time_stamp + global.frame_alpha) * 14.32) * 90 : 0.0;",
    "variable.AnimationAmountBlend = Math.lerp(variable.AnimationAmountPrev, variable.AnimationAmount, global.frame_alpha);"
  ]
},


蝙蝠的缩放动画脚本示例

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


返回顶部



数据驱动生成

Data-Driven spawning allows you to adjust the spawn conditions of mobs, including new mobs added to the game to spawn naturally in biomes, add / remove a mob's spawn egg to the creative inventory and set the mob's spawn egg, and add / remove a to the / summon command

生成规则

生物群系标签

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:

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

返回顶部

条件

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

组件

名称 描述
minecraft:biome_filter This component allows the players to specify which biomes the mob spawns in. Check below to see which Biome Tags exist, and what each biome is tagged as.
minecraft:brightness_filter This component allows players to set the light level range that causes the mob to spawn.
名称 类型 默认值 描述
adjust_for_weather 布尔值 false This determines if weather can affect the light level conditions that cause the mob to spawn (e.g. Allowing hostile mobs to spawn during the day when it rains.)
max 小数 15.0 This is the maximum light level value that allows the mob to spawn
min 小数 0.0 This is the minimum light level value that allows the mob to spawn
minecraft:density_limit This component allows players to determine the density cap limits for the specified mob type.
名称 类型 默认值 描述
surface 整数 This is the maximum number of mobs of this type spawnable on the surface
underground 整数 This is the maximum number of mobs of this type spawnable underground
minecraft:difficulty_filter This component allows players determine what mobs spawn when certain difficulty levels are set.
名称 类型 默认值 描述
max 字符串 This is the maximum difficulty level that a mob spawns
min 字符串 This is the minimum difficulty level that a mob spawns
minecraft:herd This component allows players to determine the herd size of animals.
名称 类型 默认值 描述
event 字符串 This is an event that can be triggered from spawning
event_skip_count 小数 This is the number of mobs spawned before the specified event is triggered
max_size 小数 This is the maximum number of mobs that spawn in a herd
min_size 小数 This is the minimum number of mobs that spawn in a herd
minecraft:spawns_on_surface This component allows the mob to spawn on the ground. Adding the component causes it to be true, removing it causes the mob to stop spawning on the surface.
minecraft:spawns_underwater This component allows the mob to spawn underwater. Adding the component causes it to be true, removing it causes the mob to stop spawning underwater.
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.
名称 类型 默认值 描述
default 小数 0.0 This is the priority of the mob spawning

返回顶部



准备开始

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.Spawn rules contain description and conditionsAll Spawn Rules JSON need to have an ID (located under the description section). Similar to other identifiers, it follows the convention "namespace:name". The minecraft namespace is reserved for the vanilla Minecraft rules.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.

生成规则 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
返回顶部

带有标签的生物群系

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

返回顶部



僵尸的生成规则示例

"format_version": "1.8.0",
  "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"
        }
      }
    ]
  }



过滤器

Filters allow data objects to specify test criteria 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 parameters:

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', 'any_of', or 'none_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.

All tests in a 'none_of' group must fail in order for the group to pass.

clock_time

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

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 小数 (必须)一个浮点值。

示例

完整..

{ "test": "clock_time", "subject": "self", "operator": "equals", "value": "0.00" }


简短(使用默认值)..

{ "test": "clock_time", "value": "0.00" }


返回顶部

distance_to_nearest_player

Compares the distance to the nearest Player with a float value.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 小数 (必须)一个浮点值。

示例

完整..

{ "test": "distance_to_nearest_player", "subject": "self", "operator": "equals", "value": "0.00" }


简短(使用默认值)..

{ "test": "distance_to_nearest_player", "value": "0.00" }


返回顶部

has_ability

Returns true when the subject entity has the named ability.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要测试的能力
选项 描述
flySpeed
flying
instabuild
invulnerable
lightning
mayfly
mute
noclip
walkSpeed
worldbuilder

示例

完整..

{ "test": "has_ability", "subject": "self", "operator": "equals", "value": "instabuild" }


简短(使用默认值)..

{ "test": "has_ability", "value": "instabuild" }


返回顶部

has_biome_tag

Tests whether the biome the subject is in has the specified tag.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的标签

示例

完整..

{ "test": "has_biome_tag", "subject": "self", "operator": "equals", "value": " " }


简短(使用默认值)..

{ "test": "has_biome_tag", "value": " " }


返回顶部

has_component

Returns true when the subject entity contains the named component.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的组件名

示例

完整..

{ "test": "has_component", "subject": "self", "operator": "equals", "value": "minecraft:explode" }


简短(使用默认值)..

{ "test": "has_component", "value": "minecraft:explode" }


返回顶部

has_container_open

Returns true when the subject Player entity has opened a container.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "has_container_open", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "has_container_open" }


返回顶部

has_damage

Returns true when the subject entity receives the named damage type.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要测试的伤害类型
选项 描述
anvil
attack
block_explosion
contact
drowning
entity_explosion
fall
falling_block
fatal 任何可以杀死该主体的伤害
fire
fire_tick
fly_into_wall
lava
magic
none
override
piston
projectile
stalactite
stalagmite
starve
suffocation
suicide
thorns
void
wither

示例

完整..

{ "test": "has_damage", "subject": "self", "operator": "equals", "value": "fatal" }


简短(使用默认值)..

{ "test": "has_damage", "value": "fatal" }


返回顶部

has_equipment

Tests for the presence of a named item in the designated slot of the subject entity.

名称 类型 默认< 描述
domain 字符串 any (可选)要测试的装备位置
选项 描述
any
armor
feet
hand
head
leg
torso
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的物品名

示例

完整..

{ "test": "has_equipment", "subject": "self", "domain": "any", "operator": "equals", "value": "dirt" }


简短(使用默认值)..

{ "test": "has_equipment", "value": "dirt" }


返回顶部

has_mob_effect

Tests whether the Subject has the specified mob effect.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (可选)一个字符串值。

示例

完整..

{ "test": "has_mob_effect", "subject": "self", "operator": "equals", "value": "" }


简短(使用默认值)..

{ "test": "has_mob_effect" }


返回顶部

has_nametag

Tests if the subject has been given a custom name.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "has_nametag", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "has_nametag" }


返回顶部

has_ranged_weapon

Returns true when the subject entity is holding a ranged weapon like a bow or crossbow.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "has_ranged_weapon", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "has_ranged_weapon" }


返回顶部

has_tag

Returns true if the subject entity has the tag provided.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (可选)一个字符串值。

示例

完整..

{ "test": "has_tag", "subject": "self", "operator": "equals", "value": "" }


简短(使用默认值)..

{ "test": "has_tag" }


返回顶部

has_target

Returns true if the subject entity has a valid target.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "has_target", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "has_target" }


返回顶部

has_trade_supply

Tests whether the target has any trade supply left. Will return false if the target cannot be traded with.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "has_trade_supply", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "has_trade_supply" }


返回顶部

hourly_clock_time

Compares the current 24 hour time with an int value in the range[0, 24000]

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "hourly_clock_time", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "hourly_clock_time", "value": "0" }


返回顶部

in_block

Returns true when the subject entity is inside a specified Block type.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (可选)一个字符串值。

示例

完整..

{ "test": "in_block", "subject": "self", "operator": "equals", "value": "" }


简短(使用默认值)..

{ "test": "in_block" }


返回顶部

in_caravan

Returns true if the subject entity is in a caravan.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_caravan", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_caravan" }


返回顶部

in_clouds

Returns true when the subject entity is in the clouds.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_clouds", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_clouds" }


返回顶部

in_contact_with_water

Returns true when the subject entity in contact with any water: water, rain, splash water bottle.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_contact_with_water", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_contact_with_water" }


返回顶部

in_lava

Returns true when the subject entity is in lava.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_lava", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_lava" }


返回顶部

in_nether

Returns true when the subject entity is in Nether.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_nether", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_nether" }


返回顶部

in_water

Returns true when the subject entity is in water.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_water", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_water" }


返回顶部

in_water_or_rain

Returns true when the subject entity is in water or rain.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "in_water_or_rain", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "in_water_or_rain" }


返回顶部

inactivity_timer

Tests if the specified duration in seconds of inactivity for despawning has been reached.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "inactivity_timer", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "inactivity_timer", "value": "0" }


返回顶部

is_altitude

Tests the current altitude against a provided value. 0= bedrock elevation.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)要与之比较的海拔值。

示例

完整..

{ "test": "is_altitude", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "is_altitude", "value": "0" }


返回顶部

is_avoiding_mobs

Returns true if the subject entity is fleeing from other mobs.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_avoiding_mobs", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_avoiding_mobs" }


返回顶部

is_biome

Tests whether the Subject is currently in the named biome.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要测试的生物群系类型
选项 描述
beach
desert
extreme_hills
flat
forest
ice
jungle
mesa
mushroom_island
ocean
plain
river
savanna
stone_beach
swamp
taiga
the_end
the_nether

示例

完整..

{ "test": "is_biome", "subject": "self", "operator": "equals", "value": "beach" }


简短(使用默认值)..

{ "test": "is_biome", "value": "beach" }


返回顶部

is_block

Returns true when the block has the given name.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的族名

示例

完整..

{ "test": "is_block", "subject": "self", "operator": "equals", "value": "player" }


简短(使用默认值)..

{ "test": "is_block", "value": "player" }


返回顶部

is_brightness

Tests the current brightness against a provided value in the range (0.0f, 1.0f).

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 小数 (必须)要与之比较的亮度值。

示例

完整..

{ "test": "is_brightness", "subject": "self", "operator": "equals", "value": "0.50" }


简短(使用默认值)..

{ "test": "is_brightness", "value": "0.50" }


返回顶部

is_climbing

Returns true if the subject entity is climbing.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_climbing", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_climbing" }


返回顶部

is_color

Returns true if the subject entity is the named color.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要测试的调色板颜色
选项 描述
black
blue
brown
cyan
gray
green
light_blue
light_green
magenta
orange
pink
purple
red
silver
white
yellow

示例

完整..

{ "test": "is_color", "subject": "self", "operator": "equals", "value": "white" }


简短(使用默认值)..

{ "test": "is_color", "value": "white" }


返回顶部

is_daytime

Returns true during the daylight hours.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_daytime", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_daytime" }


返回顶部

is_difficulty

Tests the current difficulty level of the game.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要测试的游戏的难度级别
选项 描述
easy
hard
normal
peaceful

示例

完整..

{ "test": "is_difficulty", "subject": "self", "operator": "equals", "value": "normal" }


简短(使用默认值)..

{ "test": "is_difficulty", "value": "normal" }


返回顶部

is_family

Returns true when the subject entity is a member of the named family.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的族名

示例

完整..

{ "test": "is_family", "subject": "self", "operator": "equals", "value": "player" }


简短(使用默认值)..

{ "test": "is_family", "value": "player" }


返回顶部

is_game_rule

Tests whether a named game rule is active.

名称 类型 默认< 描述
domain 字符串 (必须)The Game Rule to test.
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_game_rule", "subject": "self", "domain": "domobspawning", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_game_rule", "domain": "domobspawning" }


返回顶部

is_humid

Tests whether the Subject is in an area with humidity

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_humid", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_humid" }


返回顶部

is_immobile

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.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_immobile", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_immobile" }


返回顶部

is_in_village

Tests whether the Subject is inside the bounds of a village.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_in_village", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_in_village" }


返回顶部

is_leashed

Returns true if the subject entity is leashed.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_leashed", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_leashed" }


返回顶部

is_leashed_to

Returns true if the subject entity leashed to the calling entity.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_leashed_to", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_leashed_to" }


返回顶部

is_mark_variant

Returns true if the subject entity is the mark variant number provided.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "is_mark_variant", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "is_mark_variant", "value": "0" }


返回顶部

is_missing_health

Tests if the subject is not at full health.

Name Type Default Description
operator String 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.
subject String self (Optional) The subject of this filter test.
Options Description
block The block involved with the interaction.
damager The damaging actor involved with the interaction.
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.
value Boolean true (Optional) true or false.

Examples

Full..

{ "test": "is_missing_health", "subject": "self", "operator": "equals", "value": "true" }


Short (using Defaults)..

{ "test": "is_missing_health" }


is_moving

Returns true if the subject entity is moving.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_moving", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_moving" }


返回顶部

is_owner

Returns true if the subject entity is the owner of the calling entity.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_owner", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_owner" }


返回顶部

is_persistent

Tests if the subject's persistence matches the bool value passed in.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_persistent", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_persistent" }


返回顶部

is_riding

Returns true if the subject entity is riding on another entity.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_riding", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_riding" }


返回顶部

is_skin_id

Returns true if the subject entity is the skin id number provided.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "is_skin_id", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "is_skin_id", "value": "0" }


返回顶部

is_sleeping

Tests whether the Subject is sleeping.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_sleeping", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_sleeping" }


返回顶部

is_sneaking

Returns true if the subject entity is sneaking.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_sneaking", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_sneaking" }


返回顶部

is_snow_covered

Tests whether the Subject is in an area with snow cover

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_snow_covered", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_snow_covered" }


返回顶部

is_target

Returns true if the subject entity is the target of the calling entity.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_target", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_target" }


返回顶部

is_temperature_type

Tests whether the current temperature is a given type.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要测试的生物群系温度分类
选项 描述
cold
mild
ocean
warm

示例

完整..

{ "test": "is_temperature_type", "subject": "self", "operator": "equals", "value": "cold" }


简短(使用默认值)..

{ "test": "is_temperature_type", "value": "cold" }


返回顶部

is_temperature_value

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.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 小数 (必须)要与之比较的生物群系温度值。

示例

完整..

{ "test": "is_temperature_value", "subject": "self", "operator": "equals", "value": "0.50" }


简短(使用默认值)..

{ "test": "is_temperature_value", "value": "0.50" }


返回顶部

is_underground

Returns true when the subject entity is underground. An entity is considered underground if there are non-solid blocks above it.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_underground", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_underground" }


返回顶部

is_underwater

Returns true when the subject entity is under water. An entity is considered underwater if it is completely submerged in water blocks.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_underwater", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_underwater" }


返回顶部

is_variant

Returns true if the subject entity is the variant number provided.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "is_variant", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "is_variant", "value": "0" }


返回顶部

is_visible

Returns true if the subject entity is visible.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "is_visible", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "is_visible" }


返回顶部

is_weather

DEPRECATED

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的族名

示例

完整..

{ "test": "is_weather", "subject": "self", "operator": "equals", "value": "player" }


简短(使用默认值)..

{ "test": "is_weather", "value": "player" }


返回顶部

light_level

Tests is the mob is outside of the specified light level range (0, 16).

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "light_level", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "light_level", "value": "0" }


返回顶部

moon_intensity

Compares the current moon intensity with a float value in the range (0.0, 1.0)

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 小数 (必须)一个浮点值。

示例

完整..

{ "test": "moon_intensity", "subject": "self", "operator": "equals", "value": "0.00" }


简短(使用默认值)..

{ "test": "moon_intensity", "value": "0.00" }


返回顶部

moon_phase

Compares the current moon phase with an integer value in the range (0, 7).

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "moon_phase", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "moon_phase", "value": "0" }


返回顶部

on_ground

Returns true when the subject entity is on ground.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "on_ground", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "on_ground" }


返回顶部

on_ladder

Returns true when the subject entity is on a ladder.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "on_ladder", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "on_ladder" }


返回顶部

random_chance

Returns true if the random chance rolls 0 out of a specified max range.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "random_chance", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "random_chance", "value": "0" }


返回顶部

rider_count

Returns the number of riders on this entity.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 整数 (必须)一个整数值。

示例

完整..

{ "test": "rider_count", "subject": "self", "operator": "equals", "value": "0" }


简短(使用默认值)..

{ "test": "rider_count", "value": "0" }


返回顶部

surface_mob

Tests if the subject is a surface mob.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "surface_mob", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "surface_mob" }


返回顶部

trusts

Returns true if the subject is trusted by entity.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 布尔值 true (可选)true或false。

示例

完整..

{ "test": "trusts", "subject": "self", "operator": "equals", "value": "true" }


简短(使用默认值)..

{ "test": "trusts" }


返回顶部

weather

Tests the current weather in the dimension against a provided weather value.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的族名

示例

完整..

{ "test": "weather", "subject": "self", "operator": "equals", "value": "player" }


简短(使用默认值)..

{ "test": "weather", "value": "player" }


返回顶部

weather_at_position

Tests the current weather, at the actor's position, against a provided weather value.

名称 类型 默认< 描述
operator 字符串 equals (可选)要应用的与‘value’的比较。
选项 描述
!= 测试不等关系。
< 测试小于value。
<= 测试小于或等于value。
<> 测试不等关系。
= 测试相等关系。
== 测试相等关系。
> 测试大于value。
>= 测试大于或等于value。
equals 测试相等关系。
not 测试不等关系。
subject 字符串 self (可选)该次过滤器测试的主体。
选项 描述
block 参与到该次交互的方块。
damager 参与到该次交互的正在造成伤害的活动对象。
other 在一次交互中与该次交互的调用者对立的成员。
parent 调用者当前的父成员。
player 参与到该次交互的玩家。
self 正在调用该次测试的实体或对象
target 调用者当前的目标。
value 字符串 (必须)要寻找的族名

示例

完整..

{ "test": "weather_at_position", "subject": "self", "operator": "equals", "value": "player" }


简短(使用默认值)..

{ "test": "weather_at_position", "value": "player" }


返回顶部

示例:

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.

"all_of" : [

:   { "test" : "moon_intensity", "subject" : "self", "operator" : "greater", "value" : "0.5" }, 

:   { "test" : "in_water", "subject" : "target", "operator" : "equal", "value" : "true" } 

: ]



服务端实体文档

AI意向

minecraft:behavior.admire_item

使该生物能够钦慕那些配置为可钦慕的物品。必须与admire_item组件组合使用

名称 类型 默认值 描述
admire_item_sound 字符串 当钦慕该物品时要播放的声音事件
sound_interval 范围 [a, b] 0 在再次播放该声音之前需要随机等待的时间的范围(以秒为单位)。

返回顶部

minecraft:behavior.barter

使该生物能够通过以物易物索求那些被配置为以物易物通货的物品。必须与barter组件组合使用
返回顶部

minecraft:behavior.beg

允许该生物看向并跟随持有它们喜欢的食物的玩家。

名称 类型 默认值 描述
items 列表 该生物喜欢的物品的列表
look_distance 小数 8.0 该生物将会乞求自的距离(以方块为单位)
look_time 范围 [a, b] [2, 4] 该生物将会盯着持有它们喜欢的食物的玩家,并乞求该食物的时间的范围(以秒为单位)

返回顶部

minecraft:behavior.break_door

允许该生物去破坏门。
返回顶部

minecraft:behavior.breed

允许该生物去与其他生物交配。

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.defend_trusted_target

Allows the mob to target another mob that hurts an entity it trusts.

名称 类型 默认值 描述
aggro_sound 字符串 Sound to occasionally play while defending.
attack_interval 整数 0 Time in seconds between attacks
entity_types JSON对象 List of entity types that this mob considers valid targets
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
must_see 布尔值 false If true, only entities in this mob's viewing range can be selected as targets
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
within_radius 小数 0.0 Distance in blocks that the target can be within to launch an attack

返回顶部

minecraft:behavior.door_interact

Allows the mob to open and close doors.
返回顶部

minecraft:behavior.dragondeath

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

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

minecraft:behavior.dragonlanding

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

minecraft:behavior.dragonscanning

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

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

minecraft:behavior.drink_potion

Allows the mob to drink potions based on specified environment conditions.

名称 类型 默认值 描述
potions 列表 A list of potions that this entity can drink. Each potion entry has the following parameters:
名称 类型 默认值 描述
chance 小数 1.0 The percent chance (from 0.0 to 1.0) of this potion being selected when searching for a potion to use.
filters Minecraft过滤器 The filters to use when determining if this potion can be selected.
id 整数 -1 The registry ID of the potion to use
speed_modifier 小数 0.0 The movement speed modifier to apply to the entity while it is drinking a potion. A value of 0 represents no change in speed.

返回顶部

minecraft:behavior.eat_carried_item

If the mob is carrying a food item, the mob will eat it and the effects will be applied to the mob.

名称 类型 默认值 描述
delay_before_eating 小数 Time in seconds the mob should wait before eating the item.

返回顶部

minecraft:behavior.enderman_leave_block

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

minecraft:behavior.enderman_take_block

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

minecraft:behavior.explore_outskirts

allows a mob to explore the outskirts of a village

名称 类型 默认值 描述
explore_dist 小数 5.0 The distance in which the mob will proceed past the village bounds
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
wait_time 整数 0 The time the mob will stand around 'searching' for POIs

返回顶部

minecraft:behavior.find_cover

Allows the mob to seek shade.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.find_mount

Allows the mob to look around for another mob to ride atop it.

名称 类型 默认值 描述
avoid_water 布尔值 false If true, the mob will not go into water blocks when going towards a mount
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
start_delay 整数 0 Time the mob will wait before starting to move towards the mount
target_needed 布尔值 false If true, the mob will only look for a mount if it has a target
within_radius 小数 0.0 Distance in blocks within which the mob will look for a mount

返回顶部

minecraft:behavior.find_underwater_treasure

Allows the mob to move towards the nearest underwater ruin or shipwreck.

名称 类型 默认值 描述
search_range 整数 0 The range that the mob will search for a treasure chest within a ruin or shipwreck to move towards.
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
stop_distance 小数 2.0 The distance the mob will move before stopping.

返回顶部

minecraft:behavior.flee_sun

Allows the mob to run away from direct sunlight and seek shade.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.float

Allows the mob to stay afloat while swimming.
返回顶部

minecraft:behavior.float_wander

Allows the mob to float around like the Ghast.

名称 类型 默认值 描述
float_duration 范围 [a, b] [0.0, 0.0] Range of time in seconds the mob will float around before landing and choosing to do something else
must_reach 布尔值 false If true, the point has to be reachable to be a valid target
random_reselect 布尔值 false If true, the mob will randomly pick a new point while moving to the previously selected one
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
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
y_offset 小数 0.0 Height in blocks to add to the selected target position

返回顶部

minecraft:behavior.follow_caravan

Allows the mob to follow mobs that are in a caravan.

名称 类型 默认值 描述
entity_count 整数 1 Number of entities that can be in the caravan
entity_types JSON对象 List of entity types that this mob can follow in a caravan
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.follow_mob

Allows the mob to follow other mobs.

名称 类型 默认值 描述
search_range 整数 0 The distance in blocks it will look for a mob to follow
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
stop_distance 小数 2.0 The distance in blocks this mob stops from the mob it is following

返回顶部

minecraft:behavior.follow_owner

Allows the mob to follow the player that owns them.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
start_distance 小数 10.0 The distance in blocks that the owner can be away from this mob before it starts following it
stop_distance 小数 2.0 The distance in blocks this mob will stop from its owner while following it

返回顶部

minecraft:behavior.follow_parent

Allows the mob to follow their parent around.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.follow_target_captain

Allows mob to move towards its current target captain.

名称 类型 默认值 描述
follow_distance 小数 0.0 Defines the distance in blocks the mob will stay from its target while following.
within_radius 小数 0.0 Defines the maximum distance in blocks a mob can get from its target captain before giving up trying to follow it.

返回顶部

minecraft:behavior.go_home

Allows the mob to move back to the position they were spawned.

名称 类型 默认值 描述
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
interval 整数 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
on_home 字符串 Event to run when this mob gets home.
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.hide

允许一个具有hide组件的生物试图移动到 - 并且藏匿到 - 一个已拥有的或附近的POI。

名称 类型 默认值 描述
duration 小数 1.0 该生物反应的时间的数量(以秒为单位)。
poi_type 字符串 定义要藏匿于哪种POI类型。
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
timeout_cooldown 小数 8.0 在该意向于一个内部错误或超时条件之后被再次使用之前的冷却时间(以秒为单位)。

返回顶部

minecraft:behavior.hold_ground

The mob freezes and looks at the mob they are targeting.

名称 类型 默认值 描述
broadcast 布尔值 false Whether to broadcast out the mob's target to other mobs of the same type.
broadcast_range 小数 0.0f Range in blocks for how far to broadcast.
min_radius 小数 10.0f Minimum distance the target must be for the mob to run this goal.
within_radius_event 字符串 Event to run when target is within the radius. This event is broadcasted if broadcast is true.

返回顶部

minecraft:behavior.hurt_by_target

Allows the mob to target another mob that hurts them.

名称 类型 默认值 描述
alert_same_type 布尔值 false If true, nearby mobs of the same type will be alerted about the damage
entity_types JSON对象 List of entity types that this mob can target when hurt by them
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
hurt_owner 布尔值 false If true, the mob will hurt its owner and other mobs with the same owner as itself

返回顶部

minecraft:behavior.inspect_bookshelf

Allows the mob to inspect bookshelves.

名称 类型 默认值 描述
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
search_count 整数 10 The number of blocks each tick that the mob will check within its 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
search_height 整数 1 The height that the mob will search for bookshelves
search_range 整数 0 Distance in blocks the mob will look for books to inspect
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.knockback_roar

Allows the mob to perform a damaging knockback that affects all nearby entities.

名称 类型 默认值 描述
触发器 on_roar_end
attack_time 小数 0.5 The delay after which the knockback occurs (in seconds).
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
duration 小数 1.0 The duration of the roar (in seconds).
knockback_damage 整数 6 The damage dealt by the knockback roar.
knockback_horizontal_strength 整数 4 The strength of the horizontal knockback.
knockback_range 整数 4 The radius (in blocks) of the knockback effect.
knockback_vertical_strength 整数 4 The strength of the vertical knockback.

返回顶部

minecraft:behavior.lay_down

Allows mobs to lay down at times

名称 类型 默认值 描述
interval 整数 120 A random value to determine at what intervals something can occur. This has a 1/interval chance to choose this goal
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

Allows the mob to lay an egg block on certain types of blocks if the mob is pregnant.

名称 类型 默认值 描述
allow_laying_from_below 布尔值 false [实验性]Allows the mob to lay its eggs from below the target if it can't get there. This is useful if the target block is water with air above, since mobs may not be able to get to the air block above water.
egg_type 字符串 minecraft:turtle_egg [实验性]Block type for the egg to lay. If this is a turtle egg, the number of eggs in the block is randomly set.
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
lay_egg_sound 字符串 lay_egg [实验性]Sound event name for laying egg. Defaulted to lay_egg which is used for Turtles.
lay_seconds 小数 10.0f [实验性]Duration of the laying egg process in seconds.
on_lay 触发器 Event to run when this mob lays the egg.
search_height 整数 1 Height in blocks the mob will look for a target block to move towards
search_range 整数 0 The distance in blocks it will look for a target block to move towards
speed_multiplier 小数 1.0 Movement speed multiplier of the mob when using this AI Goal
target_blocks 数组 [ minecraft:sand ] [实验性]Blocks that the mob can lay its eggs on top of.
target_materials_above_block 数组 [ Air ] [实验性]Types of materials that can exist above the target block. Valid types are Air, Water, and Lava.
use_default_animation 布尔值 true [实验性]Specifies if the default lay-egg animation should be played when the egg is placed or not.

minecraft:behavior.leap_at_target

Allows monsters to jump at and attack their target. Can only be used by hostile mobs.

名称 类型 默认值 描述
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
set_persistent 布尔值 false Allows the actor to be set to persist upon targeting a player
yd 小数 0.0 The height in blocks the mob jumps when leaping at its target

返回顶部

minecraft:behavior.look_at_entity

Allows the mob to look at nearby entities.

名称 类型 默认值 描述
angle_of_view_horizontal 整数 360 The angle in degrees that the mob can see in the Y-axis (up-down)
angle_of_view_vertical 整数 360 The angle in degrees that the mob can see in the X-axis (left-right)
filters Minecraft过滤器 Filter to determine the conditions for this mob to look at the entity
look_distance 小数 8.0 The distance in blocks from which the entity will look at
look_time 范围 [a, b] [2, 4] Time range to look at the entity
probability 小数 0.02 The probability of looking at the target. A value of 1.00 is 100%

返回顶部

minecraft:behavior.look_at_player

Allows the mob to look at the player when the player is nearby.

名称 类型 默认值 描述
angle_of_view_horizontal 整数 360 The angle in degrees that the mob can see in the Y-axis (up-down)
angle_of_view_vertical 整数 360 The angle in degrees that the mob can see in the X-axis (left-right)
look_distance 小数 8.0 The distance in blocks from which the entity will look at
look_time 范围 [a, b] [2, 4] Time range to look at the entity
probability 小数 0.02 The probability of looking at the target. A value of 1.00 is 100%

返回顶部

minecraft:behavior.look_at_target

Allows the mob to look at the entity they are targetting.

名称 类型 默认值 描述
angle_of_view_horizontal 整数 360 The angle in degrees that the mob can see in the Y-axis (up-down)
angle_of_view_vertical 整数 360 The angle in degrees that the mob can see in the X-axis (left-right)
look_distance 小数 8.0 The distance in blocks from which the entity will look at
look_time 范围 [a, b] [2, 4] Time range to look at the entity
probability 小数 0.02 The probability of looking at the target. A value of 1.00 is 100%

返回顶部

minecraft:behavior.look_at_trading_player

Allows the mob to look at the player they are trading with.

名称 类型 默认值 描述
angle_of_view_horizontal 整数 360 The angle in degrees that the mob can see in the Y-axis (up-down)
angle_of_view_vertical 整数 360 The angle in degrees that the mob can see in the X-axis (left-right)
look_distance 小数 8.0 The distance in blocks from which the entity will look at
look_time 范围 [a, b] [2, 4] Time range to look at the entity
probability 小数 0.02 The probability of looking at the target. A value of 1.00 is 100%

返回顶部

minecraft:behavior.make_love

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

minecraft:behavior.mingle

Allows an entity to go to the village bell and mingle with other entities

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
duration 小数 1.0 Amount of time in seconds that the entity will chat with another entity
mingle_distance 小数 2.0f The distance from its partner that this entity will mingle. If the entity type is not the same as the entity, this value needs to be identical on both entities.
mingle_partner_type 列表 empty The entity type that this entity is allowed to mingle with
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.mount_pathing

Allows the mob to move around on its own while mounted seeking a target to attack.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
target_dist 小数 0.0 The distance at which this mob wants to be away from its target
track_target 布尔值 false If true, this mob will chase after the target as long as it's a valid target

返回顶部

minecraft:behavior.move_through_village

Can only be used by Villagers. Allows the villagers to create paths around the village.

名称 类型 默认值 描述
only_at_night 布尔值 false If true, the mob will only move through the village during night time
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.move_to_block

Allows mob to move towards a block.

名称 类型 默认值 描述
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
on_reach 触发器 Event to run on block reached.
on_stay_completed 触发器 Event to run on completing a stay of stay_duration at the block.
search_height 整数 1 The height in blocks that the mob will look for the block.
search_range 整数 0 The distance in blocks that the mob will look for the block.
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
start_chance 小数 1.0 Chance to start the behavior (applied after each random tick_interval).
stay_duration 小数 0.0 Number of ticks needed to complete a stay at the block.
target_blocks 列表 Block types to move to.
target_offset 向量 [a, b, c] [0, 0, 0] Offset to add to the selected target position.
target_selection_method 字符串 nearest Kind of block to find fitting the specification. Valid values are "random" and "nearest".
tick_interval 整数 20 Average interval in ticks to try to run this behavior.

minecraft:behavior.move_to_land

Allows the mob to move back onto land when in water.

名称 类型 默认值 描述
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
search_count 整数 10 The number of blocks each tick that the mob will check within its 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
search_height 整数 1 Height in blocks the mob will look for land to move towards
search_range 整数 0 The distance in blocks it will look for land to move towards
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.move_to_lava

Allows the mob to move back into lava when on land.

名称 类型 默认值 描述
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
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
search_height 整数 1 Height in blocks the mob will look for lava to move towards
search_range 整数 0 The distance in blocks it will look for lava to move towards
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.move_to_liquid

Allows the mob to move into a liquid when on land.

名称 类型 默认值 描述
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
material_type 字符串 Any The material type of the liquid block to find. Valid values are "Any", "Water", and "Lava".
search_count 整数 10 The number of blocks each tick that the mob will check within its 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
search_height 整数 1 Height in blocks the mob will look for the liquid block to move towards
search_range 整数 0 The distance in blocks it will look for the liquid block to move towards
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

minecraft:behavior.move_to_poi

在该生物可以的情况下,允许它移动到一个POI。

名称 类型 默认值 描述
poi_type 字符串 向意向表明它应该寻找哪种POI类型。
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.move_to_random_block

Allows mob to move towards a random block.

名称 类型 默认值 描述
block_distance 小数 16.0 Defines the distance from the mob, in blocks, that the block to move to will be chosen.
within_radius 小数 0.0 Defines the distance in blocks the mob has to be from the block for the movement to be finished.

返回顶部

minecraft:behavior.move_to_village

Allows the mob to move into a random location within a village.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
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
search_range 整数 0 The distance in blocks to search for villages. If <= 0, find the closest village regardless of distance.
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.move_to_water

Allows the mob to move back into water when on land.

名称 类型 默认值 描述
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
search_count 整数 10 The number of blocks each tick that the mob will check within its 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
search_height 整数 1 Height in blocks the mob will look for water to move towards
search_range 整数 0 The distance in blocks it will look for water to move towards
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.move_towards_target

Allows mob to move towards its current target.

名称 类型 默认值 描述
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.nap

Allows mobs to occassionally stop and take a nap under certain conditions.

名称 类型 默认值 描述
cooldown_max 小数 0.0 Maximum time in seconds the mob has to wait before using the goal again
cooldown_min 小数 0.0 Minimum time in seconds the mob has to wait before using the goal again
mob_detect_dist 小数 6.0 The block distance in x and z that will be checked for mobs that this mob detects
mob_detect_height 小数 6.0 The block distance in y that will be checked for mobs that this mob detects

返回顶部

minecraft:behavior.nearest_attackable_target

Allows an entity to attack the closest target within a given subset of specific target types.

名称 类型 默认值 描述
attack_interval 整数 0 Time range (in seconds) between searching for an attack target, range is in (0, "attack_interval"]. Only used if "attack_interval" is greater than 0, otherwise "scan_interval" is used.
attack_interval_min 整数 0 Alias for "attack_interval"; provides the same functionality as "attack_interval".
attack_owner 布尔值 false If true, this entity can attack its owner.
entity_types JSON对象 过滤器 which types of targets are valid for this entity.
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this target a valid type.
max_dist 小数 16 To be a valid target choice, the target type cannot be farther away from this entity than "max_dist".
must_see 布尔值 false Determines if target-validity requires this entity to be in range only, or both in range and in sight.
must_see_forget_duration 布尔值 3.0 Time (in seconds) the target must not be seen by this entity to become invalid. Used only if "must_see" is true.
must_reach 布尔值 false If true, this entity requires a path to the target.
must_see 布尔值 false Determines if target-validity requires this entity to be in range only, or both in range and in sight.
must_see_forget_duration 小数 3.0 Time (in seconds) the target must not be seen by this entity to become invalid. Used only if "must_see" is true.
persist_time 小数 0.0 Time (in seconds) this entity can continue attacking the target after the target is no longer valid.
reselect_targets 布尔值 false Allows the attacking entity to update the nearest target, otherwise a target is only reselected after each "scan_interval" or "attack_interval".
scan_interval 整数 10 If "attack_interval" is 0 or isn't declared, then between attacks: scanning for a new target occurs every amount of ticks equal to "scan_interval", minimum value is 1. Values under 10 can affect performance.
set_persistent 布尔值 false Allows the actor to be set to persist upon targeting a player
target_invisible_multiplier 小数 0.7 Multiplied with the target's armor coverage percentage to modify "max_dist" when detecting an invisible target.
target_search_height 小数 -1.0 Maximum vertical target-search distance, if it's greater than the target type's "max_dist". A negative value defaults to "entity_types" greatest "max_dist".
target_sneak_visibility_multiplier 小数 0.8 Multiplied with the target type's "max_dist" when trying to detect a sneaking target.
within_radius 小数 0.0 Maximum distance this entity can be from the target when following it, otherwise the target becomes invalid. This value is only used if the entity doesn't declare "minecraft:follow_range".

返回顶部

minecraft:behavior.nearest_prioritized_attackable_target

Allows the mob to check for and pursue the nearest valid target.

名称 类型 默认值 描述
attack_interval 整数 0 Time in seconds before selecting a target
entity_types JSON对象 List of entity types that this mob considers valid targets
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
must_reach 布尔值 false If true, only entities that this mob can path to can be selected as targets
must_see 布尔值 false If true, only entities in this mob's viewing range can be selected as targets
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
persist_time 小数 0.0f Time in seconds for a valid target to stay targeted when it becomes and invalid target.
priority 整数 0 Specifies the priority in which filtered enemy types should be attacked. Lower number means higher priority.
reselect_targets 布尔值 false If true, the target will change to the current closest entity whenever a different entity is closer
scan_interval 整数 10 How many ticks to wait between scanning for a target.
set_persistent 布尔值 false Allows the actor to be set to persist upon targeting a player
target_search_height 小数 -1.0f Height in blocks to search for a target mob. -1.0f means the height does not matter.
within_radius 小数 0.0 Distance in blocks that the target can be within to launch an attack

返回顶部

minecraft:behavior.ocelot_sit_on_block

Allows to mob to be able to sit in place like the ocelot.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.offer_flower

Allows the mob to offer the player a flower like the Iron Golem does.
返回顶部

minecraft:behavior.open_door

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.

名称 类型 默认值 描述
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

Allows the mob to target another mob that hurts their owner.

名称 类型 默认值 描述
entity_types JSON对象 List of entity types that this mob can target if they hurt their owner
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
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

Allows the mob to target a mob that is hurt by their owner.

名称 类型 默认值 描述
entity_types JSON对象 List of entity types that this entity can target if the potential target is hurt by this mob's owner
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

返回顶部

minecraft:behavior.panic

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.

名称 类型 默认值 描述
damage_sources 列表 all The list of Entity Damage Sources that will cause this mob to panic
force 布尔值 false If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it
ignore_mob_damage 布尔值 false If true, the mob will not panic in response to damage from other mobs. This overrides the damage types in "damage_sources"
prefer_water 布尔值 false If true, the mob will prefer water over land
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.peek

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

minecraft:behavior.pet_sleep_with_owner

Allows the pet mob to move onto a bed with its owner while sleeping.

名称 类型 默认值 描述
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
search_height 整数 1 Height in blocks from the owner the pet can be to sleep with owner.
search_range 整数 0 The distance in blocks from the owner the pet can be to sleep with owner.
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.pickup_items

Allows the mob to pick up items on the ground.

名称 类型 默认值 描述
can_pickup_any_item 布尔值 false If true, the mob can pickup any item
can_pickup_to_hand_or_equipment 布尔值 true If true, the mob can pickup items to its hand or armor slots
excluded_items 列表 List of items this mob will not pick up
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
max_dist 小数 0.0 Maximum distance this mob will look for items to pick up
pickup_based_on_chance 布尔值 false If true, depending on the difficulty, there is a random chance that the mob may not be able to pickup items
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
track_target 布尔值 false If true, this mob will chase after the target as long as it's a valid target

返回顶部

minecraft:behavior.play

Allows the mob to play with other baby villagers. This can only be used by Villagers.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.player_ride_tamed

Allows the mob to be ridden by the player after being tamed.
返回顶部

minecraft:behavior.raid_garden

Allows the mob to eat/raid crops out of farms until they are full.

名称 类型 默认值 描述
blocks 列表 Blocks that the mob is looking for to eat/raid
eat_delay 整数 2 Time in seconds between each time it eats/raids
full_delay 整数 100 Amount of time in seconds before this mob wants to eat/raid again after eating its maximum
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
initial_eat_delay 整数 0 Time in seconds before starting to eat/raid once it arrives at it
max_to_eat 整数 6 Maximum number of crops this entity wants to eat/raid. If set to zero or less then it doesn't have a maximum
search_range 整数 0 Distance in blocks the mob will look for crops to eat
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.random_breach

Allows the mob to randomly break surface of the water.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
interval 整数 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
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
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

Allows a mob to randomly fly around.

名称 类型 默认值 描述
can_land_on_trees 布尔值 true If true, the mob can stop flying and land on a tree instead of the ground
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
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_hover

Allows the mob to hover around randomly, close to the surface

名称 类型 默认值 描述
hover_height 范围 [a, b] The height above the surface which the mob will try to maintain
interval 整数 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
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
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
y_offset 小数 0.0 Height in blocks to add to the selected target position

返回顶部

minecraft:behavior.random_look_around

Allows the mob to randomly look around.

名称 类型 默认值 描述
look_time 范围 [a, b] [2, 4] The range of time in seconds the mob will stay looking in a random direction before looking elsewhere

返回顶部

minecraft:behavior.random_look_around_and_sit

Allows the mob to randomly sit and look around for a duration. Note: Must have a sitting animation set up to use this.

名称 类型 默认值 描述
max_look_count 整数 2 The max amount of unique looks a mob will have while looking around.
max_look_time 整数 40 The max amount of time (in ticks) a mob will stay looking at a direction while looking around.
min_look_count 整数 1 The min amount of unique looks a mob will have while looking around.
min_look_time 整数 20 The min amount of time (in ticks) a mob will stay looking at a direction while looking around.
probability 整数 0.02 The probability of randomly looking around/sitting.

返回顶部

minecraft:behavior.random_sitting

Allows the mob to randomly sit for a duration.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
min_sit_time 小数 10 The minimum amount of time in seconds before the mob can stand back up
start_chance 小数 0.1 This is the chance that the mob will start this goal, from 0 to 1
stop_chance 小数 0.3 This is the chance that the mob will stop this goal, from 0 to 1

返回顶部

minecraft:behavior.random_stroll

Allows a mob to randomly stroll around.

名称 类型 默认值 描述
interval 整数 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
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
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

Allows an entity to randomly move through water

名称 类型 默认值 描述
avoid_surface 布尔值 true If true, the mob will avoid surface water blocks by swimming below them
interval 整数 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
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
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.receive_love

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

minecraft:behavior.restrict_open_door

Allows the mob to stay indoors during night time.
返回顶部

minecraft:behavior.restrict_sun

Allows the mob to automatically start avoiding the sun when its a clear day out.
返回顶部

minecraft:behavior.rise_to_liquid_level

Allows the mob to stay at a certain level when in liquid.

名称 类型 默认值 描述
liquid_y_offset 小数 0.0 Target distance down from the liquid surface. i.e. Positive values move the target Y down.
rise_delta 小数 0.0 Movement up in Y per tick when below the liquid surface.
sink_delta 小数 0.0 Movement down in Y per tick when above the liquid surface.

minecraft:behavior.roll

This allows the mob to roll forward.

名称 类型 默认值 描述
probability 小数 [1.0] The probability that the mob will use the goal.

返回顶部

minecraft:behavior.run_around_like_crazy

Allows the mob to run around aimlessly.

名称 类型 默认值 描述
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.scared

允许一个生物在外部天气处于雷暴时变为受惊状态。

名称 类型 默认值 描述
sound_interval 整数 0 当该意向以“1/延时”的机会被激活以开始时一个声音将会播放的时间间隔

返回顶部

minecraft:behavior.send_event

Allows the mob to send an event to another mob.

名称 类型 默认值 描述
cast_duration 小数 Total delay of the steps Time in seconds for the entire event sending process
look_at_target 布尔值 true If true, the mob will face the entity it sends an event to
sequence 列表 List of events to send
名称 类型 默认值 描述
base_delay 小数 0.0 Amount of time in seconds before starting this step
event 字符串 The event to send to the entity
sound_event 字符串 The sound event to play when this step happens

返回顶部

minecraft:behavior.share_items

Allows the mob to give items it has to others.

名称 类型 默认值 描述
entity_types JSON对象 List of entities this mob will share items with
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
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
max_dist 小数 0.0 Maximum distance in blocks this mob will look for entities to share items with
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.silverfish_merge_with_stone

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

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

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.

名称 类型 默认值 描述
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
within_radius 小数 0.0 Distance in blocks that the player has to be within to trigger the horse trap

返回顶部

minecraft:behavior.sleep

Allows mobs that own a bed to in a village to move to and sleep in it.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
sleep_collider_height 小数 1.0 The height of the mob's collider while sleeping
sleep_collider_width 小数 1.0 The width of the mob's collider while sleeping
sleep_y_offset 小数 1.0 The y offset of the mob's collider while sleeping
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
timeout_cooldown 小数 8.0 The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition

返回顶部

minecraft:behavior.slime_attack

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

名称 类型 默认值 描述
set_persistent 布尔值 false Allows the actor to be set to persist upon targeting a player

返回顶部

minecraft:behavior.snacking

Allows the mob to take a load off and snack on food that it found nearby.

名称 类型 默认值 描述
items 列表 Items that we are interested in snacking on
snacking_cooldown 小数 7.5 The cooldown time in seconds before the mob is able to snack again
snacking_cooldown_min 小数 0.5f The minimum time in seconds before the mob is able to snack again
snacking_stop_chance 小数 0.0017 This is the chance that the mob will stop snacking, from 0 to 1

返回顶部

minecraft:behavior.sneeze

Allows the mob to stop and sneeze possibly startling nearby mobs and dropping an item.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
drop_item_chance 小数 1.0 The probability that the mob will drop an item when it sneezes.
entity_types JSON对象 List of entity types this mob will startle (cause to jump) when it sneezes.
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
loot_table 字符串 Loot table to select dropped items from.
prepare_sound 字符串 Sound to play when the sneeze is about to happen.
prepare_time 小数 1.0 The time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing).
probability 小数 0.02 The probability of sneezing. A value of 1.00 is 100%
sound 字符串 Sound to play when the sneeze occurs.
within_radius 小数 0.0 Distance in blocks that mobs will be startled.

返回顶部

minecraft:behavior.squid_dive

Allows the squid to dive down in water. Can only be used by the Squid.
返回顶部

minecraft:behavior.squid_flee

Allows the squid to swim away. Can only be used by the Squid.
返回顶部

minecraft:behavior.squid_idle

Allows the squid to swim in place idly. Can only be used by the Squid.
返回顶部

minecraft:behavior.squid_move_away_from_ground

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

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

minecraft:behavior.stalk_and_pounce_on_target

Allows a mob to stalk a target, then once within range pounce onto a target, on success the target will be attacked dealing damage defined by the attack component. On failure, the mob will risk getting stuck

名称 类型 默认值 描述
interest_time 小数 2.0 The amount of time the mob will be interested before pouncing. This happens when the mob is within range of pouncing
leap_distance 小数 0.8 The distance in blocks the mob jumps in the direction of its target
leap_height 小数 0.9 The height in blocks the mob jumps when leaping at its target
max_stalk_dist 小数 10.0 The maximum distance away a target can be before the mob gives up on stalking
pounce_max_dist 小数 5.0 The maximum distance away from the target in blocks to begin pouncing at the target
set_persistent 布尔值 false Allows the actor to be set to persist upon targeting a player
stalk_speed 小数 1.2 The movement speed in which you stalk your target
strike_dist 小数 2.0 The max distance away from the target when landing from the pounce that will still result in damaging the target
stuck_time 小数 2.0 The amount of time the mob will be stuck if they fail and land on a block they can be stuck on

返回顶部

minecraft:behavior.stay_while_sitting

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

minecraft:behavior.stomp_turtle_egg

Allows this mob to stomp turtle eggs

名称 类型 默认值 描述
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
interval 整数 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
search_height 整数 1 Height in blocks the mob will look for turtle eggs to move towards
search_range 整数 0 The distance in blocks it will look for turtle eggs to move towards
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子

返回顶部

minecraft:behavior.stroll_towards_village

Allows the mob to move into a random location within a village within the search range.

名称 类型 默认值 描述
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the goal again
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
search_range 整数 0 The distance in blocks to search for points inside villages. If <= 0, find the closest village regardless of distance.
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
start_chance 小数 0.1 This is the chance that the mob will start this goal, from 0 to 1

返回顶部

minecraft:behavior.summon_entity

Allows the mob to attack the player by summoning other entities.

名称 类型 默认值 描述
summon_choices 列表 List of spells for the mob to use to summon entities. Each spell has the following parameters:
名称 类型 默认值 描述
cast_duration 小数 Total delay of the steps Time in seconds the spell casting will take
cooldown_time 小数 0.0 Time in seconds the mob has to wait before using the spell again
do_casting 布尔值 true If true, the mob will do the casting animations and render spell particles
filters Minecraft过滤器
max_activation_range 小数 32.0 Upper bound of the activation distance in blocks for this spell, must not be negative.
min_activation_range 小数 1.0 Lower bound of the activation distance in blocks for this spell, must not be negative.
particle_color 整数 0 The color of the particles for this spell
sequence 列表 List of steps for the spell. Each step has the following parameters:
名称 类型 默认值 描述
base_delay 小数 0.0 Amount of time in seconds to wait before this step starts
delay_per_summon 小数 0.0 Amount of time in seconds before each entity is summoned in this step
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
entity_type 字符串 The entity type of the entities we will spawn in this step
num_entities_spawned 整数 1 Number of entities that will be spawned in this step
shape 字符串 line The base shape of this step. Valid values are circle and line
size 小数 1.0 The base size of the entity
sound_event 字符串 The sound event to play for this step
summon_cap 整数 0 Maximum number of summoned entities at any given time
summon_cap_radius 小数 0.0
target 字符串 self The target of the spell. This is where the spell will start (line will start here, circle will be centered here)
start_sound_event 字符串 The sound event to play when using this spell
weight 小数 0.0 The weight of this spell. Controls how likely the mob is to choose this spell when casting one

返回顶部

minecraft:behavior.swell

Allows the creeper to swell up when a player is nearby. It can only be used by Creepers.

名称 类型 默认值 描述
start_distance 小数 10.0 This mob starts swelling when a target is at least this many blocks away
stop_distance 小数 2.0 This mob stops swelling when a target has moved away at least this many blocks

返回顶部

minecraft:behavior.take_flower

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

minecraft:behavior.tempt

Allows the mob to be tempted by food they like.

名称 类型 默认值 描述
can_get_scared 布尔值 false If true, the mob can stop being tempted if the player moves too fast while close to this mob
can_tempt_vertically 布尔值 false If true, vertical distance to the player will be considered when tempting.
can_tempt_while_ridden 布尔值 false If true, the mob can be tempted even if it has a passenger (i.e. if being ridden).
items 列表 List of items this mob is tempted by
sound_interval 范围 [a, b] [0.0, 0.0] Range of random ticks to wait between tempt sounds.
speed_multiplier 小数 1.0 Movement speed multiplier of the mob when using this AI Goal
tempt_sound 字符串 Sound to play while the mob is being tempted.
within_radius 小数 0.0 Distance in blocks this mob can get tempted by a player holding an item they like

minecraft:behavior.trade_interest

Allows the mob to look at a player that is holding a tradable item.

名称 类型 默认值 描述
carried_item_switch_time 小数 2.0 The max time in seconds that the trader will hold an item before attempting to switch for a different item that takes the same trade
cooldown 小数 2.0 The time in seconds before the trader can use this goal again
interest_time 小数 45.0 The max time in seconds that the trader will be interested with showing its trade items
remove_item_time 小数 1.0 The max time in seconds that the trader will wait when you no longer have items to trade
within_radius 小数 0.0 Distance in blocks this mob can be interested by a player holding an item they like

返回顶部

minecraft:behavior.trade_with_player

Allows the player to trade with this mob.
返回顶部

minecraft:behavior.vex_copy_owner_target

Allows the mob to target the same entity its owner is targeting.

名称 类型 默认值 描述
entity_types JSON对象 List of entities this mob can copy the owner from
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
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

Allows the mob to move around randomly like the Vex.
返回顶部

minecraft:behavior.wither_random_attack_pos_goal

Allows the wither to launch random attacks. Can only be used by the Wither Boss.
返回顶部

minecraft:behavior.wither_target_highest_damage

Allows the wither to focus its attacks on whichever mob has dealt the most damage to it.

名称 类型 默认值 描述
entity_types JSON对象 List of entity types the wither takes into account to find who dealt the most damage to it
名称 类型 默认值 描述
filters Minecraft过滤器 Conditions that make this entry in the list valid
max_dist 小数 16 Maximum distance this mob can be away to be a valid choice
must_see 布尔值 false If true, the mob has to be visible to be a valid choice
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
sprint_speed_multiplier 小数 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
walk_speed_multiplier 小数 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged

返回顶部

minecraft:behavior.work

允许该NPC使用他们的工作站POI

名称 类型 默认值 描述
active_time 整数 0 该NPC将会停留在他们的工作地点的刻的数量
can_work_in_rain 布尔值 false 如果为true,一个实体可以在他们的工作站POI位于雨中时工作。
goal_cooldown 整数 0 该意向在可以被再次使用之前冷却的刻的数量
on_arrival 字符串 当该实体到达他们的工作站并且完成工作时要运行的事件。
sound_delay_max 整数 0 一个声音将会播放的最大时间间隔
sound_delay_min 整数 0 一个声音将会播放的最小时间间隔
speed_multiplier 小数 1.0 该生物使用该AI意向时的移动速度乘子
work_in_rain_tolerance 整数 -1 如果“can_work_in_rain”为false,该值为雨不会打断该意向的最大剩余刻数。

返回顶部



特性

minecraft:attack

Defines an entity's melee attack and any additional effects on it.

名称 类型 默认值 描述
damage 范围 [a, b] Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it
effect_duration 小数 0.0 Duration in seconds of the status ailment applied to the damaged entity
effect_name 字符串 Identifier of the status ailment to apply to an entity attacked by this entity's melee attack

返回顶部

minecraft:spell_effects

Defines what mob effects to add and remove to the entity when adding this component.

名称 类型 默认值 描述
add_effects 列表 List of effects to add to this entity after adding this component
名称 类型 默认值 描述
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
remove_effects 字符串 List of identifiers of effects to be removed from this entity after adding this component

返回顶部

minecraft:strength

Defines the entity's strength to carry items.

名称 类型 默认值 描述
max 整数 5 The maximum strength of this entity
value 整数 1 The initial value of the strength

返回顶部



内置事件

名称 描述
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.

返回顶部

组件



minecraft:addrider

Adds a rider to the entity. Requires minecraft:rideable.

名称 类型 默认值 描述
entity_type 字符串 The entity type that will be riding this entity.
spawn_event 字符串 The spawn event that will be used when the riding entity is created.

返回顶部

minecraft:admire_item

Causes the mob to ignore attackable targets for a given duration.

名称 类型 默认值 描述
cooldown_after_being_attacked 整数 0 Duration, in seconds, for which mob won't admire items if it was hurt
duration 整数 10 Duration, in seconds, that the mob is pacified.

返回顶部

minecraft:ageable

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.

名称 类型 默认值 描述
drop_items 列表 List of items that the entity drops when it grows up.
duration 小数 1200.0 Amount of time before the entity grows up, -1 for always a baby.
feed_items 列表 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
grow_up 字符串 Event to run when this entity grows up.
transform_to_item Item Description Properties The feed item used will transform to this item upon successful interaction. Format: itemName:auxValue

返回顶部

minecraft:angry

Defines the entity's 'angry' state using a timer.

名称 类型 默认值 描述
angry_sound 字符串 The sound event to play when the mob is angry
broadcast_anger 布尔值 false If true, other entities of the same entity definition within the broadcastRange will also become angry
broadcast_anger_on_attack 布尔值 false If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob attacks
broadcast_anger_on_being_attacked 布尔值 false If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob is attacked
broadcast_filters Minecraft过滤器 Conditions that make this entry in the list valid
broadcast_range 整数 20 Distance in blocks within which other entities of the same entity definition will become angry
broadcast_targets 列表 A list of entity families to broadcast anger to
calm_event 字符串 Event to run after the number of seconds specified in duration expires (when the entity stops being 'angry')
duration 整数 25 The amount of time in seconds that the entity will be angry
duration_delta 整数 0 Variance in seconds added to the duration [-delta, delta]
filters Minecraft过滤器 Filter out mob types that it should not attack while angry (other Piglins)
sound_interval 范围 [a, b] 0 The range of time in seconds to randomly wait before playing the sound again

返回顶部

minecraft:annotation.break_door

Allows the actor to break doors assuming that that flags set up for the component to use in navigation

名称 类型 默认值 描述
break_time 小数 12.0 The time in seconds required to break through doors.
min_difficulty 字符串 hard The minimum difficulty that the world must be on for this entity to break doors.

返回顶部

minecraft:annotation.open_door

Allows the actor to open doors assuming that that flags set up for the component to use in navigation
返回顶部

minecraft:area_attack

A component that does damage to entities that get within range.

名称 类型 默认值 描述
cause 字符串 The type of damage that is applied to entities that enter the damage range.
damage_per_tick 整数 2 How much damage per tick is applied to entities that enter the damage range.
damage_range 小数 0.2 How close a hostile entity must be to have the damage applied.
entity_filter Minecraft过滤器 The set of entities that are valid to apply the damage to when within range.

返回顶部

minecraft:attack_cooldown

Adds a cooldown to a mob. The intention of this cooldown is to be used to prevent the mob from attempting to aquire new attack targets.

名称 类型 默认值 描述
attack_cooldown_complete_event 触发器 Event to be runned when the cooldown is complete.
attack_cooldown_time 范围 [a, b] [0.0, 1.0] Amount of time in seconds for the cooldown. Can be specified as a number or a pair of numbers (min and max).

返回顶部

minecraft:barter

Enables the component to drop an item as a barter exchange.

名称 类型 默认值 描述
barter_table 字符串 Loot table that's used to drop a random item.
cooldown_after_being_attacked 整数 0 Duration, in seconds, for which mob won't barter items if it was hurt

返回顶部

minecraft:block_climber

Allows the player to detect and maneuver on the scaffolding block.
返回顶部

minecraft:block_sensor

Fires off a specified event when a block in the block list is broken within the sensor range.

名称 类型 默认值 描述
on_break 列表 List of blocks to watch for being broken to fire off a specified event. If a block is in multiple lists, multiple events will fire.
sensor_radius 小数 16.00 The maximum radial distance in which a specified block can be detected. The biggest radius is 32.0.

返回顶部

minecraft:boostable

Defines the conditions and behavior of a rideable entity's boost.

名称 类型 默认值 描述
boost_items 列表 List of items that can be used to boost while riding this entity. Each item has the following properties:
名称 类型 默认值 描述
damage 整数 1 This is the damage that the item will take each time it is used.
item 字符串 Name of the item that can be used to boost.
replace_item 字符串 The item used to boost will become this item once it is used up.
duration 小数 3.0 Time in seconds for the boost.
speed_multiplier 小数 1.0 Factor by which the entity's normal speed increases. E.g. 2.0 means go twice as fast.

返回顶部

minecraft:boss

The current state of the boss for updating the boss HUD.

名称 类型 默认值 描述
hud_range 整数 55 The max distance from the boss at which the boss's health bar is present on the players screen.
name 字符串 The name that will be displayed above the boss's health bar.
should_darken_sky 布尔值 false Whether the sky should darken in the presence of the boss.

返回顶部

minecraft:break_blocks

Specifies the blocks that this entity can break as it moves around.

名称 类型 默认值 描述
breakable_blocks 列表 A list of the blocks that can be broken as this entity moves around

返回顶部

minecraft:breathable

Defines what blocks this entity can breathe in and gives them the ability to suffocate.

名称 类型 默认值 描述
breathe_blocks 列表 List of blocks this entity can breathe in, in addition to the other "breathes" parameters.
breathes_air 布尔值 true If true, this entity can breathe in air.
breathes_lava 布尔值 true If true, this entity can breathe in lava.
breathes_solids 布尔值 false If true, this entity can breathe in solid blocks.
breathes_water 布尔值 false If true, this entity can breathe in water.
generates_bubbles 布尔值 true If true, this entity will have visible bubbles while in water.
inhale_time 小数 0 Time in seconds to recover breath to maximum.
non_breathe_blocks 列表 List of blocks this entity can't breathe in, in addition to the other "breathes" parameters.
suffocate_time 整数 -20 Time in seconds between suffocation damage.
total_supply 整数 15 Time in seconds the entity can hold its breath.

minecraft:breedable

Defines the way an entity can get into the 'love' state.

名称 类型 默认值 描述
allow_sitting 布尔值 false If true, entities can breed while sitting
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.
breed_cooldown 小数 60 Time in seconds before the Entity can breed again.
breed_items 列表 The list of items that can be used to get the entity into the 'love' state
breeds_with 列表 The list of entity definitions that this entity can breed with.
名称 类型 默认值 描述
baby_type 字符串 The entity definition of this entity's babies.
breed_event 字符串 Event to run when this entity breeds.
mate_type 字符串 The entity definition of this entity's mate.
causes_pregnancy 布尔值 false If true, the entity will become pregnant instead of spawning a baby.
deny_parents_variant JSON对象 Determines how likely the baby of parents with the same variant will deny that variant and take a random variant within the given range instead.
名称 类型 默认值 描述
chance 小数 0 The percentage chance of denying the parents' variant.
max_variant 整数 0 The inclusive maximum of the variant range.
min_variant 整数 0 The inclusive minimum of the variant range.
environment_requirements 列表 The list of nearby block requirements to get the entity into the 'love' state.
blocks
The block types required nearby for the entity to breed.
返回顶部

count
The number of the required block types nearby for the entity to breed.
返回顶部

radius
How many blocks radius from the mob's center to search in for the required blocks. Bounded between 0 and 16.
返回顶部

extra_baby_chance 小数 0 Chance that up to 16 babies will spawn between 0.0 and 1.0, where 1.0 is 100%.
inherit_tamed 布尔值 true If true, the babies will be automatically tamed if its parents are
love_filters Minecraft过滤器 The filters to run when attempting to fall in love.
mutation_factor JSON对象 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.
名称 类型 默认值 描述
color 小数 0 The percentage chance of a mutation on the entity's color.
extra_variant 小数 0 The percentage chance of a mutation on the entity's extra variant type.
variant 小数 0 The percentage chance of a mutation on the entity's variant type.
require_full_health 布尔值 false If true, the entity needs to be at full health before it can breed.
require_tame 布尔值 true If true, the entities need to be tamed first before they can breed.
transform_to_item 字符串 The breed item used will transform to this item upon successful interaction. Format: itemName:auxValue

返回顶部

minecraft:bribeable

Defines the way an entity can get into the 'bribed' state.

名称 类型 默认值 描述
bribe_cooldown 小数 2.0 Time in seconds before the Entity can be bribed again.
bribe_items 列表 The list of items that can be used to bribe the entity.

返回顶部

minecraft:buoyant

Enables an entity to float on the specified liquid blocks.

名称 类型 默认值 描述
apply_gravity 布尔值 true Applies gravity each tick. Causes more of a wave simulation, but will cause more gravity to be applied outside liquids.
base_buoyancy 小数 1.0 Base buoyancy used to calculate how much will a mob float.
big_wave_probability 小数 0.03 Probability for a big wave hitting the entity. Only used if `simulate_waves` is true.
big_wave_speed 小数 10.0 Multiplier for the speed to make a big wave. Triggered depending on 'big_wave_probability'.
drag_down_on_buoyancy_removed 小数 0.0 How much an actor will be dragged down when the Buoyancy Component is removed.
liquid_blocks 列表 List of blocks this entity can float on. Must be a liquid block.
simulate_waves 布尔值 true Should the movement simulate waves going through.

返回顶部

minecraft:burns_in_daylight

Specifies if/how a mob burns in daylight.
返回顶部

minecraft:celebrate_hunt

Specifies hunt celebration behaviour.

名称 类型 默认值 描述
broadcast 布尔值 true If true, celebration will be broadcasted to other entities in the radius.
celeberation_targets Minecraft过滤器 The list of conditions that target of hunt must satisfy to initiate celebration.
celebrate_sound 字符串 The sound event to play when the mob is celebrating
duration 整数 4 Duration, in seconds, of celebration
radius 小数 16 If broadcast is enabled, specifies the radius in which it will notify other entities for celebration.
sound_interval 范围 [a, b] 0 The range of time in seconds to randomly wait before playing the sound again

返回顶部

minecraft:combat_regeneration

Gives Regeneration I and removes Mining Fatigue from the mob that kills the Actor's attack target.

名称 类型 默认值 描述
apply_to_family 布尔值 false Determines if the mob will grant mobs of the same type combat buffs if they kill the target.
apply_to_self 布尔值 false Determines if the mob will grant itself the combat buffs if it kills the target.
regeneration_duration 整数 5 The duration in seconds of Regeneration I added to the mob.

返回顶部

minecraft:conditional_bandwidth_optimization

Defines the Conditional Spatial Update Bandwidth Optimizations of this entity.

名称 类型 默认值 描述
conditional_values 列表 The object containing the conditional bandwidth optimization values.
conditional_values
Conditions that must be met for these optimization values to be used.
返回顶部

max_dropped_ticks
In relation to the optimization value, determines the maximum ticks spatial update packets can be not sent.
返回顶部

max_optimized_distance
The maximum distance considered during bandwidth optimizations. Any value below the max is interpolated to find optimization, and any value greater than or equal to this max results in max optimization.
返回顶部

use_motion_prediction_hints
When set to true, smaller motion packets will be sent during drop packet intervals, resulting in the same amount of packets being sent as without optimizations but with much less data being sent. This should be used when actors are travelling very quickly or teleporting to prevent visual oddities.
返回顶部

default_values JSON对象 The object containing the default bandwidth optimization values.
max_dropped_ticks
In relation to the optimization value, determines the maximum ticks spatial update packets can be not sent.
返回顶部

max_optimized_distance
The maximum distance considered during bandwidth optimizations. Any value below the max is interpolated to find optimization, and any value greater than or equal to this max results in max optimization.
返回顶部

use_motion_prediction_hints
When set to true, smaller motion packets will be sent during drop packet intervals, resulting in the same amount of packets being sent as without optimizations but with much less data being sent. This should be used when actors are travelling very quickly or teleporting to prevent visual oddities.
返回顶部

返回顶部

minecraft:custom_hit_test

List of hitboxes for melee and ranged hits against the entity.

名称 类型 默认值 描述
hitboxes 数组 Comma seperated list of hitboxes.

返回顶部

minecraft:damage_over_time

Applies defined amount of damage to the entity at specified intervals.

名称 类型 默认值 描述
damage_per_hurt 整数 1 Amount of damage caused each hurt.
time_between_hurt 小数 0.0 Time in seconds between damage.

返回顶部

minecraft:damage_sensor

Defines what events to call when this entity is damaged by specific entities or items.

名称 类型 默认值 描述
triggers 列表 List of triggers with the events to call when taking specific kinds of damage.
名称 类型 默认值 描述
cause 字符串 none Type of damage that triggers the events.
damage_modifier 小数 0.0 A modifier that adds to/removes from the base damage from the damage cause. It does not reduce damage to less than 0.
damage_multiplier 小数 1.0 A multiplier that modifies the base damage from the damage cause. If deals_damage is true the multiplier can only reduce the damage the entity will take to a minimum of 1.
deals_damage 布尔值 true If true, the damage dealt to the entity will take away health from it, set to false to make the entity ignore that damage.
on_damage JSON对象 Specifies filters for entity definitions and events.
on_damage_sound_event 字符串 Defines what sound to play, if any, when the on_damage filters are met.

返回顶部

minecraft:despawn

Despawns the Actor when the despawn rules or optional filters evaluate to true.

名称 类型 默认值 描述
despawn_from_chance 布尔值 true Determines if "min_range_random_chance" is used in the standard despawn rules
despawn_from_distance JSON对象 Specifies if the "min_distance" and "max_distance" are used in the standard despawn rules.
名称 类型 默认值 描述
max_distance 整数 128 maximum distance for standard despawn rules to instantly despawn the mob.
min_distance 整数 32 minimum distance for standard despawn rules to try to despawn the mob.
despawn_from_inactivity 布尔值 true Determines if the "min_range_inactivity_timer" is used in the standard despawn rules.
despawn_from_simulation_edge 布尔值 true Determines if the mob is instantly despawned at the edge of simulation distance in the standard despawn rules.
filters Minecraft过滤器 The list of conditions that must be satisfied before the Actor is despawned. If a filter is defined then standard despawn rules are ignored.
min_range_inactivity_timer 整数 30 The amount of time in seconds that the mob must be inactive.
min_range_random_chance 整数 800 A random chance between 1 and the given value.
remove_child_entities 布尔值 false If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned.

返回顶部

minecraft:drying_out_timer

Adds a timer for drying out that will count down and fire 'dried_out_event' or will stop as soon as the entity will get under rain or water and fire 'stopped_drying_out_event'

名称 类型 默认值 描述
dried_out_event 字符串 Event to fire when the drying out time runs out.
recover_after_dried_out_event 字符串 Event to fire when entity was already dried out but received increase in water supply.
stopped_drying_out_event 字符串 Event to fire when entity stopped drying out, for example got into water or under rain.
total_time 小数 0.0 Amount of time in seconds to dry out fully.
water_bottle_refill_time 小数 0.0 Optional amount of additional time in seconds given by using splash water bottle on entity.

返回顶部

minecraft:economy_trade_table

Defines this entity's ability to trade with players.

名称 类型 默认值 描述
convert_trades_economy 布尔值 false Determines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table. When the trades are converted, the mob will generate a new trade list with their new trade table, but then it will try to convert any of the same trades over to have the same enchantments and user data. For example, if the original has a Emerald to Enchanted Iron Sword (Sharpness 1), and the new trade also has an Emerald for Enchanted Iron Sword, then the enchantment will be Sharpness 1.
cured_discount 范围 [a, b] [-5, -20] How much should the discount be modified by when the player has cured the Zombie Villager. Can be specified as a pair of numbers (low-tier trade discount and high-tier trade discount)
display_name 字符串 Name to be displayed while trading with this entity
hero_demand_discount 整数 -4 Used in legacy prices to determine how much should Demand be modified by when the player has the Hero of the Village mob effect
max_cured_discount 范围 [a, b] [-25, -63] The max the discount can be modified by when the player has cured the Zombie Villager. Can be specified as a pair of numbers (low-tier trade discount and high-tier trade discount)
max_nearby_cured_discount 整数 -200 The max the discount can be modified by when the player has cured a nearby Zombie Villager
nearby_cured_discount 整数 -25 How much should the discount be modified by when the player has cured a nearby Zombie Villager
new_screen 布尔值 false Used to determine if trading with entity opens the new trade screen
persist_trades 布尔值 false Determines if the trades should persist when the mob transforms. This makes it so that the next time the mob is transformed to something with a trade_table or economy_trade_table, then it keeps their trades.
show_trade_screen 布尔值 true Show an in game trade screen when interacting with the mob.
table 字符串 File path relative to the resource pack root for this entity's trades
use_legacy_price_formula 布尔值 false Determines whether the legacy formula is used to determines the trade prices.

返回顶部

minecraft:entity_sensor

A component that fires an event when a set of conditions are met by other entities within the defined range.

名称 类型 默认值 描述
event 字符串 Event to fire when the conditions are met.
event_filters Minecraft过滤器 The set of conditions that must be satisfied to fire the event.
maximum_count 整数 -1 The maximum number of entities that must pass the filter conditions for the event to send.
minimum_count 整数 1 The minimum number of entities that must pass the filter conditions for the event to send.
relative_range 布尔值 true If true the sensor range is additive on top of the entity's size.
require_all 布尔值 false If true requires all nearby entities to pass the filter conditions for the event to send.
sensor_range 小数 10 The maximum distance another entity can be from this and have the filters checked against it.

返回顶部

minecraft:environment_sensor

Creates a trigger based on environment conditions.

名称 类型 默认值 描述
triggers 列表 The list of triggers that fire when the environment conditions match the given filter criteria.

返回顶部

minecraft:equip_item

The entity puts on the desired equipment.
返回顶部

minecraft:equippable

Defines an entity's behavior for having items equipped to it.

名称 类型 默认值 描述
slots 列表 List of slots and the item that can be equipped.
名称 类型 默认值 描述
accepted_items 列表 The list of items that can go in this slot.
interact_text 字符串 Text to be displayed when the entity can be equipped with this item when playing with Touch-screen controls.
item 字符串 Identifier of the item that can be equipped for this slot.
on_equip 字符串 Event to trigger when this entity is equipped with this item.
on_unequip 字符串 Event to trigger when this item is removed from this entity.
slot 整数 0 The slot number of this slot.

返回顶部

minecraft:experience_reward

.

名称 类型 默认值 描述
on_bred Molang 0 A Molang expression defining the amount of experience rewarded when this entity is successfully bred. An array of expressions adds each expression's result together for a final total.
on_death Molang 0 A Molang expression defining the amount of experience rewarded when this entity dies. An array of expressions adds each expression's result together for a final total.

返回顶部

minecraft:explode

Defines how the entity explodes.

名称 类型 默认值 描述
breaks_blocks 布尔值 true If true, the explosion will destroy blocks in the explosion radius.
causes_fire 布尔值 false If true, blocks in the explosion radius will be set on fire.
destroy_affected_by_griefing 布尔值 false If true, whether the explosion breaks blocks is affected by the mob griefing game rule.
fire_affected_by_griefing 布尔值 false If true, whether the explosion causes fire is affected by the mob griefing game rule.
fuse_length 范围 [a, b] [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.
fuse_lit 布尔值 false If true, the fuse is already lit when this component is added to the entity.
max_resistance 小数 3.40282e+38 A blocks explosion resistance will be capped at this value when an explosion occurs.
power 小数 3 The radius of the explosion in blocks and the amount of damage the explosion deals.

返回顶部

minecraft:flocking

Allows entities to flock in groups in water or not.

名称 类型 默认值 描述
block_distance 小数 0 The amount of blocks away the entity will look at to push away from.
block_weight 小数 0 The weight of the push back away from blocks.
breach_influence 小数 0 The amount of push back given to a flocker that breaches out of the water.
cohesion_threshold 小数 1 The threshold in which to start applying cohesion.
cohesion_weight 小数 1 The weight applied for the cohesion steering of the flock.
goal_weight 小数 0 The weight on which to apply on the goal output.
high_flock_limit 整数 0 Determines the high bound amount of entities that can be allowed in the flock.
in_water 布尔值 false Tells the Flocking Component if the entity exists in water.
influence_radius 小数 0 The area around the entity that allows others to be added to the flock.
innner_cohesion_threshold 小数 0 The distance in which the flocker will stop applying cohesion.
loner_chance 小数 0 The percentage chance between 0-1 that a fish will spawn and not want to join flocks. Invalid values will be capped at the end points.
low_flock_limit 整数 0 Determines the low bound amount of entities that can be allowed in the flock.
match_variants 布尔值 false Tells the flockers that they can only match similar entities that also match the variant, mark variants, and color data of the other potential flockers.
max_height 小数 0 The max height allowable in the air or water.
min_height 小数 0 The min height allowable in the air or water.
separation_threshold 小数 2 The distance that is determined to be to close to another flocking and to start applying separation.
separation_weight 小数 1 The weight applied to the separation of the flock.
use_center_of_mass 布尔值 false Tells the flockers that they will follow flocks based on the center of mass.

返回顶部

minecraft:genetics

Defines the way a mob's genes and alleles are passed on to its 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.

名称 类型 默认值 描述
genes 列表 The list of genes that this entity has and will cross with a partner during breeding.
名称 类型 默认值 描述
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.
名称 类型 默认值 描述
range_max 整数 0 Upper bound of the allele values for this gene.
range_min 整数 0 Lower bound of the allele values for this gene.
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.
名称 类型 默认值 描述
birth_event 字符串 Event to run when this mob is created and matches the allele conditions.
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.
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.
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.
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.
mutation_rate 小数 -1 If this value is non-negative, overrides the chance for this gene that an allele will be replaced with a random one instead of the parent's allele during birth. Non-negative values greater than `1` will be the same as the value `1`.
name 字符串 The name of the gene.
mutation_rate 小数 0.03125 Chance that an allele will be replaced with a random one instead of the parent's allele during birth.

返回顶部

minecraft:giveable

Defines sets of items that can be used to trigger events when used on this entity. The item will also be taken and placed in the entity's inventory.

名称 类型 默认值 描述
cooldown 小数 0.0 An optional cool down in seconds to prevent spamming interactions.
items 列表 The list of items that can be given to the entity to place in their inventory.
on_give 字符串 Event to fire when the correct item is given.

返回顶部

minecraft:group_size

Keeps track of entity group size in the given radius.

名称 类型 默认值 描述
filters Minecraft过滤器 The list of conditions that must be satisfied for other entities to be counted towards group size.
radius 小数 16 Radius from center of entity.

返回顶部

minecraft:grows_crop

Could increase crop growth when entity walks over crop

名称 类型 默认值 描述
chance 小数 0 Value between 0-1. Chance of success per tick.
charges 整数 10 Number of charges

返回顶部

minecraft:healable

Defines the interactions with this entity for healing it.

名称 类型 默认值 描述
filters Minecraft过滤器 The filter group that defines the conditions for using this item to heal the entity.
force_use 布尔值 false Determines if item can be used regardless of entity being at full health.
items 数组 The array of items that can be used to heal this entity.
名称 类型 默认值 描述
heal_amount 整数 1 The amount of health this entity gains when fed this item.
item 字符串 Item identifier that can be used to heal this entity.

返回顶部

minecraft:home

Saves a home pos for when the the entity is spawned.

名称 类型 默认值 描述
home_block_list 列表 Optional block list that the home position will be associated with. If any of the blocks no longer exist at that position, the home restriction is removed. Example syntax: minecraft:sand. Not supported: minecraft:sand:1
restriction_radius 整数 -1 The radius that the entity will be restricted to in relation to its home

返回顶部

minecraft:hurt_on_condition

Defines a set of conditions under which an entity should take damage.

名称 类型 默认值 描述
damage_conditions 数组 List of damage conditions that when met can cause damage to the entity.
cause
The kind of damage that is caused to the entity. Various armors and spells use this to determine if the entity is immune.

none

返回顶部

damage_per_tick
The amount of damage done each tick that the conditions are met.

filters
The set of conditions that must be satisfied before the entity takes the defined damage.

返回顶部

minecraft:inside_block_notifier

Verifies whether the entity is inside any of the listed blocks.

名称 类型 默认值 描述
block_list 列表 List of blocks, with certain block states, that we are monitoring to see if the entity is inside.

返回顶部

minecraft:insomnia

Adds a timer since last rested to see if phantoms should spawn.

名称 类型 默认值 描述
days_until_insomnia 小数 3.0 Number of days the mob has to stay up until the insomnia effect begins.

返回顶部

minecraft:instant_despawn

Despawns the Actor immediately.

名称 类型 默认值 描述
remove_child_entities 布尔值 false If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned.

返回顶部

minecraft:interact

Defines interactions with this entity.

名称 类型 默认值 描述
add_items JSON对象 Loot table with items to add to the player's inventory upon successful interaction.
名称 类型 默认值 描述
table 字符串 File path, relative to the Behavior Pack's path, to the loot table file.
cooldown 小数 0 Time in seconds before this entity can be interacted with again.
cooldown_after_being_attacked 小数 0 Time in seconds before this entity can be interacted with after being attacked.
health_amount Integer 0 The amount of health this entity will recover or hurt when interacting with this item. Negative values will harm the entity.
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.
interact_text 字符串 Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls.
on_interact 字符串 Event to fire when the interaction occurs.
particle_on_start JSON对象 Particle effect that will be triggered at the start of the interaction.
particle_offset_towards_interactor
Whether or not the particle will appear closer to who performed the interaction.
返回顶部

particle_type
The type of particle that will be spawned.
返回顶部

particle_y_offset
Will offset the particle this amount in the y direction.
返回顶部

play_sounds 字符串 List of sounds to play when the interaction occurs.
spawn_entities 字符串 List of entities to spawn when the interaction occurs.
spawn_items JSON对象 Loot table with items to drop on the ground upon successful interaction.
名称 类型 默认值 描述
table 字符串 File path, relative to the Behavior Pack's path, to the loot table file.
swing 布尔值 false If true, the player will do the 'swing' animation when interacting with this entity.
transform_to_item 字符串 The item used will transform to this item upon successful interaction. Format: itemName:auxValue
use_item 布尔值 false If true, the interaction will use an item.

返回顶部

minecraft:inventory

Defines this entity's inventory properties.

名称 类型 默认值 描述
additional_slots_per_strength 整数 0 Number of slots that this entity can gain per extra strength
can_be_siphoned_from 布尔值 false If true, the contents of this inventory can be removed by a hopper
container_type 字符串 none Type of container this entity has. Can be horse, minecart_chest, minecart_hopper, inventory, container or hopper
inventory_size 整数 5 Number of slots the container has
private 布尔值 false If true, the entity will not drop its inventory on death
restrict_to_owner 布尔值 false If true, the entity's inventory can only be accessed by its owner or itself

返回顶部

minecraft:item_hopper

Determines that this entity is an item hopper.
返回顶部

minecraft:jump.dynamic

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

minecraft:jump.static

Gives the entity the ability to jump.

名称 类型 默认值 描述
jump_power 小数 0.42 The initial vertical velocity for the jump

返回顶部

minecraft:leashable

Allows this entity to be leashed and defines the conditions and events for this entity when is leashed.

名称 类型 默认值 描述
can_be_stolen 布尔值 false If true, players can leash this entity even if it is already leashed to another mob.
hard_distance 小数 6 Distance in blocks at which the leash stiffens, restricting movement.
max_distance 小数 10 Distance in blocks at which the leash breaks.
on_leash 字符串 Event to call when this entity is leashed.
on_unleash 字符串 Event to call when this entity is unleashed.
soft_distance 小数 4 Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it.

返回顶部

minecraft:lookat

Defines the behavior when another entity looks at this entity.

名称 类型 默认值 描述
allow_invulnerable 布尔值 false If true, invulnerable entities (e.g. Players in creative mode) are considered valid targets.
filters Minecraft过滤器 Defines the entities that can trigger this component.
look_cooldown 范围 [a, b] [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.
look_event 字符串 The event identifier to run when the entities specified in filters look at this entity.
search_radius 小数 10 Maximum distance this entity will look for another entity looking at it.
set_target 布尔值 true If true, this entity will set the attack target as the entity that looked at it.

返回顶部

minecraft:managed_wandering_trader

This component is used to implement part of the Wandering Trader behavior
返回顶部

minecraft:mob_effect

A component that applies a mob effect to entities that get within range.

名称 类型 默认值 描述
effect_range 小数 0.2 How close a hostile entity must be to have the mob effect applied.
effect_time 整数 10 How long the applied mob effect lasts in seconds.
entity_filter Minecraft过滤器 The set of entities that are valid to apply the mob effect to.
mob_effect 字符串 The mob effect that is applied to entities that enter this entities effect range.

返回顶部

minecraft:movement.amphibious

This move control allows the mob to swim in water and walk on land.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.basic

This component accents the movement of an entity.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.fly

This move control causes the mob to fly.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.generic

This move control allows a mob to fly, swim, climb, etc.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.hover

This move control causes the mob to hover.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.jump

Move control that causes the mob to jump as it moves with a specified delay between jumps.

名称 类型 默认值 描述
jump_delay 范围 [a, b] [0.0, 0.0] Delay after landing when using the slime move control.
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.skip

This move control causes the mob to hop as it moves.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.

返回顶部

minecraft:movement.sway

This move control causes the mob to sway side to side giving the impression it is swimming.

名称 类型 默认值 描述
max_turn 小数 30.0 The maximum number in degrees the mob can turn per tick.
sway_amplitude 小数 0.05 Strength of the sway movement.
sway_frequency 小数 0.5 Multiplier for the frequency of the sway movement.

返回顶部

minecraft:nameable

Allows this entity to be named (e.g. using a name tag).

名称 类型 默认值 描述
allow_name_tag_renaming 布尔值 true If true, this entity can be renamed with name tags
always_show 布尔值 false If true, the name will always be shown
default_trigger 字符串 Trigger to run when the entity gets named
name_actions JSON对象 Describes the special names for this entity and the events to call when the entity acquires those names
名称 类型 默认值 描述
name_filter 字符串 List of special names that will cause the events defined in 'on_named' to fire
on_named 字符串 Event to be called when this entity acquires the name specified in 'name_filter'

返回顶部

minecraft:navigation.climb

Allows this entity to generate paths that include vertical walls like the vanilla Spiders do.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:navigation.float

Allows this entity to generate paths by flying around the air like the regular Ghast.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:navigation.fly

Allows this entity to generate paths in the air like the vanilla Parrots do.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:navigation.generic

Allows this entity to generate paths by walking, swimming, flying and/or climbing around and jumping up and down a block.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:navigation.hover

Allows this entity to generate paths in the air like the vanilla Bees do. Keeps them from falling out of the skies and doing predictive movement.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:navigation.swim

Allows this entity to generate paths that include water.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:navigation.walk

Allows this entity to generate paths by walking around and jumping up and down a block like regular mobs.

名称 类型 默认值 描述
avoid_damage_blocks 布尔值 false Tells the pathfinder to avoid blocks that cause damage when finding a path
avoid_portals 布尔值 false Tells the pathfinder to avoid portals (like nether portals) when finding a path
avoid_sun 布尔值 false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
avoid_water 布尔值 false Tells the pathfinder to avoid water when creating a path
blocks_to_avoid 列表 Tells the pathfinder which blocks to avoid when creating a path
can_breach 布尔值 false Tells the pathfinder whether or not it can jump out of water (like a dolphin)
can_break_doors 布尔值 false Tells the pathfinder that it can path through a closed door and break it
can_jump 布尔值 true Tells the pathfinder whether or not it can jump up blocks
can_open_doors 布尔值 false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
can_open_iron_doors 布尔值 false Tells the pathfinder that it can path through a closed iron door assuming the AI will open the door
can_pass_doors 布尔值 true Whether a path can be created through a door
can_path_from_air 布尔值 false Tells the pathfinder that it can start pathing when in the air
can_path_over_lava 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the lava
can_path_over_water 布尔值 false Tells the pathfinder whether or not it can travel on the surface of the water
can_sink 布尔值 true Tells the pathfinder whether or not it will be pulled down by gravity while in water
can_swim 布尔值 false Tells the pathfinder whether or not it can path anywhere through water and plays swimming animation along that path
can_walk 布尔值 true Tells the pathfinder whether or not it can walk on the ground outside water
can_walk_in_lava 布尔值 false Tells the pathfinder whether or not it can travel in lava like walking on ground
is_amphibious 布尔值 false Tells the pathfinder whether or not it can walk on the ground underwater

返回顶部

minecraft:out_of_control

Defines the entity's 'out of control' state.
返回顶部

minecraft:peek

Defines the entity's 'peek' behavior, defining the events that should be called during it.

名称 类型 默认值 描述
on_close 字符串 Event to call when the entity is done peeking.
on_open 字符串 Event to call when the entity starts peeking.
on_target_open 字符串 Event to call when the entity's target entity starts peeking.

返回顶部

minecraft:persistent

Defines whether an entity should be persistent in the game world.
返回顶部

minecraft:physics

Defines physics properties of an actor, including if it is affected by gravity or if it collides with objects.

名称 类型 默认值 描述
has_collision 布尔值 true Whether or not the object collides with things.
has_gravity 布尔值 true Whether or not the entity is affected by gravity.

返回顶部

minecraft:preferred_path

Specifies costing information for mobs that prefer to walk on preferred paths.

名称 类型 默认值 描述
default_block_cost 小数 0 Cost for non-preferred blocks
jump_cost 整数 0 Added cost for jumping up a node
max_fall_blocks 整数 3 Distance mob can fall without taking damage
preferred_path_blocks 列表 A list of blocks with their associated cost

返回顶部

minecraft:projectile

Allows the entity to be a thrown entity.

名称 类型 默认值 描述
angle_offset 小数 0 Determines the angle at which the projectile is thrown
catch_fire 布尔值 false If true, the entity hit will be set on fire
crit_particle_on_hurt 布尔值 false If true, the projectile will produce additional particles when a critical hit happens
destroy_on_hurt 布尔值 false If true, this entity will be destroyed when hit
filter 字符串 Entity Definitions defined here can't be hurt by the projectile
fire_affected_by_griefing 布尔值 false If true, whether the projectile causes fire is affected by the mob griefing game rule
gravity 小数 0.05 The gravity applied to this entity when thrown. The higher the value, the faster the entity falls
hit_sound 字符串 The sound that plays when the projectile hits something
homing 布尔值 false If true, the projectile homes in to the nearest entity
inertia 小数 0.99 The fraction of the projectile's speed maintained every frame while traveling in air
is_dangerous 布尔值 false If true, the projectile will be treated as dangerous to the players
knockback 布尔值 true If true, the projectile will knock back the entity it hits
lightning 布尔值 false If true, the entity hit will be struck by lightning
liquid_inertia 小数 0.6 The fraction of the projectile's speed maintained every frame while traveling in water
multiple_targets 布尔值 true If true, the projectile can hit multiple entities per flight
offset 向量 [a, b, c] [0, 0, 0] The offset from the entity's anchor where the projectile will spawn
on_fire_time 小数 5 Time in seconds that the entity hit will be on fire for
particle 字符串 iconcrack Particle to use upon collision
potion_effect 整数 -1 Defines the effect the arrow will apply to the entity it hits
power 小数 1.3 Determines the velocity of the projectile
reflect_on_hurt 布尔值 false If true, this entity will be reflected back when hit
semi_random_diff_damage 布尔值 false If true, damage will be randomized based on damage and speed
shoot_sound 字符串 The sound that plays when the projectile is shot
shoot_target 布尔值 true If true, the projectile will be shot towards the target of the entity firing it
should_bounce 布尔值 false If true, the projectile will bounce upon hit
splash_potion 布尔值 false If true, the projectile will be treated like a splash potion
splash_range 小数 4 Radius in blocks of the 'splash' effect
uncertainty_base 小数 0 The base accuracy. Accuracy is determined by the formula uncertaintyBase - difficultyLevel * uncertaintyMultiplier
uncertainty_multiplier 小数 0 Determines how much difficulty affects accuracy. Accuracy is determined by the formula uncertaintyBase - difficultyLevel * uncertaintyMultiplier

返回顶部

minecraft:pushable

Defines what can push an entity between other entities and pistons.

名称 类型 默认值 描述
is_pushable 布尔值 true Whether the entity can be pushed by other entities.
is_pushable_by_piston 布尔值 true Whether the entity can be pushed by pistons safely.

返回顶部

minecraft:raid_trigger

Attempts to trigger a raid at the entity's location.

名称 类型 默认值 描述
triggered_event 字符串 Event to run we attempt to trigger a raid on the village.

返回顶部

minecraft:rail_movement

Defines the entity's movement on the rails. An entity with this component is only allowed to move on the rail.

名称 类型 默认值 描述
max_speed 小数 0.4 Maximum speed that this entity will move at when on the rail.

返回顶部

minecraft:rail_sensor

名称 类型 默认值 描述
check_block_types 布尔值 false If true, on tick this entity will trigger its on_deactivate behavior
eject_on_activate 布尔值 true If true, this entity will eject all of its riders when it passes over an activated rail
eject_on_deactivate 布尔值 false If true, this entity will eject all of its riders when it passes over a deactivated rail
on_activate 字符串 Event to call when the rail is activated
on_deactivate 字符串 Event to call when the rail is deactivated
tick_command_block_on_activate 布尔值 true If true, command blocks will start ticking when passing over an activated rail
tick_command_block_on_deactivate 布尔值 false If false, command blocks will stop ticking when passing over a deactivated rail

返回顶部

minecraft:ravager_blocked

Defines the ravager's response to their melee attack being blocked.

名称 类型 默认值 描述
knockback_strength 小数 3.0 The strength with which blocking entities should be knocked back
reaction_choices 列表 [ ] A list of weighted responses to the melee attack being blocked

返回顶部

minecraft:rideable

Determines whether this entity can be ridden. Allows specifying the different seat positions and quantity.

名称 类型 默认值 描述
controlling_seat 整数 0 The seat that designates the driver of the entity. This is only observed by the horse/boat styles of riding; minecarts/entities with "minecraft:controlled_by_player" give control to any player in any seat.
crouching_skip_interact 布尔值 true If true, this entity can't be interacted with if the entity interacting with it is crouching
family_types 列表 List of entities that can ride this entity
interact_text 字符串 The text to display when the player can interact with the entity when playing with Touch-screen controls
priority 整数 0 This field may exist in old data but isn't used by minecraft:rideable.
pull_in_entities 布尔值 false If true, this entity will pull in entities that are in the correct family_types into any available seats
rider_can_interact 布尔值 false If true, this entity will be picked when looked at by the rider
seat_count 整数 1 The number of entities that can ride this entity at the same time
seats 列表 The list of positions and number of riders for each position for entities riding this entity
名称 类型 默认值 描述
lock_rider_rotation 小数 181 Angle in degrees that a rider is allowed to rotate while riding this entity. Omit this property for no limit
max_rider_count 整数 seat_count Defines the maximum number of riders that can be riding this entity for this seat to be valid
min_rider_count 整数 0 Defines the minimum number of riders that need to be riding this entity before this seat can be used
position 向量 [a, b, c] [0, 0, 0] Position of this seat relative to this entity's position
rotate_rider_by Molang 0 Offset to rotate riders by

返回顶部

minecraft:scale_by_age

Defines the entity's size interpolation based on the entity's age.

名称 类型 默认值 描述
end_scale 小数 1 Ending scale of the entity when it's fully grown.
start_scale 小数 1 Initial scale of the newborn entity.

返回顶部

minecraft:scheduler

Fires off scheduled mob events at time of day events.

名称 类型 默认值 描述
scheduled_events 列表 The list of triggers that fire when the conditions match the given filter criteria. If any filter criteria overlap the first defined event will be picked.

返回顶部

minecraft:shareables

Defines a list of items the mob wants to share or pick up. Each item must have the following parameters:

名称 类型 默认值 描述
all_items 布尔值 false A bucket for all other items in the game. Note this category is always least priority items.
all_items_max_amount 整数 -1 Maximum number of this item the mob will hold.
all_items_surplus_amount 整数 -1 Number of this item considered extra that the entity wants to share.
all_items_want_amount 整数 -1 Number of this item this entity wants to share.
items 列表 List of items that the entity wants to share.
admire
Mob will admire the item after picking up by looking at it. For this to happen the mob needs to have an Admire component and an Admire goal.
返回顶部

barter
Mob will barter for the item after picking it up. For this to work the mob needs to have a Barter component and a Barter goal.
返回顶部

consume_item
Determines whether the mob will consume the item or not.
返回顶部

craft_into
Defines the item this entity wants to craft with the item defined by "item". Should be an item name.
返回顶部

item
The name of the item. Aux value can be specified, for instance 'minecraft:skull:1'.
返回顶部

max_amount
Maximum number of this item the mob will hold.
返回顶部

pickup_limit
Maximum number of this item the mob will pick up during a single goal tick.
返回顶部

priority
Prioritizes which items the entity prefers. 0 is the highest priority.
返回顶部

stored_in_inventory
Determines whether the mob will try to put the item in its inventory if it has the inventory component and if it can't be equipped.
返回顶部

surplus_amount
Number of this item considered extra that the entity wants to share.
返回顶部

want_amount
Number of this item this entity wants to have.
返回顶部

返回顶部

minecraft:shooter

Defines the entity's ranged attack behavior.

名称 类型 默认值 描述
aux_val 整数 -1 ID of the Potion effect to be applied on hit
def 字符串 Actor definition to use as projectile for the ranged attack. The actor definition must have the projectile component to be able to be shot as a projectile

返回顶部

minecraft:sittable

Defines the entity's 'sit' state.

名称 类型 默认值 描述
sit_event 字符串 Event to run when the entity enters the 'sit' state
stand_event 字符串 Event to run when the entity exits the 'sit' state

返回顶部

minecraft:spawn_entity

Adds a timer after which this entity will spawn another entity or item (similar to vanilla's chicken's egg-laying behavior).

名称 类型 默认值 描述
filters Minecraft过滤器 If present, the specified entity will only spawn if the filter evaluates to true.
max_wait_time 整数 600 Maximum amount of time to randomly wait in seconds before another entity is spawned.
min_wait_time 整数 300 Minimum amount of time to randomly wait in seconds before another entity is spawned.
num_to_spawn 整数 1 The number of entities of this type to spawn each time that this triggers.
should_leash 布尔值 false If true, this the spawned entity will be leashed to the parent.
single_use 布尔值 false If true, this component will only ever spawn the specified entity once.
spawn_entity 字符串 Identifier of the entity to spawn, leave empty to spawn the item defined by "spawn_item" instead.
spawn_event 字符串 minecraft:entity_born Event to call when the entity is spawned.
spawn_item 字符串 egg Item identifier of the item to spawn.
spawn_method 字符串 born Method to use to spawn the entity.
spawn_sound 字符串 plop Identifier of the sound effect to play when the entity is spawned.

返回顶部

minecraft:strength

Defines the entity's strength to carry items.

名称 类型 默认值 描述
max 整数 5 The maximum strength of this entity
value 整数 1 The initial value of the strength

返回顶部

minecraft:tameable

Defines the rules for a mob to be tamed by the player.

名称 类型 默认值 描述
probability 小数 1 The chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100%
tame_event 字符串 Event to run when this entity becomes tamed
tame_items 列表 The list of items that can be used to tame this entity

返回顶部

minecraft:tamemount

Allows the Entity to be tamed by mounting it.

名称 类型 默认值 描述
attempt_temper_mod 整数 5 The amount the entity's temper will increase when mounted.
autoRejectItems JSON对象 The list of items that, if carried while interacting with the entity, will anger it.
名称 类型 默认值 描述
item 字符串 Name of the item this entity dislikes and will cause it to get angry if used while untamed.
feed_items JSON对象 The list of items that can be used to increase the entity's temper and speed up the taming process.
名称 类型 默认值 描述
item 字符串 Name of the item this entity likes and can be used to increase this entity's temper.
temper_mod 整数 0 The amount of temper this entity gains when fed this item.
feed_text 字符串 The text that shows in the feeding interact button.
max_temper 整数 100 The maximum value for the entity's random starting temper.
min_temper 整数 0 The minimum value for the entity's random starting temper.
ride_text 字符串 The text that shows in the riding interact button.
tame_event 字符串 Event that triggers when the entity becomes tamed.

返回顶部

minecraft:target_nearby_sensor

Defines the entity's range within which it can see or sense other entities to target them.

名称 类型 默认值 描述
inside_range 小数 1 Maximum distance in blocks that another entity will be considered in the 'inside' range
must_see 布尔值 false Whether the other entity needs to be visible to trigger 'inside' events
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
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
on_vision_lost_inside_range 字符串 Event to call when an entity exits visual range. Can specify 'event' for the name of the event and 'target' for the target of the event
outside_range 小数 5 Maximum distance in blocks that another entity will be considered in the 'outside' range

返回顶部

minecraft:teleport

Defines an entity's teleporting behavior.

名称 类型 默认值 描述
dark_teleport_chance 小数 0.01 Modifies the chance that the entity will teleport if the entity is in darkness
light_teleport_chance 小数 0.01 Modifies the chance that the entity will teleport if the entity is in daylight
max_random_teleport_time 小数 20 Maximum amount of time in seconds between random teleports
min_random_teleport_time 小数 0 Minimum amount of time in seconds between random teleports
random_teleport_cube 向量 [a, b, c] [32, 16, 32] Entity will teleport to a random position within the area defined by this cube
random_teleports 布尔值 true If true, the entity will teleport randomly
target_distance 小数 16 Maximum distance the entity will teleport when chasing a target
target_teleport_chance 小数 1 The chance that the entity will teleport between 0.0 and 1.0. 1.0 means 100%

返回顶部

minecraft:tick_world

Defines if the entity ticks the world and the radius around it to tick.

名称 类型 默认值 描述
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.
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.
radius Positive Integer 2 The area around the entity to tick. Default: 2. Allowed range: 2-6.

返回顶部

minecraft:timer

Adds a timer after which an event will fire.

名称 类型 默认值 描述
looping 布尔值 true If true, the timer will restart every time after it fires.
randomInterval 布尔值 true If true, the amount of time on the timer will be random between the min and max values specified in time.
random_time_choices 列表 [ ] This is a list of objects, representing one value in seconds that can be picked before firing the event and an optional weight. Incompatible with time.
time 范围 [a, b] [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). Incompatible with random_time_choices.
time_down_event 字符串 Event to fire when the time on the timer runs out.

返回顶部

minecraft:trade_table

Defines this entity's ability to trade with players.

名称 类型 默认值 描述
convert_trades_economy 布尔值 false Determines when the mob transforms, if the trades should be converted when the new mob has a economy_trade_table. When the trades are converted, the mob will generate a new trade list with their new trade table, but then it will try to convert any of the same trades over to have the same enchantments and user data. For example, if the original has a Emerald to Enchanted Iron Sword (Sharpness 1), and the new trade also has an Emerald for Enchanted Iron Sword, then the enchantment will be Sharpness 1.
display_name 字符串 Name to be displayed while trading with this entity.
new_screen 布尔值 false Used to determine if trading with entity opens the new trade screen.
persist_trades 布尔值 false Determines if the trades should persist when the mob transforms. This makes it so that the next time the mob is transformed to something with a trade_table or economy_trade_table, then it keeps their trades.
table 字符串 File path relative to the behavior pack root for this entity's trades.

返回顶部

minecraft:trail

Causes an entity to leave a trail of blocks as it moves about the world.

名称 类型 默认值 描述
block_type 字符串 air The type of block you wish to be spawned by the entity as it move about the world. Solid blocks may not be spawned at an offset of (0,0,0).
spawn_filter Minecraft过滤器 One or more conditions that must be met in order to cause the chosen block type to spawn.
spawn_offset 向量 [a, b, c] [0, 0, 0] The distance from the entities current position to spawn the block. Capped at up to 16 blocks away. The X value is left/right(-/+), the Z value is backward/forward(-/+), the Y value is below/above(-/+).

返回顶部

minecraft:transformation

Defines an entity's transformation from the current definition into another

名称 类型 默认值 描述
add JSON对象 List of components to add to the entity after the transformation
名称 类型 默认值 描述
component_groups 列表 Names of component groups to add
begin_transform_sound 字符串 Sound to play when the transformation starts
delay JSON对象 Defines the properties of the delay for the transformation
名称 类型 默认值 描述
block_assist_chance 小数 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
block_chance 小数 0 Chance that, once a block is found, will help speed up the transformation
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
block_radius 整数 0 Distance in Blocks that the entity will search for blocks that can help the transformation
block_types 列表 List of blocks that can help the transformation of this entity
value 小数 0 Time in seconds before the entity transforms
drop_equipment 布尔值 false Cause the entity to drop all equipment upon transformation
drop_inventory 布尔值 false Cause the entity to drop all items in inventory upon transformation
into 字符串 Entity Definition that this entity will transform into
keep_level 布尔值 false If this entity has trades and has leveled up, it should maintain that level after transformation.
keep_owner 布尔值 false If this entity is owned by another entity, it should remain owned after transformation.
preserve_equipment 布尔值 false Cause the entity to keep equipment after going through transformation
transformation_sound 字符串 Sound to play when the entity is done transforming

返回顶部

minecraft:trusting

Defines the rules for a mob to trust players.

名称 类型 默认值 描述
probability 小数 1.00 The chance of the entity trusting with each item use between 0.0 and 1.0, where 1.0 is 100%.
trust_event 字符串 Event to run when this entity becomes trusting.
trust_items 列表 The list of items that can be used to get the entity to trust players.

返回顶部

minecraft:water_movement

名称 类型 默认值 描述
drag_factor 小数 0.8 Drag factor to determine movement speed when in water.

返回顶部



实体定义属性

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.

format_version

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.
返回顶部

Code Example

Example

{
  "format_version": "1.8.0",
  "minecraft:entity": {
    "component_groups": {
      ...
    }
    ...
  }
}



实体描述属性

This section defines properties required to identify and construct the entity

实体描述属性

identifier

Sets the name for this entity's description.

类型 默认值 描述
字符串 The identifier for this entity

返回顶部

is_spawnable

Sets whether or not this entity has a spawn egg in the creative ui.

类型 默认值 描述
布尔值 false Set to determine if this entity has a spawn egg.

返回顶部

is_summonable

Sets whether or not we can summon this entity using commands such as /summon.

类型 默认值 描述
布尔值 false Flag to mark this entity as being summonable or not.

返回顶部

runtime_identifier

Sets the name for the Vanilla Minecraft identifier this entity will use to build itself from.

类型 默认值 描述
字符串 The identifier for the class to construct this entity with

返回顶部



animations

Sets the mapping of internal animation references to actual animations. This is a JSON Object of name/animation pairs

名称 类型 默认值 描述
animation 字符串 none Actual animation to use
name 字符串 none Internal (to the entity) name of this animation entry

返回顶部

scripts

Sets the mapping of internal animation controller references to actual animation controller. This is a JSON Array of name/animation-controller pairs

名称 类型 默认值 描述
animation controller 字符串 none Actual animation to use
name 字符串 none Internal (to the entity) name of this animation entry

返回顶部



ID列表

AI意向

JSON名称 ID
minecraft:behavior.admire_item 1024844406
minecraft:behavior.barter 536670686
minecraft:behavior.beg 1346418048
minecraft:behavior.break_door -1798237626
minecraft:behavior.breed 51166360
minecraft:behavior.defend_trusted_target 2070046390
minecraft:behavior.door_interact -286762735
minecraft:behavior.dragondeath -1541162059
minecraft:behavior.dragonholdingpattern 1066617362
minecraft:behavior.dragonlanding -152352492
minecraft:behavior.dragonscanning -1003941066
minecraft:behavior.dragontakeoff -1912535317
minecraft:behavior.drink_potion 277029334
minecraft:behavior.eat_carried_item -184757575
minecraft:behavior.enderman_leave_block -717580550
minecraft:behavior.enderman_take_block -537294220
minecraft:behavior.explore_outskirts -1955198366
minecraft:behavior.find_cover -1231227755
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.follow_target_captain -135480526
minecraft:behavior.go_home -1579225026
minecraft:behavior.hide -1101331718
minecraft:behavior.hold_ground 1804286487
minecraft:behavior.hurt_by_target -1710404297
minecraft:behavior.inspect_bookshelf 40191182
minecraft:behavior.knockback_roar -1304117826
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.mingle 385775952
minecraft:behavior.mount_pathing 1112137677
minecraft:behavior.move_through_village 779377630
minecraft:behavior.move_to_block -342788833
minecraft:behavior.move_to_land -943551837
minecraft:behavior.move_to_lava -945036492
minecraft:behavior.move_to_liquid 635836098
minecraft:behavior.move_to_poi -1614682114
minecraft:behavior.move_to_random_block 395022171
minecraft:behavior.move_to_village -805189394
minecraft:behavior.move_to_water 1886139445
minecraft:behavior.move_towards_target -166537884
minecraft:behavior.nap 992184933
minecraft:behavior.nearest_attackable_target 5824270165841165755
minecraft:behavior.nearest_prioritized_attackable_target 335414683
minecraft:behavior.ocelot_sit_on_block -1327999383
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_hover -1797323808
minecraft:behavior.random_look_around 1177762851
minecraft:behavior.random_look_around_and_sit -1368070166
minecraft:behavior.random_sitting 1722716662
minecraft:behavior.random_stroll -1643504294
minecraft:behavior.random_swim -1465281278
minecraft:behavior.receive_love 1156694272
minecraft:behavior.restrict_open_door 715583988
minecraft:behavior.restrict_sun -382716017
minecraft:behavior.rise_to_liquid_level -950950337
minecraft:behavior.roll 817471653
minecraft:behavior.run_around_like_crazy -1390363669
minecraft:behavior.scared -1643945926
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.sleep -1811763
minecraft:behavior.slime_attack -1315951081
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.stalk_and_pounce_on_target -1248479202
minecraft:behavior.stay_while_sitting 1346980478
minecraft:behavior.stomp_turtle_egg 851839416
minecraft:behavior.stroll_towards_village -1563831906
minecraft:behavior.summon_entity -2005850647
minecraft:behavior.swell -1473132493
minecraft:behavior.take_flower 1218648257
minecraft:behavior.tempt 422904556
minecraft:behavior.trade_interest -574851053
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:behavior.work -391600209

返回顶部

特性

JSON名称 ID
minecraft:attack 1651346034
minecraft:spell_effects 523264365
minecraft:strength 648564399

返回顶部

组件

JSON名称 ID
-2078137563
minecraft:addrider -1014528905
minecraft:admire_item -1838165406
minecraft:ageable 1092934985
minecraft:angry 725411499
minecraft:annotation.break_door 2116838963
minecraft:annotation.open_door 1004733768
minecraft:area_attack 1169114880
minecraft:attack_cooldown -1439360398
minecraft:barter -1660828566
minecraft:block_climber -505801518
minecraft:block_sensor 1944169706
minecraft:boostable -8316315
minecraft:boss -1309638025
minecraft:break_blocks -944056304
minecraft:breathable -707187232
minecraft:breedable -1616430100
minecraft:bribeable -2125526908
minecraft:buoyant -467213736
minecraft:burns_in_daylight 1256874605
minecraft:celebrate_hunt -789611239
minecraft:combat_regeneration -315365016
minecraft:conditional_bandwidth_optimization 1333085468
minecraft:custom_hit_test 2035968892
minecraft:damage_over_time -656420526
minecraft:damage_sensor -82616534
minecraft:despawn 1674909940
minecraft:drying_out_timer 2113510784
minecraft:economy_trade_table 1705466896
minecraft:entity_sensor -406052184
minecraft:environment_sensor 687748970
minecraft:equip_item -1774220620
minecraft:equippable -1164142226
minecraft:experience_reward -1992597900
minecraft:explode -1683058581
minecraft:flocking 1967597361
minecraft:genetics -82484670
minecraft:giveable 1739199795
minecraft:group_size -1997375941
minecraft:grows_crop 43636353
minecraft:healable -54247424
minecraft:home 610829097
minecraft:hurt_on_condition 163715083
minecraft:inside_block_notifier -377593253
minecraft:insomnia -300455606
minecraft:instant_despawn -634288138
minecraft:interact -1996861528
minecraft:inventory 1941951218
minecraft:item_hopper -447601772
minecraft:jump.dynamic 945664737
minecraft:jump.static 1064987526
minecraft:leashable 893445039
minecraft:lookat -1329707008
minecraft:managed_wandering_trader 846609640
minecraft:mob_effect 490430596
minecraft:movement.amphibious -500784850
minecraft:movement.basic 3354475
minecraft:movement.fly -1487316136
minecraft:movement.generic -1363369868
minecraft:movement.hover 1743805051
minecraft:movement.jump 1256268727
minecraft:movement.skip -1828832272
minecraft:movement.sway 2126249079
minecraft:nameable -595398763
minecraft:navigation.climb -1075360945
minecraft:navigation.float -842998036
minecraft:navigation.fly -1997823129
minecraft:navigation.generic 1768002583
minecraft:navigation.hover -769247640
minecraft:navigation.swim 1908076634
minecraft:navigation.walk 1909033775
minecraft:npc 1140005505
minecraft:out_of_control -639930856
minecraft:peek -863721039
minecraft:persistent 1435858387
minecraft:physics 1021552959
minecraft:preferred_path 1431188951
minecraft:projectile 1922456869
minecraft:pushable -1784639134
minecraft:raid_trigger 2093209329
minecraft:rail_movement -78235634
minecraft:rail_sensor 1273161273
minecraft:ravager_blocked -1417579541
minecraft:rideable 1656173828
minecraft:scale_by_age 64881972
minecraft:scheduler -684492525
minecraft:shareables 1301057082
minecraft:shooter 184150118
minecraft:sittable -1376274106
minecraft:spawn_entity 1991964333
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:trail 1632590434
minecraft:transformation -457894577
minecraft:trusting 936499892
minecraft:water_movement -128701925

返回顶部

实体描述属性

JSON名称 ID
animations 1232311658
scripts -76244517

返回顶部

属性

JSON名称 ID
minecraft:ambient_sound_interval -1314051310
minecraft:can_climb -550459594
minecraft:can_fly 985724318
minecraft:can_power_jump -763124853
minecraft:collision_box -1277663508
minecraft:color 1069623177
minecraft:color2 1429635777
minecraft:default_look_angle -815556357
minecraft:equipment 714661022
minecraft:fire_immune -1071767182
minecraft:floats_in_liquid 179778474
minecraft:flying_speed -570508595
minecraft:friction_modifier -714364556
minecraft:ground_offset -1816881803
minecraft:input_ground_controlled -646415617
minecraft:is_baby 1853172763
minecraft:is_charged 125340337
minecraft:is_chested -817599379
minecraft:is_dyeable 1381448355
minecraft:is_hidden_when_invisible -1553744
minecraft:is_ignited 905710223
minecraft:is_illager_captain 921912694
minecraft:is_saddled 1037901616
minecraft:is_shaking 523951884
minecraft:is_sheared 1154836813
minecraft:is_stackable 1184456737
minecraft:is_stunned 1818977510
minecraft:is_tamed 1646421078
minecraft:item_controllable 1868311069
minecraft:loot 1775814032
minecraft:mark_variant 663621689
minecraft:push_through -138030768
minecraft:scale 77854436
minecraft:skin_id 1838729593
minecraft:sound_volume 937951776
minecraft:type_family -255011285
minecraft:variant -1789583977
minecraft:walk_animation_speed 972393614
minecraft:wants_jockey 1832515141

返回顶部

触发器

JSON名称 ID
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:ambient_sound_interval

Sets the entity's delay between playing its ambient sound.

名称 类型 默认值 描述
event_name 字符串 ambient Level sound event to be played as the ambient sound.
range 小数 16.000000 Maximum time in seconds to randomly add to the ambient sound delay time.
value 小数 8.000000 Minimum time in seconds before the entity plays its ambient sound again.

返回顶部

minecraft:can_climb

Allows this entity to climb up ladders.
返回顶部

minecraft:can_fly

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

Allows the entity to power jump like the horse does in vanilla.
返回顶部

minecraft:collision_box

Sets the width and height of the Entity's collision box.

名称 类型 默认值 描述
height 小数 1.0 Height of the collision box in blocks. A negative value will be assumed to be 0.
width 小数 1.0 Width and Depth of the collision box in blocks. A negative value will be assumed to be 0.

返回顶部

minecraft:color

Defines the entity's color. Only works on vanilla entities that have predefined color values (sheep, llama, shulker).

名称 类型 默认值 描述
value 整数 0 The Palette Color value of the entity.

返回顶部

minecraft:color2

Defines the entity's second texture color. Only works on vanilla entities that have a second predefined color values (tropical fish).

名称 类型 默认值 描述
value 整数 0 The second Palette Color value of the entity.

返回顶部

minecraft:default_look_angle

Sets this entity's default head rotation angle.

名称 类型 默认值 描述
value 小数 0.0f Angle in degrees.

返回顶部

minecraft:equipment

Sets the Equipment table to use for this Entity.

名称 类型 默认值 描述
slot_drop_chance 列表 A list of slots with the chance to drop an equipped item from that slot.
table 字符串 The file path to the equipment table, relative to the behavior pack's root.

返回顶部

minecraft:fire_immune

Sets that this entity doesn't take damage from fire.
返回顶部

minecraft:floats_in_liquid

Sets that this entity can float in liquid blocks.
返回顶部

minecraft:flying_speed

Speed in Blocks that this entity flies at.

名称 类型 默认值 描述
value 小数 0.02 Flying speed in blocks per tick.

返回顶部

minecraft:friction_modifier

Defines how much friction affects this entity.

名称 类型 默认值 描述
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

Sets the offset from the ground that the entity is actually at.

名称 类型 默认值 描述
value 小数 0.0 The value of the entity's offset from the terrain, in blocks.

返回顶部

minecraft:input_ground_controlled

When configured as a rideable entity, the entity will be controlled using WASD controls.
返回顶部

minecraft:is_baby

Sets that this entity is a baby.
返回顶部

minecraft:is_charged

Sets that this entity is charged.
返回顶部

minecraft:is_chested

Sets that this entity is currently carrying a chest.
返回顶部

minecraft:is_dyeable

Allows dyes to be used on this entity to change its color.

名称 类型 默认值 描述
interact_text 字符串 The text that will display when interacting with this entity with a dye when playing with Touch-screen controls.

返回顶部

minecraft:is_hidden_when_invisible

Sets that this entity can hide from hostile mobs while invisible.
返回顶部

minecraft:is_ignited

Sets that this entity is currently on fire.
返回顶部

minecraft:is_illager_captain

Sets that this entity is an illager captain.
返回顶部

minecraft:is_saddled

Sets that this entity is currently saddled.
返回顶部

minecraft:is_shaking

Sets that this entity is currently shaking.
返回顶部

minecraft:is_sheared

Sets that this entity is currently sheared.
返回顶部

minecraft:is_stackable

Sets that this entity can be stacked.
返回顶部

minecraft:is_stunned

Sets that this entity is currently stunned.
返回顶部

minecraft:is_tamed

Sets that this entity is currently tamed.
返回顶部

minecraft:item_controllable

Defines what items can be used to control this entity while ridden.

名称 类型 默认值 描述
control_items 列表 List of items that can be used to control this entity.

返回顶部

minecraft:loot

Sets the loot table for what items this entity drops upon death.

名称 类型 默认值 描述
table 字符串 The path to the loot table, relative to the Behavior Pack's root.

返回顶部

minecraft:mark_variant

Additional variant value. Can be used to further differentiate variants.

名称 类型 默认值 描述
value 整数 0 The ID of the variant. By convention, 0 is the ID of the base entity.

返回顶部

minecraft:push_through

Sets the distance through which the entity can push through.

名称 类型 默认值 描述
value 小数 0.0 The value of the entity's push-through, in blocks.

返回顶部

minecraft:scale

Sets the entity's visual size.

名称 类型 默认值 描述
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:skin_id

Skin ID value. Can be used to differentiate skins, such as base skins for villagers.

名称 类型 默认值 描述
value 整数 0 The ID of the skin. By convention, 0 is the ID of the base skin.

返回顶部

minecraft:sound_volume

Sets the entity's base volume for sound effects.

名称 类型 默认值 描述
value 小数 1.0 The value of the volume the entity uses for sound effects.

返回顶部

minecraft:type_family

Defines the families this entity belongs to.

名称 类型 默认值 描述
family 列表 List of family names.

返回顶部

minecraft:variant

Used to differentiate the component group of a variant of an entity from others. (e.g. ocelot, villager)

名称 类型 默认值 描述
value 整数 0 The ID of the variant. By convention, 0 is the ID of the base entity.

返回顶部

minecraft:walk_animation_speed

Sets the speed multiplier for this entity's walk animation speed.

名称 类型 默认值 描述
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

Sets that this entity wants to become a jockey.
返回顶部



触发器

minecraft:on_death

Only usable by the Ender Dragon. Adds a trigger to call on this entity's death.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_friendly_anger

Adds a trigger that will run when a nearby entity of the same type as this entity becomes Angry.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_hurt

Adds a trigger to call when this entity takes damage.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_hurt_by_player

Adds a trigger to call when this entity is attacked by the player.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_ignite

Adds a trigger to call when this entity is set on fire.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_start_landing

Only usable by the Ender Dragon. Adds a trigger to call when this entity lands.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_start_takeoff

Only usable by the Ender Dragon. Adds a trigger to call when this entity starts flying.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_target_acquired

Adds a trigger to call when this entity finds a target.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_target_escape

Adds a trigger to call when this entity loses the target it currently has.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部

minecraft:on_wake_with_owner

Adds a trigger to call when this pet's owner awakes after sleeping with the pet.

名称 类型 默认值 描述
event 字符串 The event to run when the conditions for this trigger are met.
filters Minecraft过滤器 The list of conditions for this trigger to execute.
target 字符串 self The target of the event.

返回顶部





网站作者: destruc7i0n

本网站不隶属于Mojang Studios