Spawn Locations are used to decide where to place the newly spawned mobs relative to the Trigger Position (this is decided by the Trigger and is usually the player position or broken block position).
Shared Properties:
-
array[int] rangeMin
The minimum xyz range in blocks from the trigger position to spawn mobs from. This must be an array of 3 integers. Default [0, 0, 0].
-
array[int] rangeMax
The maximum xyz range in blocks from the trigger position to spawn mobs from. This must be an array of 3 integers. Default [0, 0, 0].
-
string sorting
When multiple spawn positions are found, this determines how they are sorted before spawning mobs at them. Can be "random", "near", "far". Default "random".
Base Type
Base can be used as a type for a simple location, be it random near the player or precisely on the trigger position. Block based Spawners such as the Ore Spawner use this with everything at default settings to spawn a mob where the block was destroyed.
The block type finds locations that are a specific block. The Lava and Fire Spawners use this. For larger areas such as those used by the Animal or Water Spawners, the Random Type is much more effcient and has additional features.
-
array[string] blocks
A list of blocks to filter by. Use block ids like "minecraft:air". Default empty.
-
string listType
Determines if the blocks list is a blacklist or whitelist. Default "whitelist".
-
bool surface
If true, positions that can see the sky are allowed. Default true.
-
bool underground
If true, positions that can not see the sky are allowed. Default true.
-
int blockCost
If set, this many of the spawnable blocks must be found. The fire spawner uses this so that it only spawns when there is a lot of fire blocks near each in one area. Default -1 (no cost).
-
int requiredBlockTypes
If set (above 0), this is the amount of each block in the blocks list must be found. See the mineshaft spawner as an example where by default it requires 4 planks, rails and webs. Default: 0 (disabled).
This is a very effcient and more advanced location that works better for broader areas like on the world surface, in caverns, underwater, etc instead of specific areas like pockets of Lava or Ooze. This uses the properties that the Block Type uses with additional properties.
-
int limit
How many random positions to find. Try not to find more positions than the mob spawn limit of the Spawner as they are just unused it's just a waste of processing. Default 32.
-
bool solidGround
If true positions require a solid walkable block underneath rather than being able to float in the air/water. This is ideal for land based spawners as well as for spawning mobs on the bottom of the ocean, etc. For flying mobs you'll want this to be false or they'll all spawn on the ground. Default false.
-
double easyDifficultyRangeScale
This scales the x and z range values by this amount when on Easy or Peaceful Difficulty. Default 1.5.
-
double normalDifficultyRangeScale
This scales the x and z range values by this amount when on Normal Difficulty. Default 1.
-
double hardDifficultyRangeScale
This scales the x and z range values by this amount when on ard and above Difficulty. Default 0.5.