Skip to main content

Creating Spawns

webapp_banner.jpg

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
bypassWorldGuard: false
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.

KeyValuesDefault
isEnabledBooleantrue
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.

KeyValuesDefault
lowestYLevelInteger0
Example
lowestYLevel: 0

highestYLevel​

Sets the highest y level (map height) used.

KeyValuesDefault
highestYLevelInteger320
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.

KeyValuesDefault
validWorldsString Listnone
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.

KeyValuesDefault
validWorldEnvironmentsEnvironment Listnone
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.

KeyValuesDefault
validBiomesV2Biome Listnone
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.

KeyValuesDefault
earliestTimeLong0
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.

KeyValuesDefault
latestTimeLong24000
Example
latestTime: 24000

moonPhase​

Sets the required moon phase for the custom spawn to occur.

KeyValuesDefault
moonPhaseSpecial [1]none
Example
moonPhase: FULL_MOON

Special [1]

Expand Table
Moon PhasePreview
NEW_MOON🌑
WAXING_CRESCENT🌒
FIRST_QUARTER🌓
WAXING_GIBBOUS🌔
FULL_MOON🌕
WANING_GIBBOUS🌖
WANING_CRESCENT🌘
LAST_QUARTER🌗

bypassWorldGuard​

Intended to make the custom spawn bypass protection systems such as WorldGuard.

This setting currently does nothing. EliteMobs reads the key out of your spawn file but never acts on it, so WorldGuard flags are always checked regardless of what you set here. To let a spawn happen inside a protected region, set the relevant WorldGuard flags on that region instead.

KeyValuesDefault
bypassWorldGuardBooleanfalse

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.

KeyValuesDefault
canSpawnInLightBooleanfalse
Example
canSpawnInLight: false

isSurfaceSpawn​

Sets if the custom spawn can only happen at the surface of a world.

KeyValuesDefault
isSurfaceSpawnBooleanfalse
Example
isSurfaceSpawn: false

isUndergroundSpawn​

Sets if the custom spawn can only happen underground.

KeyValuesDefault
isUndergroundSpawnBooleanfalse
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:

  1. 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's validWorlds / validWorldEnvironments exclude their world. Timed events additionally skip players who are inside an EliteMobs dungeon world. This selection does not exclude players by game mode.
  2. 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.
  3. The Y level is resolved according to isSurfaceSpawn, isUndergroundSpawn or, if neither is set, by searching upwards for two blocks of air above a non-passable block.
  4. 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 highest block in the column plus one; it does not perform the same clearance checks.
  • Y Level: The final location must sit between lowestYLevel and highestYLevel
  • Game Rules: Ordinary player selection respects the world's mob spawning game rule (spawnMobs on Minecraft 1.21.11 and newer, doMobSpawning before that). Global reinforcements bypass this player-selection check.
  • WorldGuard Flags: Checks the elitemobs-events, elitemob-spawning and WorldGuard's own mob-spawning flags
  • Peace Banners: If suppressEvents is enabled in PeaceBanner.yml (it is by default), a protected location cancels this spawn attempt. A timed event queues its next event; this check does not start another location search for the current attempt.
  • 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; bypassWorldGuard does not disable the WorldGuard checks.