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.2 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 other 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 · 11 of them tested somewhere · 20 test sites

#reasonwhat it gatesclasses that pass it
0EntitySpawnReason.NATURALZombieHorse.finalizeSpawn; Drowned.finalizeSpawn; Husk.finalizeSpawn; Raider.finalizeSpawn4
1EntitySpawnReason.CHUNK_GENERATIONnothing tests it2
2EntitySpawnReason.SPAWNERnothing tests it3
3EntitySpawnReason.STRUCTUREPatrollingMonster.finalizeSpawn; Piglin.finalizeSpawn; Drowned.finalizeSpawn; Villager.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 it3
13EntitySpawnReason.COMMANDnothing tests it2
14EntitySpawnReason.DISPENSERnothing tests it5
15EntitySpawnReason.PATROLPatrollingMonster.finalizeSpawn1
16EntitySpawnReason.TRIAL_SPAWNERnothing tests it3
17EntitySpawnReason.LOADZombie.handleAttributes6
18EntitySpawnReason.DIMENSION_TRAVELZombie.handleAttributes1