跳到主要内容

Dungeon Loot Chest

Entry for defining loot chests in dungeon instances. Chests are placed and filled with random loot when the instance world is generated. Supports BLOCK mode (real server-side containers or virtual client-side blocks) and NPC mode (right-click any entity near the location to open the chest).

Configuration

dungeon_loot_chestMap

Configuration for the dungeon loot chest.

Properties

dungeonInstance

"> The dungeon instance this chest belongs to. locationWorldLocation

Location of the chest (or NPC anchor point) in the instance world. Supports World Location content editor. placementTypeEnum

BLOCK: place a block at the location. NPC: intercept right-click on any entity within 3 blocks of the location. storageItemItem

Engine Item representing the block (supports CraftEngine custom blocks). BLOCK mode only. containerTitleString

Custom title for the storage container (MiniMessage format). lootTable

"> List of possible loot items.

LootItem

item

The item to drop. dropChanceDouble

Chance to appear (0-100%). minAmountInt

Minimum quantity. maxAmountInt

Maximum quantity. slotInt

Specific slot (0-26) or -1 for random.

placementDelayInt

Delay in seconds before placing/registering the chest after world load. replaceExistingBoolean

Whether to replace any existing block at the location. BLOCK mode only. clientSideBoolean

If true, the chest is client-side only (virtual block, no server container). BLOCK mode only. interactionModeEnum

LOOT: open a virtual inventory with loot. ACTIONS: execute onInteract triggers instead. onInteract

"> Triggers executed when clicked (only for ACTIONS interaction mode). disappearAfterInteractBoolean

If true, the virtual chest disappears for the player after interaction. manualModeBoolean

When enabled, the chest is NOT auto-placed during world generation. Use loot_chest_trigger to activate it manually.

NPC Mode

When placementType: NPC, no block is placed. Instead, any entity within 3 blocks of the configured location will open this chest when right-clicked. This is ideal for:

  • Reward NPCs that double as chests
  • Boss corpses that drop loot
  • Hidden chests disguised as decorative entities

Manual Mode

When manualMode: true, the chest is not auto-placed. Use a loot_chest_trigger action to activate it at runtime. Useful for:

  • Reward rooms unlocked after defeating a boss
  • Secret chests revealed by puzzles
  • Conditional loot drops

See Loot Chest Trigger for the trigger action.

Example

dungeon_loot_chest:
id: "boss_reward_chest"
name: "Boss Reward"
dungeonInstance: "ancient_temple"
location:
x: 15
y: 65
z: 15
world: "dungeon_template"
placementType: BLOCK
storageItem: CHEST
containerTitle: "<gold>Boss Rewards</gold>"
lootTable:
- item: DIAMOND_SWORD
dropChance: 80
minAmount: 1
maxAmount: 1
slot: 13
- item: GOLDEN_APPLE
dropChance: 50
minAmount: 1
maxAmount: 3