Spawn Rules¶
文档版本:1.21.50.25
Data-Driven spawning allows you to adjust the spawn conditions of mobs.
架构¶
spawn_rules:
{
string "format_version" : opt
object "minecraft:spawn_rules" : opt
{
object "description" : opt
{
identifier "identifier"
string "population_control" : opt
}
array "conditions" : opt
{
object "<any array element>" : opt
{
biome_filter "minecraft:biome_filter"
brightness_filter "minecraft:brightness_filter"
Delay_filter "minecraft:delay_filter"
density_limit "minecraft:density_limit"
difficulty_filter "minecraft:difficulty_filter"
disallow_spawns_in_bubble "minecraft:disallow_spawns_in_bubble"
distance_filter "minecraft:distance_filter"
height_filter "minecraft:height_filter"
height_filter "minecraft:herd"
mob_event_filter "minecraft:mob_event_filter"
permute_type "minecraft:permute_type"
player_in_village_filter "minecraft:player_in_village_filter"
spawn_event "minecraft:spawn_event"
spawns_above_block_filter "minecraft:spawns_above_block_filter"
spawns_lava "minecraft:spawns_lava"
spawns_on_block_filter "minecraft:spawns_on_block_filter"
spawns_on_block_prevented_filter "minecraft:spawns_on_block_prevented_filter"
spawns_on_surface "minecraft:spawns_on_surface"
spawns_underground "minecraft:spawns_underground"
spawns_underwater "minecraft:spawns_underwater"
weight "minecraft:weight"
world_age_filter "minecraft:world_age_filter"
}
}
}
}
format_version
:string- A version that tells minecraft what type of data format can be expected when reading this file.
minecraft:spawn_rules
:object- Data-Driven spawning allows you to adjust the spawn conditions of mobs.
minecraft:spawn_rules
description
:object- The descripton of to which entity this spawn rule belongs.
description
identifier
:identifier- The entity identifier this spawn rule will apply to, entity must exist.
population_control
:string- Setting an entity to a pool it will spawn as long as that pool hasn't reached the spawn limit.
conditions
:array- UNDOCUMENTED.
conditions
<any array element>
:object- UNDOCUMENTED.
<any array element>
minecraft:biome_filter
:biome_filter
<any array element>
:filters- 一个过滤器组。
minecraft:brightness_filter
:brightness_filter
min
:integer- This is the minimum light level value that allows the mob to spawn.
max
:integer- This is the maximum light level value that allows the mob to spawn.
adjust_for_weather
:boolean- 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:delay_filter
:Delay_filter
Delay_filter:
{
integer "min" : opt
integer "max" : opt
identifier "identifier"
number "spawn_chance" : opt
}
min
:integer- This is the minimum delay that a mob spawns.
max
:integer- This is the maximum delay that a mob spawns.
identifier
:identifier- The identifier of the mob that will spawn.
spawn_chance
:number- The percent chance that this entity will spawn.
minecraft:density_limit
:density_limit
surface
:integer- This is the maximum number of mobs of this type spawnable on the surface.
underground
:integer- This is the maximum number of mobs of this type spawnable underground.
minecraft:difficulty_filter
:difficulty_filter
min
:string- This is the minimum difficulty level that a mob spawns.
max
:string- This is the maximum difficulty level that a mob spawns.
minecraft:disallow_spawns_in_bubble
:disallow_spawns_in_bubble
minecraft:distance_filter
:distance_filter
min
:integer- This is the minimum distance level that a mob spawns.
max
:integer- This is the maximum distance level that a mob spawns.
minecraft:height_filter
:height_filter
min
:integer- This is the minimum height level that a mob spawns.
max
:integer- This is the maximum height level that a mob spawns.
minecraft:herd
:height_filter
height_filter:
{
string "initial_event" : opt
integer "initial_event_count" : opt
integer "min_size" : opt
integer "max_size" : opt
string "event" : opt
integer "event_skip_count" : opt
}
initial_event
:string- Runs an event on the first entities in a group.
initial_event_count
:integer- The number of entities that "initial_event" should trigger on.
min_size
:integer- This is the minimum number of mobs that spawn in a herd.
max_size
:integer- This is the maximum number of mobs that spawn in a herd.
event
:string- This is an event that can be triggered from spawning.
event_skip_count
:integer- This is the number of mobs spawned before the specified event is triggered.
height_filter:
array
{
object "<any array element>" : opt
{
string "initial_event" : opt
integer "initial_event_count" : opt
integer "min_size" : opt
integer "max_size" : opt
string "event" : opt
integer "event_skip_count" : opt
}
}
<any array element>
:object- Herd.
<any array element>
minecraft:mob_event_filter
:mob_event_filter
event
:string- The event String in this JSON Object is used to filter the spawn rules of the mob type. Can be type minecraft:pillager_patrols_event, minecraft:wandering_trader_event, or minecraft:ender_dragon_event..
minecraft:permute_type
:permute_type
weight
:integer- The percentage of 100 of a type of mob that should spawn. If there are multiple weights, they must add up to 100.
entity_type
:string- The type of mob to spawn.
guaranteed_count
:number- Causes mobs to spawn with a guaranteed_count before mobs that do not have this spawn condition.
permute_type:
array
{
object "<any array element>" : opt
{
integer "weight" : opt
string "entity_type" : opt
number "guaranteed_count" : opt
}
}
<any array element>
:object- UNDOCUMENTED.
<any array element>
minecraft:player_in_village_filter
:player_in_village_filter
distance
:integer- This is the maximum mob_event level that an entity spawns.
village_border_tolerance
:integer- This is the minimum mob_event level that an entity spawns.
minecraft:spawn_event
:spawn_event
event
:string- UNDOCUMENTED.
minecraft:spawns_above_block_filter
:spawns_above_block_filter
spawns_above_block_filter:
{
string "blocks" : opt
array "blocks" : opt
{
string "<any array element>" : opt
}
number "distance" : opt
}
blocks
:string- UNDOCUMENTED.
blocks
:array- UNDOCUMENTED.
blocks
<any array element>
:string
distance
:number- UNDOCUMENTED.
minecraft:spawns_lava
:spawns_lava
minecraft:spawns_on_block_filter
:spawns_on_block_filter
<any array element>
:string
minecraft:spawns_on_block_prevented_filter
:spawns_on_block_prevented_filter
<any array element>
:string
minecraft:spawns_on_surface
:spawns_on_surface
minecraft:spawns_underground
:spawns_underground
minecraft:spawns_underwater
:spawns_underwater
minecraft:weight
:weight
default
:integer- This is the priority of the mob spawning out of 100.
rarity
:integer- UNDOCUMENTED.
minecraft:world_age_filter
:world_age_filter
min
:integer- This is the minimum world_age_filter level that a mob spawns measured in seconds.