Saltar al contenido principal

Loot Chest Trigger

Loot Chest Trigger

Action entry that manually triggers a specific loot chest on demand. Use this in combination with a [DungeonLootChestEntry] that has [DungeonLootChestEntry.manualMode] set to true. When this action is executed (e.g., via command, trigger, or another entry), it spawns the configured loot chest at its defined location, in the world of the player's run.

Campos

CampoTipoPredeterminadoDescripción
chestEntryRef<DungeonLootChestEntry>—The DungeonLootChestEntry to trigger on execution.
triggerModeTriggerModeONCEHow often this trigger may place its chest. ONCE (the default): once per run, the other firings of the same run are ignored and the next run starts clean. REPEATABLE: every time it fires. CONDITIONAL: only when the Trigger criteria are met.
triggerCriteriaList<Criteria>emptyCriteria checked when triggerMode is CONDITIONAL. All must pass.
triggerSoundString—Sound played to the players of the run when the chest appears (e.g., ENTITY_ENDERMAN_TELEPORT). Leave empty for no sound.
triggerSoundVolumeFloat1.0Volume of the sound, where 1 is the normal volume of a sound.
triggerSoundPitchFloat1.0Pitch of the sound, where 1 is the normal pitch (lower is deeper, higher is shriller).
triggerDelayInt0Delay in ticks before the chest appears after triggering (0 = instant).
particleEffectDungeonParticle—Particle effect shown at each chest, to the players of the run, when it appears. Leave the particle empty for none. When it names a particle it replaces the four legacy particle fields below.
DungeonParticle (9)
CampoTipoPredeterminadoDescripción
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).
triggerParticleString—Legacy, used only when particleEffect.particle is empty: particle effect shown at the chest, to the players of the run, when it appears. Leave empty for none.
triggerParticleCountInt30Legacy, used only when particleEffect.particle is empty: how many particles are shown when the chest appears.
triggerParticleSpreadDouble0.5Legacy, used only when particleEffect.particle is empty: how far, in blocks, the particles spread from the centre of the chest along each axis.
triggerParticleSpeedDouble0.1Legacy, used only when particleEffect.particle is empty: speed (or extra data) of the particles; what it does depends on the particle.
broadcastMessageString—Message sent to the players of the run when the chest appears. {player} is the player who triggered it, {chest} the chest name. Empty = no message.Colores
Campos comunes de TypeWriter (criteria, modifiers, triggers)
CampoTipoPredeterminadoDescripción
criteriaList<Criteria>empty—
modifiersList<Modifier>empty—
triggersList<Ref<TriggerableEntry>>empty—

How to use it​

Places a loot chest on demand. The target Dungeon Loot Chest must have manualMode on, otherwise the player is told the chest is not configured for manual triggering.

FieldWhat to know
triggerModeONCE (default) works once per run: later triggers in the same run are ignored and the next run starts clean. REPEATABLE works every time. CONDITIONAL works when all triggerCriteria match.
triggerCriteriaUsed by CONDITIONAL only.
triggerSoundSound played to the players of the run when the chest appears, for example ENTITY_ENDERMAN_TELEPORT. Empty for none.
triggerSoundVolume, triggerSoundPitchVolume and pitch of that sound. Default 1 and 1 (normal). Minimum 0.
triggerParticleParticle shown at the chest, to the players of the run, when it appears. Empty for none.
triggerParticleCount, triggerParticleSpread, triggerParticleSpeedHow many particles (default 30, minimum 1), how far in blocks they spread from the centre of the chest along each axis (default 0.5), and their speed or extra data (default 0.1; what it does depends on the particle).
broadcastMessageMessage sent to the players of the run when the chest appears. {player} is the player who triggered it and {chest} the chest name. Colour codes are accepted. Empty for no message.
triggerDelayDelay in ticks before the chest appears. 0 is instant.

The chest is placed in the world of the run of the player who triggered it.

Particle effect​

particleEffect replaces the four old particle fields. Set particle (for example FLAME, HAPPY_VILLAGER or END_ROD; empty = none), then count (default 30), offsetX, offsetY and offsetZ (spread on each axis, default 0.5), speed (default 0.1) and centerX, centerY and centerZ (shift of the centre from the position of the chest; 0.5 is the middle of the block). Particles that need data (dust, block, item) are refused and logged once. The effect is shown to the players of the run at each chest of the entry (see additionalLocations of the Dungeon Loot Chest); the sound plays once.

triggerParticle, triggerParticleCount, triggerParticleSpread and triggerParticleSpeed are legacy. They are used only when particleEffect.particle is empty, and the spread then applies to the three axes around the middle of the block. Existing pages keep working unchanged.