loot_chest_trigger
Loot Chest Trigger — misc entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | loot_chest_trigger |
| Type | Misc |
| Color | — |
| Icon | #FFD700 |
Description
Tracks triggered loot chests across sessions. Separate from [LootChestTriggerEntry] to avoid stateful entry validation. / object LootChestTriggerService { private val triggeredChests = ConcurrentHashMap.newKeySet<String>() fun isTriggered(entryId: String): Boolean = entryId in triggeredChests fun markTriggered(entryId: String) { triggeredChests.add(entryId) } fun resetChestTrigger(entryId: String) { triggeredChests.remove(entryId) } fun resetAllTriggers() { triggeredChests.clear() } } private val log = org.slf4j.LoggerFactory.getLogger("LootChestTrigger") /** 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.
Fields
| Field | Type | Description |
|---|---|---|
chestEntry | Ref<DungeonLootChestEntry> | The DungeonLootChestEntry to trigger on execution. |
triggerMode | TriggerMode | TRIGGER_MODE for this chest: - ONCE: Spawns once per session (default). Subsequent triggers are ignored. - REPEATABLE: Can be triggered multiple times. - CONDITIONAL: Only triggers if [triggerCriteria] are met. |
triggerCriteria | List<Criteria> | Criteria checked when triggerMode is CONDITIONAL. All must pass. |
triggerSound | String | Sound played when the chest is triggered (e.g., ENTITY_ENDERMAN_TELEPORT). Leave empty for no sound. |
triggerDelay | Int | Delay in ticks before the chest appears after triggering (0 = instant). |
triggerParticle | String | Particle effect shown at the chest location when triggered. Leave empty for none. |
broadcastMessage | String | Broadcast a message to the instance world when this chest is triggered. |
Usage Example
- entry: loot_chest_trigger
name: "Loot Chest Trigger"
chestEntry: ""
triggerMode: ""
triggerCriteria: []
triggerSound: ""
triggerDelay: 0
triggerParticle: ""
broadcastMessage: ""