Pular para o conteúdo principal

Loot Chest Trigger

Action entry that manually triggers a specific loot chest at runtime. Used in combination with DungeonLootChestEntry when manualMode: true.

Trigger Modes

ModeBehavior
ONCEChest spawns once per session. Subsequent triggers are ignored (default).
REPEATABLEChest can be triggered multiple times.
CONDITIONALChest only triggers if triggerCriteria are met (evaluated per activation).

Configuration

loot_chest_triggerMap

Configuration for the loot chest trigger action.

Properties

chestEntry

"> The loot chest entry to activate. Must have manualMode: true. triggerModeEnum

ONCE, REPEATABLE, or CONDITIONAL. triggerCriteria

"> Criteria checked when triggerMode is CONDITIONAL. All must pass. triggerSoundString

Sound played when the chest is triggered (e.g., ENTITY_ENDERMAN_TELEPORT). Empty = no sound. triggerDelayInt

Delay in ticks before the chest appears after triggering. triggerParticleString

Particle effect shown at the chest location when triggered (e.g., PORTAL). Empty = none. broadcastMessageString

Message broadcast to all online players when this chest is triggered. Supports {player} and {chest}.

Example

# The chest definition (manualMode = true)
dungeon_loot_chest:
id: "secret_treasure"
dungeonInstance: "ancient_temple"
location: {x: 50, y: 70, z: 30, world: "dungeon_temple"}
manualMode: true
lootTable:
- item: NETHERITE_INGOT
dropChance: 50

# The trigger — fired when boss dies (via onEnd/onEnter triggers)
action:
type: loot_chest_trigger
id: "boss_treasure_trigger"
chestEntry: "secret_treasure"
triggerMode: ONCE
triggerSound: "ENTITY_ENDERMAN_TELEPORT"
triggerParticle: "PORTAL"
broadcastMessage: "<gold>{player} unlocked the secret treasure!"