本站文本內容除另有聲明外,轉載時均必須註明出處。(詳情…本站文本內容除另有聲明外,轉載時均必須註明出處。(詳情…中文Minecraft Wiki是完全公開的。請勇於擴充與修正內容!中文Minecraft Wiki是完全公開的。請勇於擴充與修正內容!Minecraft中文Wiki微博正在更新!或許有興趣去看看Minecraft中文Wiki微博正在更新!或許有興趣去看看想與其他用戶進行編輯上的溝通?社區專頁正是為此創建的。想與其他用戶進行編輯上的溝通?社區專頁正是為此創建的。翻譯或創建頁面之前,不妨看看譯名標準化Wiki條例頁面。翻譯或創建頁面之前,不妨看看譯名標準化Wiki條例頁面。需要管理員的協助?在管理員告示板留言也許可以幫到您。需要管理員的協助?在管理員告示板留言也許可以幫到您。
各位用戶:為了讓我們能更好了解您的需求,提供更優良的服務,請幫助我們填寫一份問卷。編者問卷讀者問卷(需要花費7分鐘左右)

Hi Gamepedia users and contributors! Please complete this survey to help us learn how to better meet your needs in the future. We have one for editors and readers. This should only take about 7 minutes!

基岩版實體組件文檔

從 Minecraft Wiki
跳到: 導覽搜尋
Ic translate.svg
此條目的(部分)內容需要被翻譯。
你可以幫助我們來翻譯此條目,但請勿使用機器翻譯。
Information icon.svg
此特性為基岩版獨有。


目錄

這是基岩版1.12.0實體組件文檔

版本:1.12.0.28

目標AI[編輯 | 編輯原始碼]

minecraft:behavior.avoid_mob_type[編輯 | 編輯原始碼]

讓某些生物遠離某些生物的組件。

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entity types this mob avoids.
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean must_see_forget_duration 3.0 Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
Decimal max_dist 0.0 Maximum distance to look for an entity
Decimal max_flee 0.5 Distance in blocks within the mob considers it should stop fleeing.
Decimal walk_speed_multiplier 1.0 Multiplier for walking speed. 1.0 means keep the regular speed, while higher numbers make the walking speed faster
Decimal sprint_speed_multiplier 1.0 Multiplier for running speed. 1.0 means keep the regular speed, while higher numbers make the running speed faster
Decimal probability_per_strength 1.0 Determines how likely it is that this entity will stop avoiding another entity based on that entity's strength
Boolean ignore_visibility false If true, visbility between this entity and the mob type will not be checked.

minecraft:behavior.beg[編輯 | 編輯原始碼]

讓某些生物跟着持有特定食物的玩家。

參數
類型 名稱 預設值 描述
List items List of items that this mob likes
Decimal look_distance 8.0 Distance in blocks the mob will beg from
Range [a, b] look_time [2, 4] The range of time in seconds this mob will stare at the player holding a food they like, begging for it


minecraft:behavior.break_door[編輯 | 編輯原始碼]

允許某些生物破壞


minecraft:behavior.stomp_turtle_egg[編輯 | 編輯原始碼]

讓某些生物以跳躍方式踩破海龜蛋。

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


minecraft:behavior.breed[編輯 | 編輯原始碼]

Allows this mob to breed with other mobs.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.charge_held_item[編輯 | 編輯原始碼]

讓某些生物可以撿起物品或使用持有物品。

參數
類型 名稱 預設值 描述
清單 物品 這清單表示生物能撿起或使用的物品。


minecraft:behavior.defend_village_target[編輯 | 編輯原始碼]

讓某些生物留在村莊內,且主動攻擊村民。

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entity types this mob considers a threat to the village
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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


minecraft:behavior.drink_potion[編輯 | 編輯原始碼]

允許某些生物於特定情況下飲用藥水。

參數
類型 名稱 預設值 描述
speed_modifier 0.0
List potions A list of potions that this entity can drink. Each potion entry has the following parameters:
Potion Entry Parameters
類型 名稱 預設值 描述
Integer id -1 The registry ID of the potion to use
Decimal chance 1.0 The percent chance (from 0.0 to 1.0) of this potion being selected when searching for a potion to use.
Minecraft Filter filters The filters to use when determining if this potion can be selected.


minecraft:behavior.door_interact[編輯 | 編輯原始碼]

允許某些生物打開及關閉門。


minecraft:behavior.eat_block[編輯 | 編輯原始碼]

讓某些生物吃方塊 (例如,羊吃草地,草地變成泥土。).

參數
類型 名稱 預設值 描述
Trigger on_eat Trigger to fire when the mob eats a block of grass


minecraft:behavior.explore_outskirts[編輯 | 編輯原始碼]

allows a mob to explore the outskirts of a village

參數
類型 名稱 預設值 描述
Integer wait_time 0 The time the mob will stand around 'searching' for POIs
Decimal explore_dist 5.0 The distance in which the mob will proceed past the village bounds
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.flee_sun[編輯 | 編輯原始碼]

讓某些生物遠離陽光照射,並尋找陰暗處。

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.float[編輯 | 編輯原始碼]

讓某些生物游泳時漂浮於水上。


minecraft:behavior.follow_owner[編輯 | 編輯原始碼]

允許某些被馴服生物跟隨馴服他們的玩家。

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal start_distance 10.0 The distance in blocks that the owner can be away from this mob before it starts following it
Decimal stop_distance 2.0 The distance in blocks this mob will stop from its owner while following it


minecraft:behavior.follow_parent[編輯 | 編輯原始碼]

允許某些生物跟隨其父母。

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.follow_caravan[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer entity_count 1 Number of entities that can be in the caravan
JSON Object 實體類型 List of entity types that this mob can follow in a caravan
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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


minecraft:behavior.follow_mob[編輯 | 編輯原始碼]

Allows the mob to follow other mobs.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal stop_distance 2.0 The distance in blocks this mob stops from the mob it is following
Integer search_range 0 The distance in blocks it will look for a mob to follow


minecraft:behavior.go_home[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
String on_home Event to run when this mob gets home.


minecraft:behavior.knockback_roar[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal duration 1.0 The duration of the roar (in seconds).
Decimal attack_time 0.5 The delay after which the knockback occurs (in seconds).
Integer knockback_damage 6 The damage dealt by the knockback roar.
Integer knockback_strength 4 The strength of the knockback.
Integer knockback_range 4 The radius (in blocks) of the knockback effect.
Trigger on_roar_end
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again


minecraft.behavior.scared[編輯 | 編輯原始碼]

Allows the a mob to become scared when the weather outside is thundering

參數
類型 名稱 預設值 描述
Integer sound_interval 0 The interval in which a sound will play when active in a 1/delay chance to kick off


minecraft:behavior.move_to_water[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 The distance in blocks it will look for water to move towards
Integer search_height 1 Height in blocks the mob will look for water to move towards
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft:behavior.move_to_land[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 The distance in blocks it will look for land to move towards
Integer search_height 1 Height in blocks the mob will look for land to move towards
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft.behavior.move_to_poi[編輯 | 編輯原始碼]

Allows the mob to move to a POI if able to

參數
類型 名稱 預設值 描述
String poi_type Tells the goal what POI type it should be looking for
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.move_to_village[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft.behavior.hide[編輯 | 編輯原始碼]

Allows a mob with the hide component to attempt to move to - and hide at - an owned or nearby POI.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal timeout_cooldown 8.0 The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition.
String poi_type Defines what POI type to hide at.
Decimal duration 1.0 Amount of time in seconds that the mob reacts.


minecraft.behavior.work[編輯 | 編輯原始碼]

allows the NPC to use their jobsite POI

參數
類型 名稱 預設值 描述
Integer sound_delay_min 0 The min interval in which a sound will play
Integer sound_delay_max 0 The max interval in which a sound will play
Integer goal_cooldown 0 The amount of ticks the goal will be on cooldown before it can be used again
Integer active_time 0 The amount of ticks the NPC will stay in their the work location
Boolean can_work_in_rain false If true, this entity can work when their jobsite POI is being rained on.
Integer work_in_rain_tolerance -1 If "can_work_in_rain" is false, this is the maximum number of ticks left in the goal where rain will not interrupt the goal
String on_arrival Event to run when the mob reaches their jobsite and finishes working.
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.random_breach[編輯 | 編輯原始碼]

Allows the mob to randomly break surface of the water.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again


minecraft:behavior.nearest_attackable_target[編輯 | 編輯原始碼]

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

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


minecraft:behavior.hurt_by_target[編輯 | 編輯原始碼]

Allows the mob to target another mob that hurts them.

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entity types that this mob can target when hurt by them
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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
Boolean alert_same_type false If true, nearby mobs of the same type will be alerted about the damage
Boolean hurt_owner false If true, the mob will hurt its owner and other mobs with the same owner as itself


minecraft:behavior.owner_hurt_by_target[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entity types that this mob can target if they hurt their owner
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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


minecraft:behavior.owner_hurt_target[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entity types that this entity can target if the potential target is hurt by this mob's owner
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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


minecraft:behavior.lay_egg[編輯 | 編輯原始碼]

Allows the mob to lay an egg block on a sand block if the mob is pregnant.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 The distance in blocks it will look for a sand block to move towards
Integer search_height 1 Height in blocks the mob will look for sand block to move towards
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
String on_lay Event to run when this mob lays the egg.


minecraft:behavior.look_at_player[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
Range [a, b] look_time [2, 4] Time range to look at the entity
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)


minecraft:behavior.look_at_target[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
Range [a, b] look_time [2, 4] Time range to look at the entity
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)


minecraft:behavior.look_at_entity[編輯 | 編輯原始碼]

Allows the mob to look at nearby entities.

參數
類型 名稱 預設值 描述
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
Range [a, b] look_time [2, 4] Time range to look at the entity
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)
Minecraft Filter filters Filter to determine the conditions for this mob to look at the entity


minecraft:behavior.look_at_trading_player[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal look_distance 8.0 The distance in blocks from which the entity will look at
Decimal probability 0.02 The probability of looking at the target. A value of 1.00 is 100%
Range [a, b] look_time [2, 4] Time range to look at the entity
Integer angle_of_view_vertical 360 The angle in degrees that the mob can see in the X-axis (left-right)
Integer angle_of_view_horizontal 360 The angle in degrees that the mob can see in the Y-axis (up-down)


minecraft:behavior.mount_pathing[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal target_dist 0.0 The distance at which this mob wants to be away from its target
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target


minecraft:behavior.move_indoors[編輯 | 編輯原始碼]

Can only be used by Villagers. Allows them to seek shelter indoors.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal timeout_cooldown 8.0 The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition


minecraft:behavior.move_through_village[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean only_at_night false If true, the mob will only move through the village during night time


minecraft:behavior.move_towards_restriction[編輯 | 編輯原始碼]

Allows Guardians, Iron Golems and Villagers to move within their pre-defined area that the mob should be restricted to. Other mobs don't have a restriction defined.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.move_towards_target[編輯 | 編輯原始碼]

Allows mob to move towards its current target.

參數
類型 名稱 預設值 描述
Decimal within_radius 0.0 Defines the radius in blocks that the mob tries to be from the target. A value of 0 means it tries to occupy the same block as the target


minecraft:behavior.follow_target_captain[編輯 | 編輯原始碼]

Allows mob to move towards its current target captain.

參數
類型 名稱 預設值 描述
Decimal 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.
Decimal follow_distance 0.0 Defines the distance in blocks the mob will stay from its target while following.


minecraft:behavior.move_to_random_block[編輯 | 編輯原始碼]

Allows mob to move towards a random block.

參數
類型 名稱 預設值 描述
Decimal within_radius 0.0 Defines the distance in blocks the mob has to be from the block for the movement to be finished.
Decimal block_distance 16.0 Defines the distance from the mob, in blocks, that the block to move to will be chosen.


minecraft:behavior.ocelotattack[編輯 | 編輯原始碼]

Can only be used by the Ocelot. Allows it to perform the sneak and pounce attack.

參數
類型 名稱 預設值 描述
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed while using this attack
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed of this mob while using this attack
Decimal sneak_speed_multiplier 1.0 Multiplier for the sneaking speed. 1.0 means the ocelot will move at the speed it normally sneaks


minecraft:behavior.ocelot_sit_on_block[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.lay_down[編輯 | 編輯原始碼]

Allows mobs to lay down at times

參數
類型 名稱 預設值 描述
Integer interval 120 A random value to determine at what intervals something can occur. This has a 1/interval chance to choose this goal
Integer random_stop_interval 120 a random value in which the goal can use to pull out of the behavior. This is a 1/interval chance to play the sound


minecraft:behavior.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.

參數
類型 名稱 預設值 描述
Boolean close_door_after true If true, the mob will close the door after opening it and going through it


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.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean ignore_mob_damage false If true, the mob will not panic in response to damage from other mobs (only fire/lava etc)
Boolean prefer_water false If true, the mob will prefer water over land
Boolean force false If true, this mob will not stop panicking until it can't move anymore or the goal is removed from it


minecraft:behavior.run_around_like_crazy[編輯 | 編輯原始碼]

Allows the mob to run around aimlessly.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.restrict_sun[編輯 | 編輯原始碼]

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


minecraft:behavior.restrict_open_door[編輯 | 編輯原始碼]

Allows the mob to stay indoors during night time.


minecraft:behavior.random_look_around[編輯 | 編輯原始碼]

Allows the mob to randomly look around.

參數
類型 名稱 預設值 描述
Range [a, b] look_time [2, 4] The range of time in seconds the mob will stay looking in a random direction before looking elsewhere


minecraft:behavior.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.stay_while_sitting[編輯 | 編輯原始碼]

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


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.snacking[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal snacking_cooldown 7.5 The cooldown time in seconds before the mob is able to snack again
Decimal snacking_cooldown_min 0.5f The minimum time in seconds before the mob is able to snack again
Decimal snacking_stop_chance 0.0017 This is the chance that the mob will stop snacking, from 0 to 1
List items Items that we are interested in snacking on


minecraft:behavior.random_sitting[編輯 | 編輯原始碼]

Allows the mob to randomly sit for a duration.

參數
類型 名稱 預設值 描述
Decimal start_chance 0.1 This is the chance that the mob will start sitting, from 0 to 1
Decimal stop_chance 0.3 This is the chance that the mob will stop sitting, from 0 to 1
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again
Decimal min_sit_time 10 The minimum amount of time in seconds before the mob can stand back up


minecraft:behavior.melee_attack[編輯 | 編輯原始碼]

Allows the mob to use close combat melee attacks.

參數
類型 名稱 預設值 描述
Decimal melee_fov 90.0 The allowable FOV the actor will use to determine if it can make a valid melee attack
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target
String attack_types Defines the entity types this mob will attack
Integer random_stop_interval 0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance
Decimal reach_multiplier 2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger)
Boolean attack_once false If true, this mob will attack only one time.
Boolean require_complete_path false If true, this goal will only trigger if the mob can reach its target.


minecraft:behavior.stomp_attack[編輯 | 編輯原始碼]

Allows the mob to use the polar bear's melee attack.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target
String attack_types Defines the entity types this mob will attack
Integer random_stop_interval 0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance
Decimal reach_multiplier 2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger)
Boolean attack_once false If true, this mob will attack only one time.
Boolean require_complete_path false If true, this goal will only trigger if the mob can reach its target.


minecraft:behavior.delayed_attack[編輯 | 編輯原始碼]

Allows the mob to an attack where the hit is delayed.

參數
類型 名稱 預設值 描述
Decimal attack_duration 1.0 The duration of the attack animation in seconds
Decimal hit_delay_pct 1.0 The percentage of the attack_duration that must pass before the hit is made
String sound_event The sound event to play when the attack starts
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target
String attack_types Defines the entity types this mob will attack
Integer random_stop_interval 0 Defines the probability the mob will stop fighting. A value of 0 disables randomly stopping, while a value of 1 defines a 50% chance
Decimal reach_multiplier 2.0 Multiplier for how far outside its box the mob can reach its target (this can be used to simulate a mob with longer arms by making this bigger)
Boolean attack_once false If true, this mob will attack only one time.


minecraft:behavior.ranged_attack[編輯 | 編輯原始碼]

Allows the mob to use ranged attacks like shooting arrows.

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


minecraft:behavior.random_stroll[編輯 | 編輯原始碼]

Allows a mob to randomly stroll around.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal


minecraft:behavior.random_swim[編輯 | 編輯原始碼]

Allows an entity to randomly move through water

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
Integer interval 120 A random value to determine when to randomly move somewhere. This has a 1/interval chance to choose this goal


minecraft:behavior.random_fly[編輯 | 編輯原始碼]

Allows a mob to randomly fly around.

參數
類型 名稱 預設值 描述
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
Boolean can_land_on_trees true If true, the mob can stop flying and land on a tree instead of the ground


minecraft:behavior.swim_wander[編輯 | 編輯原始碼]

Has the fish swim around when they can't pathfind

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 10 speed of the entity


minecraft:behavior.tempt[編輯 | 編輯原始碼]

Allows the mob to be tempted by food they like.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
List items List of items this mob is tempted by
Boolean can_get_scared false If true, the mob can stop being tempted if the player moves too fast while close to this mob
Decimal 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.

參數
類型 名稱 預設值 描述
Decimal within_radius 0.0 Distance in blocks this mob can be interested by a player holding an item they like
Decimal interest_time 45.0 The max time in seconds that the trader will be interested with showing it's trade items
Decimal remove_item_time 1.0 The max time in seconds that the trader will wait when you no longer have items to trade
Decimal 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
Decimal cooldown 2.0 The time in seconds before the trader can use this goal again


minecraft:behavior.peek[編輯 | 編輯原始碼]

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


minecraft:behavior.play[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


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.take_flower[編輯 | 編輯原始碼]

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


minecraft:behavior.harvest_farm_block[編輯 | 編輯原始碼]

Allows the villager to harvest nearby farms. Can only be used by Villagers.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal


minecraft:behavior.squid_idle[編輯 | 編輯原始碼]

Allows the squid to swim in place idly. 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_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.squid_dive[編輯 | 編輯原始碼]

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


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.

參數
類型 名稱 預設值 描述
Decimal duration 1.0 Amount of time in seconds the trap exists. After this amount of time is elapsed, the trap is removed from the world if it hasn't been activated
Decimal within_radius 0.0 Distance in blocks that the player has to be within to trigger the horse trap


minecraft:behavior.sleep[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again
Decimal sleep_collider_height 1.0 The height of the mob's collider while sleeping
Decimal sleep_collider_width 1.0 The width of the mob's collider while sleeping
Decimal sleep_y_offset 1.0 The y offset of the mob's collider while sleeping
Decimal timeout_cooldown 8.0 The cooldown time in seconds before the goal can be reused after a internal failure or timeout condition


minecraft:behavior.swell[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal start_distance 10.0 This mob starts swelling when a target is at least this many blocks away
Decimal stop_distance 2.0 This mob stops swelling when a target has moved away at least this many blocks


minecraft:behavior.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.dragonflaming[編輯 | 編輯原始碼]

Allows the dragon to use its flame breath attack. 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.dragonchargeplayer[編輯 | 編輯原始碼]

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


minecraft:behavior.dragonstrafeplayer[編輯 | 編輯原始碼]

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


minecraft:behavior.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.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.leap_at_target[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal yd 0.0 The height in blocks the mob jumps when leaping at its target
Boolean must_be_on_ground true If true, the mob will only jump at its target if its on the ground. Setting it to false will allow it to jump even if its already in the air


minecraft:behavior.guardian_attack[編輯 | 編輯原始碼]

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


minecraft:behavior.slime_float[編輯 | 編輯原始碼]

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


minecraft:behavior.slime_keep_on_jumping[編輯 | 編輯原始碼]

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


minecraft:behavior.slime_random_direction[編輯 | 編輯原始碼]

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


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.


minecraft:behavior.raid_garden[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 Distance in blocks the mob will look for crops to eat
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
Integer max_to_eat 6 Maximum number of things this entity wants to eat
Integer full_delay 100 Amount of time in seconds before this mob wants to eat again
Integer eat_delay 2 Time in seconds between each time it eats
List blocks Blocks that the mob is looking for to eat


minecraft:behavior.inspect_bookshelf[編輯 | 編輯原始碼]

Allows the mob to inspect bookshelves.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 Distance in blocks the mob will look for books to inspect
Integer search_height 1 The height that the mob will search for bookshelves
Integer search_count 10 The number of blocks each tick that the mob will check within it's search range and height for a valid block to move to. A value of 0 will have the mob check every block within range in one tick
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft:behavior.player_ride_tamed[編輯 | 編輯原始碼]

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


minecraft:behavior.find_mount[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal within_radius 0.0 Distance in blocks within which the mob will look for a mount
Integer start_delay 0 Time the mob will wait before starting to move towards the mount
Boolean avoid_water false If true, the mob will not go into water blocks when going towards a mount
Boolean target_needed false If true, the mob will only look for a mount if it has a target
Decimal mount_distance -1.0 This is the distance the mob needs to be, in blocks, from the desired mount to mount it. If the value is below 0, the mob will use its default attack distance


minecraft:behavior.controlled_by_player[編輯 | 編輯原始碼]

Allows the mob to be controlled by the player.


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.

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entity types the wither takes into account to find who dealt the most damage to it
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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


minecraft:behavior.float_wander[編輯 | 編輯原始碼]

Allows the mob to float around like the Ghast.

參數
類型 名稱 預設值 描述
Integer xz_dist 10 Distance in blocks on ground that the mob will look for a new spot to move to. Must be at least 1
Integer y_dist 7 Distance in blocks that the mob will look up or down for a new spot to move to. Must be at least 1
Decimal y_offset 0.0 Height in blocks to add to the selected target position
Boolean must_reach false If true, the point has to be reachable to be a valid target
Boolean random_reselect false If true, the mob will randomly pick a new point while moving to the previously selected one
Range [a, b] float_duration [0.0, 0.0] Range of time in seconds the mob will float around before landing and choosing to do something else


minecraft:behavior.trade_with_player[編輯 | 編輯原始碼]

Allows the player to trade with this mob.


minecraft:behavior.summon_entity[編輯 | 編輯原始碼]

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

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


minecraft:behavior.mingle[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again
Decimal duration 1.0 Amount of time in seconds that the entity will chat with another entity
List mingle_partner_type empty The entity type that this entity is allowed to mingle with
Decimal 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.


minecraft:behavior.send_event[編輯 | 編輯原始碼]

Allows the mob to send an event to another mob.

參數
類型 名稱 預設值 描述
List sequence List of events to send
參數 of each event
類型 名稱 預設值 描述
Decimal base_delay 0.0 Amount of time in seconds before starting this step
String event The event to send to the entity
String sound_event The sound event to play when this step happens
Decimal cast_duration Total delay of the steps Time in seconds for the entire event sending process


minecraft:behavior.charge_attack[編輯 | 編輯原始碼]

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


minecraft:behavior.vex_random_move[編輯 | 編輯原始碼]

Allows the mob to move around randomly like the Vex.


minecraft:behavior.vex_copy_owner_target[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entities this mob can copy the owner from
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean 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


minecraft:behavior.pickup_items[編輯 | 編輯原始碼]

Allows the mob to pick up items on the ground.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Boolean track_target false If true, this mob will chase after the target as long as it's a valid target
Decimal max_dist 0.0 Maximum distance this mob will look for items to pick up
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft:behavior.share_items[編輯 | 編輯原始碼]

Allows the mob to give items it has to others.

參數
類型 名稱 預設值 描述
JSON Object 實體類型 List of entities this mob will share items with
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean must_see_forget_duration 3.0 Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Decimal max_dist 0.0 Maximum distance in blocks this mob will look for entities to share items with
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft:behavior.find_underwater_treasure[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 The range that the mob will search for a treasure chest within a ruin or shipwreck to move towards.
Decimal stop_distance 2.0 The distance the mob will move before stopping.


minecraft:behavior.circle_around_anchor[編輯 | 編輯原始碼]

Allows the mob to move in a circle around a point or a target.

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


minecraft:behavior.swoop_attack[編輯 | 編輯原始碼]

Allows the mob to move to attack a target. The goal ends if it has a horizontal collision or gets hit. Built to be used with flying mobs.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Range [a, b] delay_range [10.0, 20.0] Range of time in seconds between uses of this goal.


minecraft:behavior.pet_sleep_with_owner[編輯 | 編輯原始碼]

Allows the pet mob to move onto a bed with it's owner while sleeping.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 The distance in blocks from the owner the pet can be to sleep with owner.
Integer search_height 1 Height in blocks from the owner the pet can be to sleep with owner.
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot


minecraft:behavior.drop_item_for[編輯 | 編輯原始碼]

Allows the mob to move near a target and drop an item.

參數
類型 名稱 預設值 描述
Decimal speed_multiplier 1.0 Movement speed multiplier of the mob when using this AI Goal
Integer search_range 0 The distance in blocks from the target the mob can be.
Integer search_height 1 Height in blocks from the target the mob can be.
Decimal goal_radius 0.5 Distance in blocks within the mob considers it has reached the goal. This is the "wiggle room" to stop the AI from bouncing back and forth trying to reach a specific spot
JSON Object 實體類型 List of entity types this mob will drop items for.
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean must_see_forget_duration 3.0 Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
Decimal max_dist 0.0 Maximum distance in blocks this mob will look for entities to drop an item for.
Decimal drop_item_chance [1.0] The probability that the mob will drop an item.
Decimal offering_distance [1.0] The distance in blocks the mob will try to be away from the entity when it drops the item.
Range [a, b] time_of_day_range [0.0, 1.0] The valid times of day that this goal can be used. For reference: noon is 0.0, sunset is 0.25, midnight is 0.5, and sunrise is 0.75, and back to noon for 1.0.
String loot_table Loot table to select items from.
String on_drop_attempt Event to run when this mob attempts to drop an item.


minecraft:behavior.sneeze[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal cooldown_time 0.0 Time in seconds the mob has to wait before using the goal again
Decimal probability 0.02 The probability of sneezing. A value of 1.00 is 100%
Decimal drop_item_chance 1.0 The probability that the mob will drop an item when it sneezes.
String loot_table Loot table to select dropped items from.
String prepare_sound Sound to play when the sneeze is about to happen.
String sound Sound to play when the sneeze occurs.
String loot_table Loot table to select dropped items from.
Decimal prepare_time 1.0 The time in seconds that the mob takes to prepare to sneeze (while the prepare_sound is playing).
JSON Object 實體類型 List of entity types this mob will startle (cause to jump) when it sneezes.
參數
類型 名稱 預設值 描述
Minecraft Filter filters Conditions that make this entry in the list valid
Decimal max_dist 16 Maximum distance this mob can be away to be a valid choice
Decimal walk_speed_multiplier 1.0 Multiplier for the walking speed. A value of 1.0 means the speed is unchanged
Decimal sprint_speed_multiplier 1.0 Multiplier for the running speed. A value of 1.0 means the speed is unchanged
Boolean must_see false If true, the mob has to be visible to be a valid choice
Boolean must_see_forget_duration 3.0 Determines the amount of time in seconds that this mob will look for a target before forgetting about it and looking for a new one when the target isn't visible any more
Decimal within_radius 0.0 Distance in blocks that mobs will be startled.


minecraft:behavior.roll[編輯 | 編輯原始碼]

This allows the mob to roll forward.

參數
類型 名稱 預設值 描述
Decimal probability [1.0] The probability that the mob will use the goal.

過濾器[編輯 | 編輯原始碼]

過濾器讓數據對象得以指定一些準則以篩選其應用的目標,比如一個包含過濾器的模型只會在過濾測試成立時應用。



一個典型的過濾器包含四個參數:

subject(主體):測試應用的主體。

domain(域):測試會被局限在這個域,比如盔甲槽。這個參數只在少數幾個測試中使用。

operator(操作符):指定對值進行哪種比較,比如「equal」(等於)或「greater」(大於)。

value(值):測試要比較的值。



下面是一個過濾器的例子:

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

這個過濾器會讓實體自己(self)在其位置計算月光強度(moon_intensity),如果結果大於(greater than)0.5,返回真(true)。



測試可以結合all_ofany_of以組的形式出現。

僅當所有在all_of組中的測試通過時,整個測試組才通過。相對地,只要至少一個包含在any_of組中的測試通過,整組測試就通過了。

is_daytime[編輯 | 編輯原始碼]

在白天返回True。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_daytime", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_daytime" }


hourly_clock_time[編輯 | 編輯原始碼]

將當前的24小時制時間與一個在區間[0, 24000]中的整數值相比較。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Integer value (必選) 整數值。
示例
完整示例…
{ "test": "hourly_clock_time", "subject": "self", "operator": "equals", "value": "0" }
略寫示例(使用缺省值)…
{ "test": "hourly_clock_time", "value": "0" }


is_game_rule[編輯 | 編輯原始碼]

測試一個遊戲規則是否處於激活狀態。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String domain (必選) 要測試的遊戲規則的名稱。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_game_rule", "subject": "self", "domain": "domobspawning", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_game_rule", "domain": "domobspawning" }


is_underwater[編輯 | 編輯原始碼]

當測試主體在水下(完全被水淹沒)時返回True。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_underwater", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_underwater" }


clock_time[編輯 | 編輯原始碼]

將當前時間與在範圍(0.0, 1.0)之間的一個浮點數值做比較。 有關該值的進一步解釋: 0.0= 中午 0.25= 傍晚 0.5= 午夜 0.75= 日出

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Decimal value (必選) 浮點數值。
示例
完整示例…
{ "test": "clock_time", "subject": "self", "operator": "equals", "value": "0.00" }
略寫示例(使用缺省值)…
{ "test": "clock_time", "value": "0.00" }


moon_intensity[編輯 | 編輯原始碼]

將當前月光強度與在範圍(0.0, 1.0)之間的一個浮點數值做比較。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Decimal value (必選) 浮點數值。
示例
完整示例…
{ "test": "moon_intensity", "subject": "self", "operator": "equals", "value": "0.00" }
略寫示例(使用缺省值)…
{ "test": "moon_intensity", "value": "0.00" }


in_water[編輯 | 編輯原始碼]

當實體在水中時(不一定浸沒)返回True。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "in_water", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "in_water" }


moon_phase[編輯 | 編輯原始碼]

將當前月相與在範圍(0, 7)之間的一個整數值做比較。

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Integer value (必選) 整數值。
示例
完整示例…
{ "test": "moon_phase", "subject": "self", "operator": "equals", "value": "0" }
略寫示例(使用缺省值)…
{ "test": "moon_phase", "value": "0" }


distance_to_nearest_player[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Decimal value (必選) 浮點數值。
示例
完整示例…
{ "test": "distance_to_nearest_player", "subject": "self", "operator": "equals", "value": "0.00" }
略寫示例(使用缺省值)…
{ "test": "distance_to_nearest_player", "value": "0.00" }


has_equipment[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String domain any (可選) The equipment location to test
選項 描述
any
feet
hand
armor
torso
head
leg
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The item name to look for
示例
完整示例…
{ "test": "has_equipment", "subject": "self", "domain": "any", "operator": "equals", "value": "dirt" }
略寫示例(使用缺省值)…
{ "test": "has_equipment", "value": "dirt" }


is_underground[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_underground", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_underground" }


in_water_or_rain[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "in_water_or_rain", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "in_water_or_rain" }


on_ground[編輯 | 編輯原始碼]

Returns true when the subject entity is on ground.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "on_ground", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "on_ground" }


is_brightness[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Decimal value (必選) The brightness value to compare with.
示例
完整示例…
{ "test": "is_brightness", "subject": "self", "operator": "equals", "value": "0.50" }
略寫示例(使用缺省值)…
{ "test": "is_brightness", "value": "0.50" }


is_humid[編輯 | 編輯原始碼]

Tests whether the Subject is in an area with humidity

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_humid", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_humid" }


in_lava[編輯 | 編輯原始碼]

Returns true when the subject entity is in lava.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "in_lava", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "in_lava" }


is_mark_variant[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Integer value (必選) 整數值。
示例
完整示例…
{ "test": "is_mark_variant", "subject": "self", "operator": "equals", "value": "0" }
略寫示例(使用缺省值)…
{ "test": "is_mark_variant", "value": "0" }


is_color[編輯 | 編輯原始碼]

Returns true if the subject entity is the named color.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The Palette Color to test
選項 描述
white
light_green
orange
silver
magenta
light_blue
yellow
pink
blue
gray
cyan
purple
brown
green
red
black
示例
完整示例…
{ "test": "is_color", "subject": "self", "operator": "equals", "value": "white" }
略寫示例(使用缺省值)…
{ "test": "is_color", "value": "white" }


in_clouds[編輯 | 編輯原始碼]

Returns true when the subject entity is in the clouds.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "in_clouds", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "in_clouds" }


on_ladder[編輯 | 編輯原始碼]

Returns true when the subject entity is on a ladder.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "on_ladder", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "on_ladder" }


has_component[編輯 | 編輯原始碼]

Returns true when the subject entity contains the named component.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The component name to look for
示例
完整示例…
{ "test": "has_component", "subject": "self", "operator": "equals", "value": "minecraft:explode" }
略寫示例(使用缺省值)…
{ "test": "has_component", "value": "minecraft:explode" }


is_family[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The Family name to look for
示例
完整示例…
{ "test": "is_family", "subject": "self", "operator": "equals", "value": "player" }
略寫示例(使用缺省值)…
{ "test": "is_family", "value": "player" }


is_sneaking[編輯 | 編輯原始碼]

Returns true if the subject entity is sneaking.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_sneaking", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_sneaking" }


has_ability[編輯 | 編輯原始碼]

Returns true when the subject entity has the named ability.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The Ability type to test
選項 描述
worldbuilder
invulnerable
flying
mayfly
instabuild
flySpeed
lightning
walkSpeed
mute
noclip
示例
完整示例…
{ "test": "has_ability", "subject": "self", "operator": "equals", "value": "instabuild" }
略寫示例(使用缺省值)…
{ "test": "has_ability", "value": "instabuild" }


is_avoiding_mobs[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_avoiding_mobs", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_avoiding_mobs" }


has_damage[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The Damage type to test
選項 描述
contact
none
lava
attack
override
projectile
suffocation
fall
starve
fire
fatal Any damage which kills the subject
fire_tick
drowning
block_explosion
entity_explosion
void
suicide
magic
wither
anvil
thorns
falling_block
piston
fly_into_wall
示例
完整示例…
{ "test": "has_damage", "subject": "self", "operator": "equals", "value": "fatal" }
略寫示例(使用缺省值)…
{ "test": "has_damage", "value": "fatal" }


is_owner[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_owner", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_owner" }


is_target[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_target", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_target" }


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.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_immobile", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_immobile" }


is_altitude[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Integer value (必選) The altitude value to compare with
示例
完整示例…
{ "test": "is_altitude", "subject": "self", "operator": "equals", "value": "0" }
略寫示例(使用缺省值)…
{ "test": "is_altitude", "value": "0" }


is_moving[編輯 | 編輯原始碼]

Returns true if the subject entity is moving.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_moving", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_moving" }


is_skin_id[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Integer value (必選) 整數值。
示例
完整示例…
{ "test": "is_skin_id", "subject": "self", "operator": "equals", "value": "0" }
略寫示例(使用缺省值)…
{ "test": "is_skin_id", "value": "0" }


is_climbing[編輯 | 編輯原始碼]

Returns true if the subject entity is climbing.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_climbing", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_climbing" }


is_riding[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_riding", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_riding" }


in_caravan[編輯 | 編輯原始碼]

Returns true if the subject entity is in a caravan.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "in_caravan", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "in_caravan" }


is_leashed[編輯 | 編輯原始碼]

Returns true if the subject entity is leashed.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_leashed", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_leashed" }


is_variant[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Integer value (必選) 整數值。
示例
完整示例…
{ "test": "is_variant", "subject": "self", "operator": "equals", "value": "0" }
略寫示例(使用缺省值)…
{ "test": "is_variant", "value": "0" }


has_tag[編輯 | 編輯原始碼]

Returns true if the subject entity has the tag provided.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (可選) 字符串值。
示例
完整示例…
{ "test": "has_tag", "subject": "self", "operator": "equals", "value": "" }
略寫示例(使用缺省值)…
{ "test": "has_tag" }


is_in_village[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_in_village", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_in_village" }


is_visible[編輯 | 編輯原始碼]

Returns true if the subject entity is visible.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_visible", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_visible" }


has_mob_effect[編輯 | 編輯原始碼]

Tests whether the Subject has the specified mob effect.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (可選) 字符串值。
示例
完整示例…
{ "test": "has_mob_effect", "subject": "self", "operator": "equals", "value": "" }
略寫示例(使用缺省值)…
{ "test": "has_mob_effect" }


is_difficulty[編輯 | 編輯原始碼]

Tests the current difficulty level of the game.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The game's difficulty level to test
選項 描述
peaceful
easy
normal
hard
示例
完整示例…
{ "test": "is_difficulty", "subject": "self", "operator": "equals", "value": "normal" }
略寫示例(使用缺省值)…
{ "test": "is_difficulty", "value": "normal" }


is_biome[編輯 | 編輯原始碼]

Tests whether the Subject is currently in the named biome.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The Biome type to test
選項 描述
ice
forest
extreme_hills
beach
jungle
desert
flat
the_nether
mesa
plain
mushroom_island
ocean
river
savanna
stone_beach
swamp
taiga
the_end
示例
完整示例…
{ "test": "is_biome", "subject": "self", "operator": "equals", "value": "beach" }
略寫示例(使用缺省值)…
{ "test": "is_biome", "value": "beach" }


has_biome_tag[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) The tag to look for
示例
完整示例…
{ "test": "has_biome_tag", "subject": "self", "operator": "equals", "value": " " }
略寫示例(使用缺省值)…
{ "test": "has_biome_tag", "value": " " }


is_snow_covered[編輯 | 編輯原始碼]

Tests whether the Subject is in an area with snow cover

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "is_snow_covered", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "is_snow_covered" }


is_temperature_type[編輯 | 編輯原始碼]

Tests whether the current temperature is a given type.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
String value (必選) 用於測試的生態域類別。
選項 描述
ocean
cold
mild
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.

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Decimal value (必選) 用於比較的生態域溫度。
示例
完整示例…
{ "test": "is_temperature_value", "subject": "self", "operator": "equals", "value": "0.50" }
略寫示例(使用缺省值)…
{ "test": "is_temperature_value", "value": "0.50" }


has_trade_supply[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String subject self (可選) 此次過濾器測試的主體。
選項 描述
self 此次測試的調用者(對象或實體)。
other 互動的另一個成員(不是調用者)。
parent 調用者當前的父類。
player 參與此次互動的玩家。
target 調用者當前的目標。
String operator equals (可選) 對於值應用的比較方法。
選項 描述
>= 測試是否大於或等於值。
equals 測試是否相等。
<> 測試是否不相等。
== 測試是否相等。
= 測試是否相等。
not 測試是否不相等。
< 測試是否小於值。
!= 測試是否不相等。
> 測試是否大於值。
<= 測試是否小於或等於值。
Boolean value true (可選) True(真)或False(假)。
示例
完整示例…
{ "test": "has_trade_supply", "subject": "self", "operator": "equals", "value": true }
略寫示例(使用缺省值)…
{ "test": "has_trade_supply" }


綜合示例:
這一組過濾器只有在月強大於0.5且調用者的目標實體在水中時通過。
"all_of" : [

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

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

: ]

Client Entity Documentation[編輯 | 編輯原始碼]

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.

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.


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.


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.


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.

Example pre-animation script for cod
"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);"
  ]
},
Example scale script for the bat
"scripts": {
  "scale": "0.35"
},


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.


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.


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.


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


Example client entity definitions JSON for the pig
"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
       }
     }
   }

enable_attachables[編輯 | 編輯原始碼]

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

"enable_attachables": true


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.

Example Spawn Egg using hex value
"spawn_egg": {
  "base_color": "#53443E",
  "overlay_color": "#2E6854"
}

The other way is to specify a texture.

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

Example Spawn Egg specifying a texture
"spawn_egg": {
  "texture": "spawn_egg", 
  "texture_index": 2
}




Server Entity Documentation[編輯 | 編輯原始碼]

Entity Definition Properties[編輯 | 編輯原始碼]

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

do_not_upgrade[編輯 | 編輯原始碼]

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


format_version[編輯 | 編輯原始碼]

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": {
    "do_not_upgrade": {},
    "component_groups": {
      ...
    }
    ...
  }
}


Entity Description Properties[編輯 | 編輯原始碼]

This section defines properties required to identify and construct the entity

animations[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String name none Internal (to the entity) name of this animation entry
String animation none Actual animation to use


scripts[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String name none Internal (to the entity) name of this animation entry
String animation controller none Actual animation to use


Entity Description Properties[編輯 | 編輯原始碼]

identifier 

Sets the name for this entity's description.

參數
Type Default Value Description
String The identifier for this entity


runtime_identifier 

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

參數
Type Default Value Description
String The identifier for the class to construct this entity with


is_spawnable 

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

參數
Type Default Value Description
Boolean 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.

參數
Type Default Value Description
Boolean false Flag to mark this entity as being summonable or not.


is_experimental 

Sets whether or not this entity is experimental. Experimental entities are only enabled when the experimental toggle is enabled.

參數
Type Default Value Description
Boolean false Flag to mark this entity as being experimental or not.




Attributes[編輯 | 編輯原始碼]

minecraft:attack[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Range [a, b] damage Range of the random amount of damage the melee attack deals. A negative value can heal the entity instead of hurting it
String effect_name Identifier of the status ailment to apply to an entity attacked by this entity's melee attack
Decimal effect_duration 0.0 Duration in seconds of the status ailment applied to the damaged entity


minecraft:spell_effects[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
List add_effects List of effects to add to this entity after adding this component
參數
類型 名稱 預設值 描述
String effect Effect to add to this entity. Includes 'duration' in seconds, 'amplifier' level, 'ambient' if it is to be considered an ambient effect, and 'visible' if the effect should be visible
String remove_effects List of identifiers of effects to be removed from this entity after adding this component


minecraft:strength[編輯 | 編輯原始碼]

Defines the entity's strength to carry items.

參數
類型 名稱 預設值 描述
Integer value 1 The initial value of the strength
Integer max 5 The maximum strength of this entity



Properties[編輯 | 編輯原始碼]

minecraft:ambient_sound_interval[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal min 8.000000 Minimum time in seconds before the entity plays its ambient sound again
Decimal max 16.000000 Maximum time in seconds to randomly add to the ambient sound delay time.
String event_name ambient Level sound event to be played as the ambient sound.


minecraft:burns_in_daylight[編輯 | 編輯原始碼]

Specifies if/how a mob burns in daylight.


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.

參數
類型 名稱 預設值 描述
Decimal width 1.0 Width and Depth of the collision box in blocks. A negative value will be assumed to be 0
Decimal height 1.0 Height 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).

參數
類型 名稱 預設值 描述
Integer 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).

參數
類型 名稱 預設值 描述
Integer value 0 The second Palette Color value of the entity


minecraft:default_look_angle[編輯 | 編輯原始碼]

Sets this entity's default head rotation angle.

參數
類型 名稱 預設值 描述
Decimal value 0.0f Angle in degrees


minecraft:is_dyeable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String interact_text The text that will display when interacting with this entity with a dye when playing with Touch-screen controls


minecraft:equipment[編輯 | 編輯原始碼]

Sets the Equipment table to use for this Entity.

參數
類型 名稱 預設值 描述
String table The file path to the equipment table, relative to the behavior pack's root
List slot_drop_chance A list of slots with the chance to drop an equipped item from that slot


minecraft:fire_immune[編輯 | 編輯原始碼]

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


minecraft:type_family[編輯 | 編輯原始碼]

Defines the families this entity belongs to.

參數
類型 名稱 預設值 描述
List family List of family names


minecraft:floats_in_liquid[編輯 | 編輯原始碼]

Sets that this entity can float in liquid blocks.


minecraft:flying_speed[編輯 | 編輯原始碼]

Speed in Blocks that this entity flies at.

參數
類型 名稱 預設值 描述
Decimal value 0.02 Flying speed in blocks per tick


minecraft:foot_size[編輯 | 編輯原始碼]

Sets the number of blocks the entity can step without jumping.

參數
類型 名稱 預設值 描述
Decimal value 0.5 The value of the size of the entity's step


minecraft:friction_modifier[編輯 | 編輯原始碼]

Defines how much does friction affect this entity.

參數
類型 名稱 預設值 描述
Decimal value 1.0 The higher the number, the more the friction affects this entity. A value of 1.0 means regular friction, while 2.0 means twice as much


minecraft:hurt_when_wet[編輯 | 編輯原始碼]

Specifies if an actor is hurt when wet.


minecraft:ground_offset[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal value 0.0 The value of the entity's offset from the terrain, in blocks


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_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_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_illager_captain[編輯 | 編輯原始碼]

Sets that this entity is an illager captain.


minecraft:is_stunned[編輯 | 編輯原始碼]

Sets that this entity is currently stunned.


minecraft:is_stackable[編輯 | 編輯原始碼]

Sets that this entity can be stacked.


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

參數
類型 名稱 預設值 描述
List 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.

參數
類型 名稱 預設值 描述
String table The path to the loot table, relative to the Behavior Pack's root


minecraft:push_through[編輯 | 編輯原始碼]

Sets the distance through which the entity can push through.

參數
類型 名稱 預設值 描述
Decimal value 0.0 The value of the entity's push-through, in blocks


minecraft:scale[編輯 | 編輯原始碼]

Sets the entity's visual size.

參數
類型 名稱 預設值 描述
Decimal value 1.0 The value of the scale. 1.0 means the entity will appear at the scale they are defined in their model. Higher numbers make the entity bigger


minecraft:skin_id[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer 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.

參數
類型 名稱 預設值 描述
Decimal value 1.0 The value of the volume the entity uses for sound effects


minecraft:variant[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer value 0 The ID of the variant. By convention, 0 is the ID of the base entity


minecraft:mark_variant[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer 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.

參數
類型 名稱 預設值 描述
Decimal value 1.0 The higher the number, the faster the animation for walking plays. A value of 1.0 means normal speed, while 2.0 means twice as fast


minecraft:wants_jockey[編輯 | 編輯原始碼]

Sets that this entity wants to become a jockey.


minecraft:input_ground_controlled[編輯 | 編輯原始碼]

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



Components[編輯 | 編輯原始碼]

minecraft:addrider[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String entity_type The entity type that will be riding this entity
String spawn_event The spawn event that will be used when the riding entity is created


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.

參數
類型 名稱 預設值 描述
Decimal duration 1200.0 Amount of time before the entity grows up, -1 for always a baby.
List feedItems List of items that can be fed to the entity. Includes 'item' for the item name and 'growth' to define how much time it grows up by
List drop_items List of items that the entity drops when it grows up.
String grow_up Event to run when this entity grows up


minecraft:angry[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer duration 25 The amount of time in seconds that the entity will be angry
Integer duration_delta 0 Variance in seconds added to the duration [-delta, delta]
Boolean broadcastAnger false If true, other entities of the same entity definition within the broadcastRange will also become angry
Integer broadcastRange 20 Distance in blocks within which other entities of the same entity definition will become angry
Minecraft Filter broadcast_filters Conditions that make this entry in the list valid
String calm_event Event to run after the number of seconds specified in duration expires (when the entity stops being 'angry')


minecraft:boostable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer duration 3 Time in seconds for the boost
Decimal speed_multiplier 1.0 Factor by which the entity's normal speed increases. E.g. 2.0 means go twice as fast
List boost_items List of items that can be used to boost while riding this entity. Each item has the following properties:
參數
類型 名稱 預設值 描述
String item Name of the item that can be used to boost
String replaceItem The item used to boost will become this item once it is used up
Integer damage 1 This is the damage that the item will take each time it is used


minecraft:annotation.break_door[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal break_time 12.0 The time in seconds required to break through doors.
String min_difficulty hard The minimum difficulty that the world must be on for this entity to break doors.


minecraft:breathable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer totalSupply 15 Time in seconds the entity can hold its breath
Integer suffocateTime -20 Time in seconds between suffocation damage
Decimal inhaleTime 0.0 Time in seconds to recover breath to maximum
Boolean breathesAir true If true, this entity can breathe in air
Boolean breathesWater false If true, this entity can breathe in water
Boolean breathesLava false If true, this entity can breathe in lava
Boolean breathesSolids false If true, this entity can breathe in solid blocks
Boolean generatesBubbles true If true, this entity will have visible bubbles while in water
List breatheBlocks List of blocks this entity can breathe in, in addition to the above
List nonBreatheBlocks List of blocks this entity can't breathe in, in addition to the above


minecraft:burns_in_daylight[編輯 | 編輯原始碼]

Specifies if/how a mob burns in daylight.


minecraft:strength[編輯 | 編輯原始碼]

Defines the entity's strength to carry items.

參數
類型 名稱 預設值 描述
Integer value 1 The initial value of the strength
Integer max 5 The maximum strength of this entity


minecraft:breedable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Boolean requireTame true If true, the entities need to be tamed first before they can breed.
Boolean blend_attributes true If true, the entities will blend their attributes in the offspring after they breed. For example, horses blend their health, movement, and jump_strength in their offspring.
Decimal extraBabyChance 0.0 Chance that up to 16 babies will spawn between 0.0 and 1.0, where 1.0 is 100%
Decimal breedCooldown 60.0 Time in seconds before the Entity can breed again
Boolean inheritTamed true If true, the babies will be automatically tamed if its parents are
Boolean allowSitting false If true, entities can breed while sitting
JSON Object mutation_factor Determines how likely the babies are to NOT inherit one of their parent's variances. Values are between 0.0 and 1.0, with a higher number meaning more likely to mutate
參數
類型 名稱 預設值 描述
Decimal variant 0.0 The percentage chance of a mutation on the entity's variant type
Decimal extra_variant 0.0 The percentage chance of a mutation on the entity's extra variant type
Decimal color 0.0 The percentage chance of a mutation on the entity's color
List breedItems The list of items that can be used to get the entity into the 'love' state
List environment_requirements The list of nearby block requirements to get the entity into the 'love' state.
block 

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.


List breedsWith The list of entity definitions that this entity can breed with.
參數
類型 名稱 預設值 描述
String mateType The entity definition of this entity's mate
String babyType The entity definition of this entity's babies
String breed_event Event to run when this entity breeds
Boolean causes_pregnancy false If true, the entity will become pregnant instead of spawning a baby.
Minecraft Filter love_filters The filters to run when attempting to fall in love.


minecraft:bribeable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal bribe_cooldown 2.0 Time in seconds before the Entity can be bribed again
List bribe_items The list of items that can be used to bribe the entity


minecraft:inventory[編輯 | 編輯原始碼]

Defines this entity's inventory properties.

參數
類型 名稱 預設值 描述
String container_type none Type of container this entity has. Can be horse, minecart_chest, minecart_hopper, inventory, container or hopper
Integer inventory_size 5 Number of slots the container has
Boolean can_be_siphoned_from false If true, the contents of this inventory can be removed by a hopper
Boolean private false If true, only the entity can access the inventory
Boolean restrict_to_owner false If true, the entity's inventory can only be accessed by its owner or itself
Integer additional_slots_per_strength 0 Number of slots that this entity can gain per extra strength


minecraft:damage_over_time[編輯 | 編輯原始碼]

Applies defined amount of damage to the entity at specified intervals

參數
類型 名稱 預設值 描述
Integer damagePerHurt 1 Amount of damage caused each hurt
Integer timeBetweenHurt 0 Time in seconds between damage


minecraft:damage_sensor[編輯 | 編輯原始碼]

Defines what events to call when this entity is damaged by specific entities or items. Can be either an array or a single instance.

參數
類型 名稱 預設值 描述
List on_damage List of triggers with the events to call when taking this specific kind of damage, allows specifying filters for entity definitions and events
Boolean 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
String cause Type of damage that triggers this set of events


minecraft:despawn[編輯 | 編輯原始碼]

Despawns the associated Actor immediately or when the optional filter evaluates to true.

參數
類型 名稱 預設值 描述
Minecraft Filter filters The list of conditions that must be satisfied before the Actor is despawned
Boolean remove_child_entities false If true, all entities linked to this entity in a child relationship (eg. leashed) will also be despawned


minecraft:environment_sensor[編輯 | 編輯原始碼]

Creates a trigger based on environment conditions.

參數
類型 名稱 預設值 描述
List on_environment The list of triggers that fire when the environment conditions match the given filter criteria.


minecraft:equippable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
List slots List of slots and the item that can be equipped
參數
類型 名稱 預設值 描述
Integer slot 0 The slot number of this slot
List accepted_items The list of items that can go in this slot
String item Identifier of the item that can be equipped for this slot
String interact_text Text to be displayed when the entity can be equipped with this item when playing with Touch-screen controls
String on_equip Event to trigger when this entity is equipped with this item
String on_unequip Event to trigger when this item is removed from this entity


minecraft:explode[編輯 | 編輯原始碼]

Defines how the entity explodes.

參數
類型 名稱 預設值 描述
Range [a, b] fuseLength [0.0, 0.0] The range for the random amount of time the fuse will be lit before exploding, a negative value means the explosion will be immediate
Decimal power 3.0 The radius of the explosion in blocks and the amount of damage the explosion deals
Decimal maxResistance Infinite A blocks explosion resistance will be capped at this value when an explosion occurs
Boolean fuseLit false If true, the fuse is already lit when this component is added to the entity
Boolean causesFire false If true, blocks in the explosion radius will be set on fire
Boolean breaks_blocks true If true, the explosion will destroy blocks in the explosion radius
Boolean fireAffectedByGriefing false If true, whether the explosion causes fire is affected by the mob griefing game rule
Boolean destroyAffectedByGriefing false If true, whether the explosion breaks blocks is affected by the mob griefing game rule


minecraft:navigation.float[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_break_doors false Tells the pathfinder that it can path through a closed door and break it
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path


minecraft:navigation.generic[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_break_doors false Tells the pathfinder that it can path through a closed door and break it
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path


minecraft:healable[編輯 | 編輯原始碼]

Defines the interactions with this entity for healing it.

參數
類型 名稱 預設值 描述
Array items The array of items that can be used to heal this entity
參數
類型 名稱 預設值 描述
String item Item identifier that can be used to heal this entity
Integer heal_amount 1 The amount of health this entity gains when fed this item
Minecraft Filter filters The filter group that defines the conditions for using this item to heal the entity
Boolean force_use false Determines if item can be used regardless of entity being at full health
Minecraft Filter filters The filter group that defines the conditions for this trigger


minecraft:hurt_when_wet[編輯 | 編輯原始碼]

Specifies if an actor is hurt when wet.


minecraft:ravager_blocked[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
List reaction_choices [ ] A list of weighted responses to the melee attack being blocked
Decimal knockback_strength 3.0 The strength with which blocking entities should be knocked back


minecraft:insomnia[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal days_until_insomnia 3.0 Number of days the mob has to stay up until the insomnia effect begins.


minecraft:genetics[編輯 | 編輯原始碼]

Defines the way a mob's genes and alleles are passed on to it's offspring, and how those traits manifest in the child. Compatible parent genes are crossed together, the alleles are handed down from the parents to the child, and any matching genetic variants fire off JSON events to modify the child and express the traits.

參數
類型 名稱 預設值 描述
Decimal mutation_rate 0.03125 Chance that an allele will be replaced with a random one instead of the parent's allele during birth.
List genes The list of genes that this entity has and will cross with a partner during breeding.
參數
類型 名稱 預設值 描述
String name The name of the gene.
Integer allele_range The range of positive integer allele values for this gene. Spawned mobs will have a random number in this range assigned to them.
參數
類型 名稱 預設值 描述
Integer range_min 0 Lower bound of the allele values for this gene.
Integer range_max 0 Upper bound of the allele values for this gene.
List genetic_variants The list of genetic variants for this gene. These check for particular allele combinations and fire events when all of them are satisfied.
參數
類型 名稱 預設值 描述
Integer main_allele -1 If this value is non-negative, compare the mob's main allele with this value for a match. Can also be a range of integers.
Integer hidden_allele -1 If this value is non-negative, compare the mob's hidden allele with this value for a match. Can also be a range of integers.
Integer either_allele -1 If this value is non-negative, compare both the mob's main and hidden alleles with this value for a match with either. Can also be a range of integers.
Integer 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.
String birth_event Event to run when this mob is created and matches the above allele conditions.


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.

參數
類型 名稱 預設值 描述
Decimal cooldown 0.0 An optional cool down in seconds to prevent spamming interactions.
List items The list of items that can be given to the entity to place in their inventory.
String on_give Event to fire when the correct item is given.


minecraft:interact[編輯 | 編輯原始碼]

Defines interactions with this entity.

參數
類型 名稱 預設值 描述
Decimal cooldown 0.0 Time in seconds before this entity can be interacted with again
Boolean swing false If true, the player will do the 'swing' animation when interacting with this entity
Boolean use_item false If true, the interaction will use an item
Integer hurt_item 0 The amount of damage the item will take when used to interact with this entity. A value of 0 means the item won't lose durability
String interact_text Text to show when the player is able to interact in this way with this entity when playing with Touch-screen controls
JSON Object add_items Loot table with items to add to the player's inventory upon successful interaction
參數
類型 名稱 預設值 描述
String table File path, relative to the Behavior Pack's path, to the loot table file
JSON Object spawn_items Loot table with items to drop on the ground upon successful interaction
參數
類型 名稱 預設值 描述
String table File path, relative to the Behavior Pack's path, to the loot table file
String transform_to_item The item used will transform to this item upon successful interaction. Format: itemName:auxValue
String play_sounds List of sounds to play when the interaction occurs
String spawn_entities List of entities to spawn when the interaction occurs
String on_interact Event to fire when the interaction occurs
JSON Object particle_on_start Particle effect that will be triggered at the start of the interaction
particle_type 

The type of particle that will be spawned


particle_y_offset 

Will offset the particle this amount in the y direction


particle_offset_towards_interactor 

Whether or not the particle will appear closer to who performed the interaction



minecraft:leashable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal soft_distance 4.0 Distance in blocks at which the 'spring' effect starts acting to keep this entity close to the entity that leashed it
Decimal hard_distance 6.0 Distance in blocks at which the leash stiffens, restricting movement
Decimal max_distance 10.0 Distance in blocks at which the leash breaks
String on_leash Event to call when this entity is leashed
String on_unleash Event to call when this entity is unleashed
Boolean can_be_stolen false If true, players can leash this entity even if it is already leashed to another mob


minecraft:lookat[編輯 | 編輯原始碼]

Defines the behavior when another entity looks at this entity.

參數
類型 名稱 預設值 描述
Boolean setTarget true If true, this entity will set the attack target as the entity that looked at it
Decimal searchRadius 10.0 Maximum distance this entity will look for another entity looking at it
Boolean mAllowInvulnerable false If true, invulnerable entities (e.g. Players in creative mode) are considered valid targets
Range [a, b] look_cooldown [0.0, 0.0] The range for the random amount of time during which the entity is 'cooling down' and won't get angered or look for a target
Minecraft Filter filters player Defines the entities that can trigger this component
String look_event The event identifier to run when the entities specified in filters look at this entity


minecraft:managed_wandering_trader[編輯 | 編輯原始碼]

This component is used to implement part of the Wandering Trader behavior


minecraft:tamemount[編輯 | 編輯原始碼]

Allows the Entity to be tamed by mounting it.

參數
類型 名稱 預設值 描述
Integer minTemper 0 The minimum value for the entity's random starting temper
Integer maxTemper 100 The maximum value for the entity's random starting temper
String feed_text The text that shows in the feeding interact button
String ride_text The text that shows in the riding interact button
Integer attemptTemperMod 5 The amount the entity's temper will increase when mounted
JSON Object feedItems The list of items that can be used to increase the entity's temper and speed up the taming process
參數
類型 名稱 預設值 描述
String item Name of the item this entity likes and can be used to increase this entity's temper
Decimal temperMod 0.0 The amount of temper this entity gains when fed this item
JSON Object autoRejectItems The list of items that, if carried while interacting with the entity, will anger it
參數
類型 名稱 預設值 描述
String item Name of the item this entity dislikes and will cause it to get angry if used while untamed
String tame_event Event that triggers when the entity becomes tamed


minecraft:movement.sway[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal 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.

參數
類型 名稱 預設值 描述
Decimal 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.

參數
類型 名稱 預設值 描述
Decimal 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.

參數
類型 名稱 預設值 描述
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.


minecraft:movement.amphibious[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.


minecraft:nameable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
JSON Object name_actions Describes the special names for this entity and the events to call when the entity acquires those names
參數
類型 名稱 預設值 描述
String on_named Event to be called when this entity acquires the name specified in 'name_filter'
String name_filter List of special names that will cause the events defined in 'on_named' to fire
String default_trigger Trigger to run when the entity gets named
Boolean alwaysShow false If true, the name will always be shown
Boolean allowNameTagRenaming true If true, this entity can be renamed with name tags


minecraft:navigation.walk[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_break_doors false Tells the pathfinder that it can path through a closed door and break it
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path


minecraft:peek[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String on_open Event to call when the entity starts peeking
String on_close Event to call when the entity is done peeking
String on_target_open Event to call when the entity's target entity starts peeking


minecraft:preferred_path[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Integer max_fall_blocks 3 Distance mob can fall without taking damage
Integer jump_cost 0 Added cost for jumping up a node
Decimal default_block_cost 0 Cost for non-preferred blocks
List preferred_path_blocks A list of blocks with their associated cost


minecraft:projectile[編輯 | 編輯原始碼]

Allows the entity to be a thrown entity.

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


minecraft:raid_trigger[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String triggered_event Event to run we attempt to trigger a raid on the village.


minecraft:rail_sensor[編輯 | 編輯原始碼]

Defines the behavior of the entity when the rail gets activated or deactivated.

參數
類型 名稱 預設值 描述
Boolean check_block_types false If true, on tick this entity will trigger its on_deactivate behavior
Boolean tick_command_block_on_activate true If true, command blocks will start ticking when passing over an activated rail
Boolean tick_command_block_on_deactivate false If false, command blocks will stop ticking when passing over a deactivated rail
Boolean eject_on_activate true If true, this entity will eject all of its riders when it passes over an activated rail
Boolean eject_on_deactivate false If true, this entity will eject all of its riders when it passes over a deactivated rail
String on_activate Event to call when the rail is activated
String on_deactivate Event to call when the rail is deactivated


minecraft:rail_movement[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal max_speed 0.4 Maximum speed that this entity will move at when on the rail


minecraft:rideable[編輯 | 編輯原始碼]

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

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


minecraft:scale_by_age[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal start_scale 1.0 Initial scale of the newborn entity
Decimal end_scale 1.0 Ending scale of the entity when it's fully grown


minecraft:sittable[編輯 | 編輯原始碼]

Defines the entity's 'sit' state.

參數
類型 名稱 預設值 描述
String sit_event Event to run when the entity enters the 'sit' state
String stand_event Event to run when the entity exits the 'sit' state


minecraft:movement.jump[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.
Range [a, b] jump_delay [0.0, 0.0] Delay after landing when using the slime move control.


minecraft:movement.basic[編輯 | 編輯原始碼]

This component accents the movement of an entity.

參數
類型 名稱 預設值 描述
Decimal max_turn 30.0 The maximum number in degrees the mob can turn per tick.


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

參數
類型 名稱 預設值 描述
Boolean should_leash false If true, this the spawned entity will be leashed to the parent
Integer num_to_spawn 1 The number of entities of this type to spawn each time that this triggers
Integer min_wait_time 300 Minimum amount of time to randomly wait in seconds before another entity is spawned
Integer max_wait_time 600 Maximum amount of time to randomly wait in seconds before another entity is spawned
String spawn_sound plop Identifier of the sound effect to play when the entity is spawned
String spawn_item egg Item identifier of the item to spawn
String spawn_entity Identifier of the entity to spawn, leave empty to spawn the item defined above instead
String spawn_method born Method to use to spawn the entity
String spawn_event minecraft:entity_born Event to call when the entity is spawned
Minecraft Filter filters If present, the specified entity will only spawn if the filter evaluates to true
Boolean single_use false If true, this component will only ever spawn the specified entity once


minecraft:shareables[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
List items List of items that the entity wants to share
item 

The name of the item


want_amount 

Number of this item this entity wants to share


surplus_amount 

Number of this item considered extra that the entity wants to share


craft_into 

Defines the item this entity wants to craft with the item defined above. Should be an item name



minecraft:shooter[編輯 | 編輯原始碼]

Defines the entity's ranged attack behavior.

參數
類型 名稱 預設值 描述
String 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
Integer auxVal -1 ID of the Potion effect to be applied on hit


minecraft:tameable[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal probability 1.0 The chance of taming the entity with each item use between 0.0 and 1.0, where 1.0 is 100%
List tameItems The list of items that can be used to tame this entity
String tame_event Event to run when this entity becomes tamed


minecraft:target_nearby_sensor[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Decimal inside_range 1.0 Maximum distance in blocks that another entity will be considered in the 'inside' range
Decimal outside_range 5.0 Maximum distance in blocks that another entity will be considered in the 'outside' range
String on_inside_range Event to call when an entity gets in the inside range. Can specify 'event' for the name of the event and 'target' for the target of the event
String on_outside_range Event to call when an entity gets in the outside range. Can specify 'event' for the name of the event and 'target' for the target of the event


minecraft:teleport[編輯 | 編輯原始碼]

Defines an entity's teleporting behavior.

參數
類型 名稱 預設值 描述
Boolean randomTeleports true If true, the entity will teleport randomly
Decimal minRandomTeleportTime 0.0 Minimum amount of time in seconds between random teleports
Decimal maxRandomTeleportTime 20.0 Maximum amount of time in seconds between random teleports
Vector [a, b, c] randomTeleportCube [32.0, 16.0, 32.0] Entity will teleport to a random position within the area defined by this cube
Decimal targetDistance 16.0 Maximum distance the entity will teleport when chasing a target
Decimal target_teleport_chance 1.0 The chance that the entity will teleport between 0.0 and 1.0. 1.0 means 100%
Decimal lightTeleportChance 0.01 Modifies the chance that the entity will teleport if the entity is in daylight
Decimal darkTeleportChance 0.01 Modifies the chance that the entity will teleport if the entity is in darkness


minecraft:tick_world[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Positive Integer radius 2 The area around the entity to tick. Default: 2. Allowed range: 2-6.
Decimal distance_to_players 128 The distance at which the closest player has to be before this entity despawns. This option will be ignored if never_despawn is true. Min: 128 blocks.
Boolean never_despawn true If true, this entity will not despawn even if players are far away. If false, distance_to_players will be used to determine when to despawn.


minecraft:timer[編輯 | 編輯原始碼]

Adds a timer after which an event will fire.

參數
類型 名稱 預設值 描述
Boolean looping true If true, the timer will restart every time after it fires
Boolean randomInterval true If true, the amount of time on the timer will be random between the min and max values specified in time
Range [a, b] time [0.0, 0.0] Amount of time in seconds for the timer. Can be specified as a number or a pair of numbers (min and max). Incompatible with random_time_choices.
String time_down_event Event to fire when the time on the timer runs out
List 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.


minecraft:economy_trade_table[編輯 | 編輯原始碼]

Defines this entity's ability to trade with players.

參數
類型 名稱 預設值 描述
String display_name Name to be displayed while trading with this entity
String table File path relative to the resource pack root for this entity's trades
Boolean new_screen false Used to determine if trading with entity opens the new trade screen
Integer hero_demand_discount -4 How much should Demand be modified by when the player has the Hero of the Village mob effect
Boolean 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.
Boolean 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.


minecraft:trade_table[編輯 | 編輯原始碼]

Defines this entity's ability to trade with players.

參數
類型 名稱 預設值 描述
String display_name Name to be displayed while trading with this entity
String table File path relative to the resource pack root for this entity's trades
Boolean new_screen false Used to determine if trading with entity opens the new trade screen
Boolean 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.
Boolean 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.


minecraft:transformation[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String begin_transform_sound Sound to play when the transformation starts
String transformation_sound Sound to play when the entity is done transforming
String into Entity Definition that this entity will transform into
Boolean drop_equipment Cause the entity to drop all equipment upon transformation
Boolean keep_owner If this entity is owned by another entity, it should remain owned after transformation.
Boolean keep_level If this entity has trades and has leveled up, it should maintain that level after transformation.
JSON Object add List of components to add to the entity after the transformation
參數
類型 名稱 預設值 描述
List component_groups Names of component groups to add
JSON Object delay Defines the properties of the delay for the transformation
參數
類型 名稱 預設值 描述
Decimal value 0.0 Time in seconds before the entity transforms
Decimal block_assist_chance 0.0 Chance that the entity will look for nearby blocks that can speed up the transformation. Value must be between 0.0 and 1.0
Integer block_radius 0 Distance in Blocks that the entity will search for blocks that can help the transformation
Integer block_max 0 Maximum number of blocks the entity will look for to aid in the transformation. If not defined or set to 0, it will be set to the block radius
Decimal block_chance 0.0 Chance that, once a block is found, will help speed up the transformation
List block_types List of blocks that can help the transformation of this entity


minecraft:trusting[編輯 | 編輯原始碼]

Defines the rules for a mob to trust players.

參數
類型 名稱 預設值 描述
Decimal probability 1.0 The chance of the entity trusting with each item use between 0.0 and 1.0, where 1.0 is 100%
List trust_items The list of items that can be used to get the entity to trust players
String trust_event Event to run when this entity becomes trusting


minecraft:navigation.climb[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_break_doors false Tells the pathfinder that it can path through a closed door and break it
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path


minecraft:navigation.swim[編輯 | 編輯原始碼]

Allows this entity to generate paths that include water.

參數
類型 名稱 預設值 描述
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_break_doors false Tells the pathfinder that it can path through a closed door and break it
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path


minecraft:water_movement[編輯 | 編輯原始碼]

參數
類型 名稱 預設值 描述
Decimal drag_factor 0.8 Drag factor to determine movement speed when in water.


minecraft:jump.dynamic[編輯 | 編輯原始碼]

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


minecraft:item_hopper[編輯 | 編輯原始碼]

Determines that this entity is an item hopper


minecraft:jump.static[編輯 | 編輯原始碼]

Gives the entity the ability to jump.

參數
類型 名稱 預設值 描述
Decimal jump_power 0.42 The initial vertical velocity for the jump


minecraft:navigation.fly[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
Boolean can_path_over_water false Tells the pathfinder whether or not it can travel on the surface of the water
Boolean can_sink true Tells the pathfinder whether or not it will be pulled down by gravity while in water
Boolean avoid_sun false Whether or not the pathfinder should avoid tiles that are exposed to the sun when creating paths
Boolean can_pass_doors true Whether a path can be created through a door
Boolean can_open_doors false Tells the pathfinder that it can path through a closed door assuming the AI will open the door
Boolean can_break_doors false Tells the pathfinder that it can path through a closed door and break it
Boolean avoid_water false Tells the pathfinder to avoid water when creating a path
Boolean avoid_portals false Tells the pathfinder to avoid portals (like nether portals) when finding a path


minecraft:scaffolding_climber[編輯 | 編輯原始碼]

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


minecraft:scheduler[編輯 | 編輯原始碼]

fires off scheduled mob events at time of day events.

參數
類型 名稱 預設值 描述
List scheduled_event 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:annotation.open_door[編輯 | 編輯原始碼]

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


minecraft:is_illager_captain[編輯 | 編輯原始碼]

Sets that this entity is an illager captain.


minecraft:break_blocks[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
List breakable_blocks A list of the blocks that can be broken as this entity moves around



Triggers[編輯 | 編輯原始碼]

minecraft:on_death[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_friendly_anger[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_hurt[編輯 | 編輯原始碼]

Adds a trigger to call when this entity takes damage.

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_hurt_by_player[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_ignite[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_start_landing[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_start_takeoff[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_target_acquired[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_target_escape[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger


minecraft:on_wake_with_owner[編輯 | 編輯原始碼]

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

參數
類型 名稱 預設值 描述
String event The event to run when the conditions for this trigger are met
String target self The target of the event
Minecraft Filter filters The list of conditions for this trigger



Built-in Events[編輯 | 編輯原始碼]

參數
Name Description
minecraft:entity_transformed Event called on an entity that transforms into another entity.
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:on_prime Event called on an entity whose fuse is lit and is ready to explode.


ID Lists[編輯 | 編輯原始碼]

Entity Description Properties[編輯 | 編輯原始碼]

參數
JSON Name ID
animations 0
scripts 0


Attributes[編輯 | 編輯原始碼]

參數
JSON Name ID
minecraft:attack 1651346034
minecraft:spell_effects 523264365
minecraft:strength 648564399
minecraft:strength 648564399


Properties[編輯 | 編輯原始碼]

參數
JSON Name 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 0
minecraft:default_look_angle -815556357
minecraft:is_dyeable 1381448355
minecraft:equipment 714661022
minecraft:fire_immune -1071767182
minecraft:type_family -255011285
minecraft:floats_in_liquid 179778474
minecraft:flying_speed -570508595
minecraft:foot_size 1133270874
minecraft:friction_modifier -714364556
minecraft:ground_offset -1816881803
minecraft:is_baby 1853172763
minecraft:is_charged 125340337
minecraft:is_chested -817599379
minecraft:is_hidden_when_invisible -1553744
minecraft:is_ignited 905710223
minecraft:is_saddled 1037901616
minecraft:is_shaking 523951884
minecraft:is_sheared 1154836813
minecraft:is_illager_captain 0
minecraft:is_stunned 0
minecraft:is_stackable 1184456737
minecraft:is_tamed 1646421078
minecraft:item_controllable 1868311069
minecraft:loot 1775814032
minecraft:push_through -138030768
minecraft:scale 77854436
minecraft:skin_id 1838729593
minecraft:sound_volume 937951776
minecraft:variant -1789583977
minecraft:mark_variant 663621689
minecraft:walk_animation_speed 972393614
minecraft:wants_jockey 1832515141
minecraft:input_ground_controlled -646415617
minecraft:is_illager_captain 0


Components[編輯 | 編輯原始碼]

參數
JSON Name ID
minecraft:burns_in_daylight 1256874605
minecraft:hurt_when_wet 237531867
minecraft:addrider -1014528905
minecraft:ageable 1092934985
minecraft:angry 725411499
minecraft:boostable -8316315
minecraft:annotation.break_door 0
minecraft:breathable -707187232
minecraft:burns_in_daylight 1256874605
minecraft:breedable -1616430100
minecraft:bribeable 0
0
minecraft:inventory 1941951218
minecraft:damage_over_time 0
minecraft:damage_sensor -82616534
minecraft:despawn 0
minecraft:environment_sensor 687748970
minecraft:equippable -1164142226
minecraft:explode -1683058581
minecraft:navigation.float -842998036
minecraft:navigation.generic 0
minecraft:healable -54247424
minecraft:hurt_when_wet 237531867
minecraft:ravager_blocked 0
minecraft:insomnia -300455606
minecraft:genetics -82484670
minecraft:giveable 1739199795
minecraft:interact -1996861528
minecraft:leashable 893445039
minecraft:lookat -1329707008
minecraft:managed_wandering_trader 0
minecraft:tamemount 1615660288
minecraft:movement.sway 0
minecraft:movement.generic 0
minecraft:movement.skip -1828832272
minecraft:movement.fly -1487316136
minecraft:movement.amphibious 0
minecraft:nameable -595398763
minecraft:navigation.walk 1909033775
minecraft:peek -863721039
minecraft:preferred_path 0
minecraft:projectile 1922456869
minecraft:raid_trigger 2093209329
minecraft:rail_sensor 1273161273
minecraft:rail_movement -78235634
minecraft:rideable 1656173828
minecraft:scale_by_age 64881972
minecraft:sittable -1376274106
minecraft:movement.jump 1256268727
minecraft:movement.basic 3354475
minecraft:spawn_entity 1991964333
minecraft:shareables 1301057082
minecraft:shooter 184150118
minecraft:tameable 932870003
minecraft:target_nearby_sensor 1309819882
minecraft:teleport -1900891127
minecraft:tick_world -381759296
minecraft:timer 1862095863
minecraft:economy_trade_table 0
minecraft:trade_table 50480315
minecraft:transformation -457894577
minecraft:trusting 936499892
minecraft:navigation.climb -1075360945
minecraft:navigation.swim 1908076634
minecraft:water_movement 0
0
minecraft:jump.dynamic 945664737
minecraft:item_hopper -447601772
minecraft:jump.static 1064987526
minecraft:navigation.fly -1997823129
minecraft:scaffolding_climber 169799877
minecraft:scheduler -684492525
minecraft:annotation.open_door 0
minecraft:break_blocks 0


Triggers[編輯 | 編輯原始碼]

參數
JSON Name 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




Data-Driven Spawning[編輯 | 編輯原始碼]

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

Spawn Rules[編輯 | 編輯原始碼]

Getting Started[編輯 | 編輯原始碼]

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

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

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


Conditions[編輯 | 編輯原始碼]

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

Components 
Name Description
minecraft:spawns_on_surface This component allows the mob to spawn on the ground. Adding the component cause it to be true, removing it cause the mob to stop spawning on the surface.
minecraft:spawns_underwater This component allows the mob to spawn underwater. Adding the component cause it to be true, removing it cause the mob to stop spawning on the surface.
minecraft:brightness_filter This component allows players to set the light level range that causes the mob to spawn.
參數
類型 名稱 預設值 描述
Decimal min 0.0 This is the minimum light level value that allows the mob to spawn
Decimal max 15.0 This is the maximum light level value that allows the mob to spawn
Boolean 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.)
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.
參數
類型 名稱 預設值 描述
Decimal default 0.0 This is the priority of the mob spawning
minecraft:difficulty_filter This component allows players determine what mobs spawn when certain difficulty levels are set.
參數
類型 名稱 預設值 描述
String min This is the minimum difficulty level that a mob spawns
String max This is the maximum difficulty level that a mob spawns
minecraft:herd This component allows players to determine the herd size of animals.
參數
類型 名稱 預設值 描述
Decimal min_size This is the minimum number of mobs that spawn in a herd
Decimal max_size This is the maximum number of mobs that spawn in a herd
String event This is an event that can be triggered from spawning
Decimal event_skip_count This is the number of mobs spawned before the specified event is triggered
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.



Biome Tags[編輯 | 編輯原始碼]

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:

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


Tagged Biomes[編輯 | 編輯原始碼]

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



Example Spawn Rules for the zombie
"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"
        }
      }
    ]
  }


ID Lists[編輯 | 編輯原始碼]

Component IDs[編輯 | 編輯原始碼]

參數
類型 名稱 預設值 描述
minecraft:behavior.avoid_mob_type 386517767
minecraft:behavior.beg 1346418048
minecraft:behavior.break_door -1798237626
minecraft:behavior.stomp_turtle_egg 851839416
minecraft:behavior.breed 51166360
minecraft:behavior.charge_held_item 81480366
minecraft:behavior.defend_village_target 1469600895
minecraft:behavior.drink_potion 277029334
minecraft:behavior.door_interact -286762735
minecraft:behavior.eat_block 1972447274
minecraft:behavior.explore_outskirts -1955198366
minecraft:behavior.flee_sun -617664229
minecraft:behavior.float 1758503000
minecraft:behavior.follow_owner 1213259599
minecraft:behavior.follow_parent 2127040136
minecraft:behavior.follow_caravan 9936402
minecraft:behavior.follow_mob -1524701626
minecraft:behavior.go_home -1579225026
minecraft:behavior.knockback_roar -1304117826
minecraft.behavior.scared 0
minecraft:behavior.move_to_water 1886139445
minecraft:behavior.move_to_land -943551837
minecraft.behavior.move_to_poi 0
minecraft:behavior.move_to_village -805189394
minecraft.behavior.hide 0
minecraft.behavior.work 0
minecraft:behavior.random_breach 928528911
minecraft:behavior.nearest_attackable_target -2032255557
minecraft:behavior.hurt_by_target -1710404297
minecraft:behavior.owner_hurt_by_target 530667419
minecraft:behavior.owner_hurt_target 995655261
minecraft:behavior.lay_egg -1207740530
minecraft:behavior.look_at_player -1892159379
minecraft:behavior.look_at_target -885375871
minecraft:behavior.look_at_entity -1735428573
minecraft:behavior.look_at_trading_player -2094605693
minecraft:behavior.mount_pathing 1112137677
minecraft:behavior.move_indoors 2107078532
minecraft:behavior.move_through_village 779377630
minecraft:behavior.move_towards_restriction 1288087401
minecraft:behavior.move_towards_target -166537884
minecraft:behavior.follow_target_captain -135480526
minecraft:behavior.move_to_random_block 395022171
minecraft:behavior.ocelotattack 560197714
minecraft:behavior.ocelot_sit_on_block -1327999383
minecraft:behavior.lay_down -2074934675
minecraft:behavior.offer_flower -885387854
minecraft:behavior.open_door -906200433
minecraft:behavior.panic -169886247
minecraft:behavior.run_around_like_crazy -1390363669
minecraft:behavior.restrict_sun -382716017
minecraft:behavior.restrict_open_door 715583988
minecraft:behavior.random_look_around 1177762851
minecraft:behavior.silverfish_merge_with_stone 321908121
minecraft:behavior.silverfish_wake_up_friends 484391748
minecraft:behavior.stay_while_sitting 1346980478
minecraft:behavior.make_love -1551283431
minecraft:behavior.snacking 875141064
minecraft:behavior.random_sitting 1722716662
minecraft:behavior.melee_attack 1848335663
minecraft:behavior.stomp_attack -1851446496
minecraft:behavior.delayed_attack 943514889
minecraft:behavior.ranged_attack -2093407250
minecraft:behavior.random_stroll -1643504294
minecraft:behavior.random_swim -1465281278
minecraft:behavior.random_fly -446385505
minecraft:behavior.swim_wander -1576142514
minecraft:behavior.tempt 422904556
minecraft:behavior.trade_interest -574851053
minecraft:behavior.peek 211304085
minecraft:behavior.play -505601580
minecraft:behavior.receive_love 1156694272
minecraft:behavior.take_flower 1218648257
minecraft:behavior.harvest_farm_block 10843010
minecraft:behavior.squid_idle 1741234679
minecraft:behavior.squid_flee 1304043261
minecraft:behavior.squid_move_away_from_ground 892387674
minecraft:behavior.squid_out_of_water -1347598607
minecraft:behavior.squid_dive 1626998843
minecraft:behavior.skeleton_horse_trap 530952387
minecraft:behavior.sleep -1811763
minecraft:behavior.swell -1473132493
minecraft:behavior.dragonholdingpattern 1066617362
minecraft:behavior.dragonlanding -152352492
minecraft:behavior.dragonscanning -1003941066
minecraft:behavior.dragonflaming -865288877
minecraft:behavior.dragontakeoff -1912535317
minecraft:behavior.dragonchargeplayer 1808565780
minecraft:behavior.dragonstrafeplayer -1510265153
minecraft:behavior.dragondeath -1541162059
minecraft:behavior.enderman_leave_block -717580550
minecraft:behavior.enderman_take_block -537294220
minecraft:behavior.leap_at_target 256926956
minecraft:behavior.guardian_attack -579215554
minecraft:behavior.slime_float -1480876341
minecraft:behavior.slime_keep_on_jumping -1844762087
minecraft:behavior.slime_random_direction 1437515506
minecraft:behavior.slime_attack -1315951081
minecraft:behavior.raid_garden -1145687602
minecraft:behavior.inspect_bookshelf 40191182
minecraft:behavior.player_ride_tamed 603869698
minecraft:behavior.find_mount 731306871
minecraft:behavior.controlled_by_player 1633000292
minecraft:behavior.wither_random_attack_pos_goal -528895885
minecraft:behavior.wither_target_highest_damage -1065562072
minecraft:behavior.float_wander -1122048364
minecraft:behavior.trade_with_player -2048563493
minecraft:behavior.summon_entity -2005850647
minecraft:behavior.mingle 385775952
minecraft:behavior.send_event -823429137
minecraft:behavior.charge_attack -1921442265
minecraft:behavior.vex_random_move -1117822165
minecraft:behavior.vex_copy_owner_target -643459543
minecraft:behavior.pickup_items 644287189
minecraft:behavior.share_items 2045906118
minecraft:behavior.find_underwater_treasure -1602192311
minecraft:behavior.circle_around_anchor -698025586
minecraft:behavior.swoop_attack 770804235
minecraft:behavior.pet_sleep_with_owner 1379392240
minecraft:behavior.drop_item_for 1846615759
minecraft:behavior.sneeze 1528584076
minecraft:behavior.roll 817471653

另見[編輯 | 編輯原始碼]