dungeon_loot_chest
Dungeon Loot Chest — misc entry.
Entry Information
| Property | Value |
|---|---|
| Entry ID | dungeon_loot_chest |
| Type | Misc |
| Color | — |
| Icon | #FFD700 |
Description
Represents a single loot item with drop chance and quantity range. / data class LootItem( @Help("The item to drop") val item: Item = SerializedItem(ItemStack(Material.DIAMOND)), @Help("Chance to appear in the chest (0-100%)") val dropChance: Double = 50.0, @Help("Minimum quantity") val minAmount: Int = 1, @Help("Maximum quantity") val maxAmount: Int = 1, @Help("Specific slot in the chest (0-26), or -1 for random slot") val slot: Int = -1 ) /** Valid vanilla storage materials that can be used for loot chests. / private val VALID_STORAGE_MATERIALS = setOf( Material.CHEST, Material.TRAPPED_CHEST, Material.BARREL, Material.SHULKER_BOX, Material.DISPENSER, Material.DROPPER, Material.HOPPER ) /** Determines how a dungeon loot chest is triggered. / enum class ChestPlacementType { /* A real or virtual block is placed at [DungeonLootChestEntry.location]. / BLOCK, /* No block is placed. Instead, any entity (from Entity, BetterModel, ModelEngine, MythicMobs NPC extensions…) found within [DungeonChestManager.NPC_CHEST_RADIUS] blocks of [DungeonLootChestEntry.location] will open this chest on right-click. Place the NPC at or very near the configured location in the template world. / NPC, } /** Entry for defining loot chests in dungeon instances. Chests are placed and filled with random loot when the instance world is generated.
Fields
| Field | Type | Description |
|---|---|---|
dungeonInstance | Ref<DungeonInstanceEntry> | The dungeon instance this chest belongs to |
location | WorldLocation | Location of the chest (or NPC anchor point) in the instance world |
placementType | ChestPlacementType | BLOCK: place a block at the location. NPC: intercept right-click on any entity near the location. |
storageItem | Item | Engine Item representing the block (CraftEngine custom blocks supported). BLOCK mode only. |
containerTitle | String | Custom title for the storage container (MiniMessage, leave empty for default) |
lootTable | List<LootItem> | List of possible loot items |
placementDelay | Int | Delay in seconds before placing/registering the chest (allows world loading) |
replaceExisting | Boolean | Replace any existing block at the location (BLOCK mode only) |
clientSide | Boolean | Virtual client-side block only — no server-side container. Ignored in NPC mode. |
interactionMode | DungeonChestManager.ChestInteractionMode | Interaction mode: LOOT (virtual inventory) or ACTIONS (execute triggers) |
onInteract | List<Ref<TriggerableEntry>> | Triggers executed on click (ACTIONS mode only) |
disappearAfterInteract | Boolean | If true, the chest disappears for the player after interaction |
manualMode | Boolean | If true, the chest is NOT auto-placed. Use DungeonActivateChestActionEntry to spawn it on demand. |
Usage Example
- entry: dungeon_loot_chest
name: "Dungeon Loot Chest"
dungeonInstance: ""
location: ""
placementType: ""
storageItem: ""
containerTitle: ""
lootTable: []
placementDelay: 0
replaceExisting: false
clientSide: false
interactionMode: 0
onInteract: []
disappearAfterInteract: false
manualMode: false