跳转至

Spawn Rules

文档版本:1.21.0.24

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_versionstring
A version that tells minecraft what type of data format can be expected when reading this file.
minecraft:spawn_rulesobject
Data-Driven spawning allows you to adjust the spawn conditions of mobs.
minecraft:spawn_rules
descriptionobject
The descripton of to which entity this spawn rule belongs.
description
identifieridentifier
The entity identifier this spawn rule will apply to, entity must exist.
identifier:
string
population_controlstring
Setting an entity to a pool it will spawn as long as that pool hasn't reached the spawn limit.
conditionsarray
UNDOCUMENTED.
conditions
<any array element>object
UNDOCUMENTED.
<any array element>
minecraft:biome_filterbiome_filter
biome_filter:
array
{
  filters "<any array element>"
}
<any array element>filters
一个过滤器组
minecraft:brightness_filterbrightness_filter
brightness_filter:
{
  integer "min" : opt
  integer "max" : opt
  boolean "adjust_for_weather" : opt
}
mininteger
This is the minimum light level value that allows the mob to spawn.
maxinteger
This is the maximum light level value that allows the mob to spawn.
adjust_for_weatherboolean
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_filterDelay_filter
Delay_filter:
{
  integer "min" : opt
  integer "max" : opt
  identifier "identifier"
  number "spawn_chance" : opt
}
mininteger
This is the minimum delay that a mob spawns.
maxinteger
This is the maximum delay that a mob spawns.
identifieridentifier
The identifier of the mob that will spawn.
spawn_chancenumber
The percent chance that this entity will spawn.
minecraft:density_limitdensity_limit
density_limit:
{
  integer "surface" : opt
  integer "underground" : opt
}
surfaceinteger
This is the maximum number of mobs of this type spawnable on the surface.
undergroundinteger
This is the maximum number of mobs of this type spawnable underground.
minecraft:difficulty_filterdifficulty_filter
difficulty_filter:
{
  string "min" : opt
  string "max" : opt
}
minstring
This is the minimum difficulty level that a mob spawns.
maxstring
This is the maximum difficulty level that a mob spawns.
minecraft:disallow_spawns_in_bubbledisallow_spawns_in_bubble
disallow_spawns_in_bubble:
{
}
minecraft:distance_filterdistance_filter
distance_filter:
{
  integer "min" : opt
  integer "max" : opt
}
mininteger
This is the minimum distance level that a mob spawns.
maxinteger
This is the maximum distance level that a mob spawns.
minecraft:height_filterheight_filter
height_filter:
{
  integer "min" : opt
  integer "max" : opt
}
mininteger
This is the minimum height level that a mob spawns.
maxinteger
This is the maximum height level that a mob spawns.
minecraft:herdheight_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_eventstring
Runs an event on the first entities in a group.
initial_event_countinteger
The number of entities that "initial_event" should trigger on.
min_sizeinteger
This is the minimum number of mobs that spawn in a herd.
max_sizeinteger
This is the maximum number of mobs that spawn in a herd.
eventstring
This is an event that can be triggered from spawning.
event_skip_countinteger
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_filtermob_event_filter
mob_event_filter:
{
  string "event" : opt
}
eventstring
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_typepermute_type
permute_type:
{
  integer "weight" : opt
  string "entity_type" : opt
  number "guaranteed_count" : opt
}
weightinteger
The percentage of 100 of a type of mob that should spawn. If there are multiple weights, they must add up to 100.
entity_typestring
The type of mob to spawn.
guaranteed_countnumber
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_filterplayer_in_village_filter
player_in_village_filter:
{
  integer "distance" : opt
  integer "village_border_tolerance" : opt
}
distanceinteger
This is the maximum mob_event level that an entity spawns.
village_border_toleranceinteger
This is the minimum mob_event level that an entity spawns.
minecraft:spawn_eventspawn_event
spawn_event:
{
  string "event" : opt
}
eventstring
UNDOCUMENTED.
minecraft:spawns_above_block_filterspawns_above_block_filter
spawns_above_block_filter:
{
  string "blocks" : opt
  array "blocks" : opt
  {
    string "<any array element>" : opt
  }
  number "distance" : opt
}
blocksstring
UNDOCUMENTED.
blocksarray
UNDOCUMENTED.
blocks
<any array element>string
distancenumber
UNDOCUMENTED.
minecraft:spawns_lavaspawns_lava
spawns_lava:
{
}
minecraft:spawns_on_block_filterspawns_on_block_filter
spawns_on_block_filter:
string
spawns_on_block_filter:
array
{
  string "<any array element>" : opt
}
<any array element>string
minecraft:spawns_on_block_prevented_filterspawns_on_block_prevented_filter
spawns_on_block_prevented_filter:
string
spawns_on_block_prevented_filter:
array
{
  string "<any array element>" : opt
}
<any array element>string
minecraft:spawns_on_surfacespawns_on_surface
spawns_on_surface:
{
}
minecraft:spawns_undergroundspawns_underground
spawns_underground:
{
}
minecraft:spawns_underwaterspawns_underwater
spawns_underwater:
{
}
minecraft:weightweight
weight:
{
  integer "default" : opt
  integer "rarity" : opt
}
defaultinteger
This is the priority of the mob spawning out of 100.
rarityinteger
UNDOCUMENTED.
minecraft:world_age_filterworld_age_filter
world_age_filter:
{
  integer "min" : opt
}
mininteger
This is the minimum world_age_filter level that a mob spawns measured in seconds.