Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Entity spawn reasons

Generated from the 26.3 decompile by tools/gen_reference.py. Do not edit by hand.

Every EntitySpawnReason constant, in declaration order, with what each one gates — the classes that compare against it and so behave differently for that reason — and how many classes pass it. A reason with an empty gates column changes nothing by itself: it is a label the spawn path carries for other code to read. EntitySpawnReason.isSpawner folds SPAWNER and TRIAL_SPAWNER together and EntitySpawnReason.ignoresLightRequirements is true of TRIAL_SPAWNER alone. See entity lifecycle.

19 reasons · 13 of them tested somewhere · 41 test sites

#reasonwhat it gatesclasses that pass it
0EntitySpawnReason.NATURALZombieHorse.finalizeSpawn; Drowned.finalizeSpawn; Husk.finalizeSpawn; Raider.finalizeSpawn4
1EntitySpawnReason.CHUNK_GENERATIONnothing tests it2
2EntitySpawnReason.SPAWNERMob.checkMobSpawnRules (through EntitySpawnReason.isSpawner); SkeletonHorse.checkSkeletonHorseSpawnRules (through EntitySpawnReason.isSpawner); Endermite.checkEndermiteSpawnRules (through EntitySpawnReason.isSpawner); Guardian.checkGuardianSpawnRules (through EntitySpawnReason.isSpawner); Monster.checkSurfaceMonstersSpawnRules (through EntitySpawnReason.isSpawner); Silverfish.checkSilverfishSpawnRules (through EntitySpawnReason.isSpawner); Slime.checkSlimeSpawnRules (through EntitySpawnReason.isSpawner); Stray.checkStraySpawnRules (through EntitySpawnReason.isSpawner); Drowned.checkDrownedSpawnRules (through EntitySpawnReason.isSpawner)2
3EntitySpawnReason.STRUCTUREPatrollingMonster.finalizeSpawn; Piglin.finalizeSpawn; Drowned.finalizeSpawn9
4EntitySpawnReason.BREEDINGVillager.finalizeSpawn41
5EntitySpawnReason.MOB_SUMMONEDnothing tests it2
6EntitySpawnReason.JOCKEYnothing tests it5
7EntitySpawnReason.EVENTTraderLlama.finalizeSpawn; PatrollingMonster.finalizeSpawn5
8EntitySpawnReason.CONVERSIONHusk.finalizeSpawn; Zombie.finalizeSpawn; Zombie.handleAttributes5
9EntitySpawnReason.REINFORCEMENTDrowned.checkDrownedSpawnRules1
10EntitySpawnReason.TRIGGEREDWarden.finalizeSpawn12
11EntitySpawnReason.BUCKETAxolotl.finalizeSpawn1
12EntitySpawnReason.SPAWN_ITEM_USEnothing tests it4
13EntitySpawnReason.COMMANDnothing tests it2
14EntitySpawnReason.DISPENSERnothing tests it5
15EntitySpawnReason.PATROLPatrollingMonster.finalizeSpawn1
16EntitySpawnReason.TRIAL_SPAWNERMob.checkMobSpawnRules (through EntitySpawnReason.isSpawner); Animal.checkAnimalSpawnRules (through EntitySpawnReason.ignoresLightRequirements); SkeletonHorse.checkSkeletonHorseSpawnRules (through EntitySpawnReason.isSpawner); SkeletonHorse.checkSkeletonHorseSpawnRules (through EntitySpawnReason.ignoresLightRequirements); Endermite.checkEndermiteSpawnRules (through EntitySpawnReason.isSpawner); Guardian.checkGuardianSpawnRules (through EntitySpawnReason.isSpawner); Monster.checkMonsterSpawnRules (through EntitySpawnReason.ignoresLightRequirements); Monster.checkSurfaceMonstersSpawnRules (through EntitySpawnReason.isSpawner); Silverfish.checkSilverfishSpawnRules (through EntitySpawnReason.isSpawner); Slime.checkSlimeSpawnRules (through EntitySpawnReason.isSpawner); Stray.checkStraySpawnRules (through EntitySpawnReason.isSpawner); Drowned.checkDrownedSpawnRules (through EntitySpawnReason.isSpawner); Drowned.checkDrownedSpawnRules (through EntitySpawnReason.ignoresLightRequirements)2
17EntitySpawnReason.LOADZombie.handleAttributes6
18EntitySpawnReason.DIMENSION_TRAVELZombie.handleAttributes1