跳到主要内容

Dungeon Mob Spawn

Dungeon Mob Spawn

Combat mobs of a dungeon room: real vanilla mobs (not Typewriter NPCs), made to appear ONCE per run, the first time a member of the run enters their room, and never again (waves: the dungeon_spawn_mobs action). Where they appear depends on the kind of dungeon. In a generated dungeon they appear at each MOB marker of a room template that points at this entry, and the Room and Positions fields are ignored. In a fixed dungeon they appear at the Positions, when a member enters the Room. The mobs belong to the run: they are removed when it ends, a mob of a run never targets or hurts the players of another run (and the players of another run cannot hurt it), and an entry never makes more than maxAliveMobs of the dungeon alive at once. What a mob splits or turns into (slime, magma cube, drowned zombie) belongs to the run too. By default a mob breaks no block and drops only its equipment: see Block damage, Drop vanilla loot and Drop experience.

字段

字段类型默认值描述
entityTypeEntityTypeZOMBIEThe mob to spawn. Only mobs are accepted (zombie, skeleton, spider, creeper...). Refused, with a warning in the server log: anything that is not a mob, and the bosses that ignore the limits of a dungeon: ENDER_DRAGON and WITHER. Warden and Giant are accepted.
countInt1How many mobs appear at each placement (each marker, or each position).
spreadDouble2.0Radius, in blocks, of the circle around the placement where the mobs beyond the first are scattered (the first one stands on the placement). 0 = all on the placement. The scatter is the same in every run of the same generated dungeon.
nameVisibleBooleantrueWhether the name is shown above the mob all the time (otherwise only when a player looks at it).
equipmentMobEquipment—What the mob wears and holds, with the chance each item drops. An empty slot stays empty.
MobEquipment(6)
字段类型默认值描述
headMobEquipmentSlot—Helmet.
MobEquipmentSlot(2)
字段类型默认值描述
itemItem—The item worn or held in this slot. Empty = nothing is put in the slot.
dropChanceFloat0Chance, from 0 to 1, that the item drops when the mob dies. 0 = never (the default: the loot of a dungeon comes from its chests), 1 = always.
chestMobEquipmentSlot—Chestplate.
MobEquipmentSlot(2)
字段类型默认值描述
itemItem—The item worn or held in this slot. Empty = nothing is put in the slot.
dropChanceFloat0Chance, from 0 to 1, that the item drops when the mob dies. 0 = never (the default: the loot of a dungeon comes from its chests), 1 = always.
legsMobEquipmentSlot—Leggings.
MobEquipmentSlot(2)
字段类型默认值描述
itemItem—The item worn or held in this slot. Empty = nothing is put in the slot.
dropChanceFloat0Chance, from 0 to 1, that the item drops when the mob dies. 0 = never (the default: the loot of a dungeon comes from its chests), 1 = always.
feetMobEquipmentSlot—Boots.
MobEquipmentSlot(2)
字段类型默认值描述
itemItem—The item worn or held in this slot. Empty = nothing is put in the slot.
dropChanceFloat0Chance, from 0 to 1, that the item drops when the mob dies. 0 = never (the default: the loot of a dungeon comes from its chests), 1 = always.
mainHandMobEquipmentSlot—Main hand: the weapon of the mob.
MobEquipmentSlot(2)
字段类型默认值描述
itemItem—The item worn or held in this slot. Empty = nothing is put in the slot.
dropChanceFloat0Chance, from 0 to 1, that the item drops when the mob dies. 0 = never (the default: the loot of a dungeon comes from its chests), 1 = always.
offHandMobEquipmentSlot—Off hand.
MobEquipmentSlot(2)
字段类型默认值描述
itemItem—The item worn or held in this slot. Empty = nothing is put in the slot.
dropChanceFloat0Chance, from 0 to 1, that the item drops when the mob dies. 0 = never (the default: the loot of a dungeon comes from its chests), 1 = always.
attributesList<MobAttributeSpec>emptyAttributes to change on the mob: health, damage, speed... Each one replaces the base value of its type; an attribute the type does not have is skipped.
MobAttributeSpec(2)
字段类型默认值描述
attributeMobAttributeKindMAX_HEALTHThe attribute to set.可选值:MAX_HEALTHMOVEMENT_SPEEDATTACK_DAMAGEATTACK_KNOCKBACKFOLLOW_RANGEKNOCKBACK_RESISTANCEARMORARMOR_TOUGHNESSSCALE
valueDouble20.0Its new base value, replacing the one of the mob type (vanilla values: zombie 20 health, 3 attack damage, 0.23 speed). Maximum health is also the health the mob starts with.
randomizeDataBooleanfalseLet the game add the natural variations of the type: random armor, baby zombies, the size of a slime, the colour of a sheep. Off: every mob is made exactly as set here.
blockDamageBooleanfalseWhether these mobs may change the blocks of the world: creeper and ghast explosions, an enderman carrying a block away, a ravager or a zombie breaking things. Off (the default): nothing is broken, set on fire or moved, but an explosion still hurts the players. Turn it on only in a world the run owns alone (a shared world is not repaired when the run ends).
dropVanillaLootBooleanfalseWhether the mob drops the loot of its type when it dies (rotten flesh, bones, arrows, rare drops...). Off (the default): only the items you put in Equipment drop, each with its own drop chance. Dropped items stay in the world after the run: leave this off in a shared world.
dropExperienceBooleanfalseWhether the mob gives experience orbs when it dies. Off (the default): none.
dungeonInstanceRef<DungeonInstanceEntry>—FIXED dungeons only: only the runs of this dungeon instance make the mobs appear. Empty = every dungeon that uses the room.
roomRef<DungeonRoomEntry>—FIXED dungeons only: the room that makes the mobs appear, the first time a member of the run enters it (once per run, even if the room's enterOnce is off). Empty = no automatic appearance: only the 'Dungeon Spawn Mobs' action makes this entry appear. Generated dungeons use their MOB markers instead.
positionsList<Position>emptyFIXED dungeons only: where the mobs appear, in the template world of the dungeon (the world of the position is ignored: the world of the run is used, shifted into the slot of the run). Also where the 'Dungeon Spawn Mobs' action makes them appear.
deathRecipientsMobDeathRecipientsKILLER_OR_MEMBERSWho the On death triggers and the 'When a dungeon mob dies' event run for.
onDeathList<Ref<TriggerableEntry>>emptyTriggers run each time one of these mobs dies, for the players chosen by Death recipients. Only the mobs this entry made count: what comes out of them (the pieces of a slime that splits, a vex an evoker calls, a baby, reinforcements) belongs to the run and goes with it, but its death runs nothing and raises no 'When a dungeon mob dies' event.
lootTableRef<DungeonLootTableEntry>—A 'Dungeon Loot Table' rolled each time one of these mobs dies: the items it picks are added to the drops of the mob, on top of the vanilla loot and the equipment. The slot of the lines means nothing for a mob. What comes out of a mob (the pieces of a slime that splits...) rolls nothing. Empty = no extra loot.
spawnParticleDungeonParticle—Particles shown at the place of each mob that appears, to the members of the run. Leave the particle empty for none. The centre of the effect is shifted from the feet of the mob (by default 1 block up).
DungeonParticle(9)
字段类型默认值描述
particleString—Name of the particle, for example FLAME, HAPPY_VILLAGER or END_ROD. Empty = no particle. A particle that needs extra data (dust, a block, an item) is refused, and the server log says so once.
countInt30How many particles are shown each time.
offsetXDouble0.5How far, in blocks, the particles spread from the centre along the X axis.
offsetYDouble0.5How far, in blocks, the particles spread from the centre along the Y axis.
offsetZDouble0.5How far, in blocks, the particles spread from the centre along the Z axis.
speedDouble0.1Speed (or extra data) of the particles; what it does depends on the particle.
centerXDouble0.5Shifts the centre of the effect along the X axis, in blocks, from the spot (0.5 = the middle of a block).
centerYDouble0.5Shifts the centre of the effect along the Y axis, in blocks, from the spot (0.5 = the middle of a block).
centerZDouble0.5Shifts the centre of the effect along the Z axis, in blocks, from the spot (0.5 = the middle of a block).
perExtraPlayerInt0Extra mobs at each placement for every player beyond the first: count + this x (players - 1). 0 = the number of mobs does not depend on the players. Players are counted as chosen in Player count source.
maxCountInt0The most mobs one placement makes appear once the players are counted. 0 = no limit of its own (the limit of 50 per placement and the Max alive mobs of the dungeon still apply).
playerCountSourcePlayerCountSourcePRESENT_IN_ROOMWhich players count for Extra mobs per player. PRESENT_IN_ROOM: the members of the run who are in the room when the mobs are triggered (a dungeon or a moment without an identifiable room counts the members of the run instead). RUN_MEMBERS: the members of the run who are online.
maxSimultaneousInt0The most mobs of this site alive at once. 0 = all at once. Above it, the next ones appear as the first ones die.
wavesList<MobWave>emptyWaves, in order. Empty = a single wave made of the Count and Extra mobs per player fields of this entry. With waves, the Count of the entry is not used: each wave has its own. The first wave starts when the mobs are triggered; the 'Dungeon Spawn Mobs' action starts the next wave at once.
MobWave(7)
字段类型默认值描述
countInt1How many mobs appear at each placement in this wave.
perExtraPlayerInt0Extra mobs at each placement for every player beyond the first, in this wave.
entityTypeOptional<EntityType>—The mob of this wave. Empty = the mob of the entry.
startWaveStartAFTER_PREVIOUS_CLEAREDAFTER_PREVIOUS_CLEARED: the wave starts Delay ticks after the previous waves are cleared. AFTER_DELAY: it starts Delay ticks after the previous wave started, cleared or not. For the first wave, the delay counts from the moment the mobs are triggered.
delayTicksInt0Delay, in ticks (20 = one second), before the wave starts. See Start.
onWaveStartList<Ref<TriggerableEntry>>emptyTriggers run, for every online member of the run, when this wave starts.
onWaveClearedList<Ref<TriggerableEntry>>emptyTriggers run, for every online member of the run, when this wave is cleared.
onWaveClearedList<Ref<TriggerableEntry>>emptyTriggers run, for every online member of the run, each time a wave of this entry is cleared (no mob of the site alive, none left to appear).
onClearedList<Ref<TriggerableEntry>>emptyTriggers run, for every online member of the run, once, when every wave of this site has appeared and none of its mobs is alive. What comes out of a mob (the pieces of a slime) is not counted; mobs held back by the limit of living mobs make the site not cleared yet.
TypeWriter 通用字段(displayName)
字段类型默认值描述
displayNameVar<String>—Name shown above the mob. Empty = the default name of its type. Placeholders are read for the player whose entry makes the mob appear.占位符颜色

How to use it​

See Entities in dungeons for when and where mobs appear. Limits: count 1 to 50, spread 0 to 32, at most maxAliveMobs (default 150, 500 at most) alive per run. ENDER_DRAGON and WITHER are refused. deathRecipients is KILLER_OR_MEMBERS by default. blockDamage, dropVanillaLoot and dropExperience are off by default.

Loot, particles, scaling and waves​

These fields change nothing until you set them. The guide Combat mobs explains them together, with a recipe.

FieldWhat to know
lootTableA Dungeon Loot Table rolled for each mob that dies, on top of its equipment and, if dropVanillaLoot is on, the vanilla loot. Each mob rolls on its own and the slot of a line is ignored. A quantity above one stack is cut to one stack. What comes out of a mob (pieces of a slime...) rolls nothing. A missing table is logged and adds no loot.
spawnParticleParticles at each mob that appears, shown to the members of the run in the world. An empty particle means none. By default the centre is one block above the feet (centerY 1.0). Particles that need data (dust, block, item) are refused and logged once.
perExtraPlayer, maxCount, playerCountSourceScaling like a Trial Spawner: count + perExtraPlayer x (players - 1) mobs at each placement, at most maxCount (0 = no ceiling of its own; 50 per placement and maxAliveMobs still apply). PRESENT_IN_ROOM (default) counts the members of the run in the room, at least 1. RUN_MEMBERS counts the online members.
maxSimultaneousThe most mobs of the site alive at once. 0 = all at once. It is not multiplied by the number of placements.
wavesOrdered waves: count, perExtraPlayer, optional entityType, start (AFTER_PREVIOUS_CLEARED or AFTER_DELAY), delayTicks, onWaveStart, onWaveCleared. Empty = one wave made of the fields of the entry. With waves, the count of the entry is not used.
onWaveClearedTriggers run each time a wave of the entry is cleared.
onClearedTriggers run once, when the whole site is cleared.

The wave and cleared triggers run for every online member of the run, once per site and per event, after the death triggers. The event On Dungeon Mobs Cleared is raised after onCleared. The Dungeon Spawn Mobs action of an entry with waves starts its next wave at once.

Reload

Waves are not saved. After a reload, a site that still owed mobs makes them appear in one batch (the count of the entry) the next time a member enters the room, with no event. Waves that had not started are lost.