Saltar al contenido principal

loot_chest_trigger

Loot Chest Trigger — misc entry.

Entry Information

PropertyValue
Entry IDloot_chest_trigger
TypeMisc
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

FieldTypeDescription
chestEntryRef<DungeonLootChestEntry>The DungeonLootChestEntry to trigger on execution.
triggerModeTriggerModeTRIGGER_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.
triggerCriteriaList<Criteria>Criteria checked when triggerMode is CONDITIONAL. All must pass.
triggerSoundStringSound played when the chest is triggered (e.g., ENTITY_ENDERMAN_TELEPORT). Leave empty for no sound.
triggerDelayIntDelay in ticks before the chest appears after triggering (0 = instant).
triggerParticleStringParticle effect shown at the chest location when triggered. Leave empty for none.
broadcastMessageStringBroadcast 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: ""