Creating Spawns
What are Custom Spawns?
Custom Spawns are used by Events and global reinforcements to set how, where and when an event should spawn the boss for that event.
Events and global reinforcements set which spawn they are using by writing down its filename.
Creating Custom Spawns
Custom Spawns go into the customspawns folder. One Custom Spawn can be used by several events at the same time, so you don't have to create one per event.
Here is an example Custom Spawn:
isEnabled: true
validWorldEnvironments:
- NORMAL
- CUSTOM
isSurfaceSpawn: true
Making an Anywhere Spawn
To make a spawn that can occur anywhere, your configuration should resemble the following:
isEnabled: true
canSpawnInLight: true
This removes the light restriction and adds no world, time or moon filter of its own. The enabled-world list, default Y range, nearby eligible players, loaded chunks, protection flags and placement checks below still apply.
If you're interested in creating a more customized spawn, keep reading below.
Values
isEnabled
Sets if the spawn is enabled.
| Key | Values | Default |
|---|---|---|
isEnabled | Boolean | true |
Example
isEnabled: true
lowestYLevel
Sets the lowest Y level. The default 0 excludes negative-Y caves; use a negative value such as -64 to allow the underground search into deeper caves. This does not change the initial random Y sampling or the upward search's built-in height bound.
| Key | Values | Default |
|---|---|---|
lowestYLevel | Integer | 0 |
Example
lowestYLevel: 0
highestYLevel
Sets the highest y level (map height) used.
| Key | Values | Default |
|---|---|---|
highestYLevel | Integer | 320 |
Example
highestYLevel: 320
validWorlds
Filters the worlds used for ordinary player selection, including timed events. Omit it to add no world filter of your own; ValidWorlds.yml and the other eligibility checks still apply. Global reinforcements select players directly from the summoner's world and do not apply this filter.
World names are matched against the worlds loaded when EliteMobs loads its spawn files. A misspelled or unloaded world name is dropped without a warning. If none of the listed names match, the spawn has no world filter at all. Run /em reload after loading a world late.
| Key | Values | Default |
|---|---|---|
validWorlds | String List | none |
Example
validWorlds:
- WORLD
- FUN_LAND
If you want all your worlds to be valid you can just not use the setting or format it like this:
validWorlds: []
validWorldEnvironments
Filters the world environments used for ordinary player selection. Omit it to add no environment restriction. Global reinforcements select players directly from the summoner's world and do not apply this filter.
| Key | Values | Default |
|---|---|---|
validWorldEnvironments | Environment List | none |
Example
validWorldEnvironments:
- NORMAL
- NETHER
If you want all environments to be valid you can just not use the setting or format it like this:
validWorldEnvironments: []
validBiomesV2
Sets the biomes where the custom spawn can happen. Leave it out, or use an empty list, to add no biome restriction.
This setting used to be called validBiomes in older versions of EM.
Each entry is a biome key. A name without a namespace, such as plains or DEEP_OCEAN, is read as minecraft:<name>, and case does not matter. If any entry is not a registered biome, EliteMobs logs a warning and disables the whole spawn file, so events and global reinforcements that use it cannot spawn.
The biome is read at the randomly sampled candidate point, before EliteMobs resolves its final Y level. See How a spawn location is picked.
| Key | Values | Default |
|---|---|---|
validBiomesV2 | Biome List | none |
Example
validBiomesV2:
- minecraft:plains
- desert
earliestTime
Sets the earliest in-game time at which the custom spawn can happen. Both time bounds are inclusive. The interval cannot wrap past midnight: earliestTime greater than latestTime prevents the spawn rather than creating an overnight window.
Once a location is found, EliteMobs checks earliestTime, latestTime and moonPhase every tick and waits there until they match. It does not repeat the location's player-distance, light, loaded-chunk or WorldGuard checks after that wait. The final zombie test and peace-banner check still run before placing the boss.
| Key | Values | Default |
|---|---|---|
earliestTime | Long | 0 |
Example
earliestTime: 0
latestTime
Sets the latest in-game time at which the custom spawn can happen, inclusive. Keep it greater than or equal to earliestTime.
| Key | Values | Default |
|---|---|---|
latestTime | Long | 24000 |
Example
latestTime: 24000
moonPhase
Sets the required moon phase for the custom spawn to occur.
| Key | Values | Default |
|---|---|---|
moonPhase | Special [1] | none |
Example
moonPhase: FULL_MOON
Special [1]
Expand Table
| Moon Phase | Preview |
|---|---|
NEW_MOON | 🌑 |
WAXING_CRESCENT | 🌒 |
FIRST_QUARTER | 🌓 |
WAXING_GIBBOUS | 🌔 |
FULL_MOON | 🌕 |
WANING_GIBBOUS | 🌖 |
WANING_CRESCENT | 🌘 |
LAST_QUARTER | 🌗 |
canSpawnInLight
Controls the light check during location selection. With false, the block's combined light level must be 8 or below, including sky light. With true, this check is skipped.
| Key | Values | Default |
|---|---|---|
canSpawnInLight | Boolean | false |
Example
canSpawnInLight: false
isSurfaceSpawn
This describes EliteMobs 10.9.14 and later. In 10.9.13 and earlier, a surface spawn stood on the highest block Bukkit reported for the column, which counts leaves and fluids, and the space above it was not checked. Events and reinforcements could start on a forest canopy, on water or on lava.
Sets if the custom spawn can only happen at the surface of a world. The spawn takes the top of the column, ignoring leaves, so a forest column lands on the forest floor. That top block must be solid and the two blocks above it must not be, so the top of a trunk under leaves is skipped. A column topped by water, lava or water plants is rejected and the search tries another candidate. Set canSpawnOnWater to allow the water surface.
| Key | Values | Default |
|---|---|---|
isSurfaceSpawn | Boolean | false |
Example
isSurfaceSpawn: false
canSpawnOnWater
This describes EliteMobs 10.9.14 and later. In 10.9.13 and earlier this key did not exist, and surface spawns could start on water or lava anyway.
Lets a surface spawn start on the surface of water. With false, a column topped by water is rejected. Lava is always rejected. It only matters with isSurfaceSpawn: true. The bundled ocean_spawn.yml sets it to true.
| Key | Values | Default |
|---|---|---|
canSpawnOnWater | Boolean | false |
Example
canSpawnOnWater: true
isUndergroundSpawn
Sets if the custom spawn can only happen underground.
| Key | Values | Default |
|---|---|---|
isUndergroundSpawn | Boolean | false |
Example
isUndergroundSpawn: false
How a spawn location is picked
EliteMobs does not scan the world for a spot. It picks a random online player and offsets from them:
- A player is chosen at random from the players that are eligible for this spawn. A player is skipped if their EliteMobs data is not loaded, if their world is not in
ValidWorlds.yml, if they are inside a dungeon, arena or class trial instance region, if mob spawning is turned off in their world, or if the spawn'svalidWorlds/validWorldEnvironmentsexclude their world. Timed events additionally skip players who are inside an EliteMobs dungeon world. This selection does not exclude players by game mode. - A candidate uses independently signed offsets from 24 through 127 blocks on both X and Z. Candidates in unloaded chunks are rejected; the search does not load chunks to find a spawn.
- The Y level is resolved according to
isSurfaceSpawn,isUndergroundSpawnor, if neither is set, by searching upwards for two blocks of air above a non-passable block. - The candidate is then run through the validations below.
Global reinforcements use all players in the summoner's world instead of the filtered player list in step 1. They therefore skip that step's loaded-data, world, environment, instance and mob-spawning gamerule checks. Their candidate locations still undergo the biome, height, proximity, light and WorldGuard checks.
Up to 100 candidates are tried, one per tick. If none works, EliteMobs waits a minute and retries. The initial Y sample is 0–255. The generic upward search starts at that sample and stops at highestYLevel or two blocks below the world's build limit, whichever is lower. The underground downward search stops at Y=-63 even with a lower lowestYLevel. Surface and underground modes have their own searches, and surface wins if both are enabled.
Spawn Validation Behavior
EliteMobs checks candidate locations during the search, then performs the final zombie and peace-banner checks when the time and moon conditions permit spawning:
- Player Proximity: Candidates less than 24 blocks from any player are rejected, using three-dimensional distance
- Nether Ceiling: Spawns above Y=127 are blocked in the Nether dimension
- Block Safety: Underground search requires solid ground; the generic upward search requires a non-passable block. Both require two blocks of air above it. Surface mode instead uses the top block of the column, ignoring leaves. That block must be solid, or water with
canSpawnOnWater: true, and the two blocks above it must not be solid. Lava is always rejected. - Y Level: The final location must sit between
lowestYLevelandhighestYLevel - Game Rules: Ordinary player selection respects the world's mob spawning game rule (
spawnMobson Minecraft 1.21.11 and newer,doMobSpawningbefore that). Global reinforcements bypass this player-selection check. - WorldGuard Flags: Checks the
elitemobs-events,elitemob-spawningand WorldGuard's ownmob-spawningflags - Peace Banners: If
suppressEventsis enabled inPeaceBanner.yml(it is by default), a protected location cancels this placement. A timed event then starts a new location search for the same event one tick later, still subject to its start conditions and the minimum cooldown between timed events. Any other spawn, such as a global reinforcement, gives up. - Final test spawn: Right before the boss appears, EliteMobs spawns and immediately removes a plain vanilla zombie at the location. If some other protection plugin blocks that zombie, the location is thrown out and the search restarts
These checks run automatically. The light and peace-banner checks have the configuration switches described above; the WorldGuard checks have no switch.
