> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Cards Mini-Game

> World-space "flip a card" opening mini-game for crates.

The `crate_minigame_cards` entry stages a **world-space opening mini-game**: a grid of face-down cards spawns in front of the player; the card they click flips to reveal their reward, and the others cascade-flip to decoys.

<Note>
  The winning reward is always drawn **server-side before the mini-game starts** — the animation is pure presentation and nothing the player does can change the outcome. The reward is granted exactly once, on the first click.
</Note>

Mini-games are manifest entries tagged `crate_minigame`; a crate references one through its mini-game field, so the whole flow is configured from the editor.

| Field                       | Default | Description                                              |
| :-------------------------- | :------ | :------------------------------------------------------- |
| `cardCount`                 | `8`     | Number of cards displayed (1–54).                        |
| `columns`                   | `4`     | Cards per row.                                           |
| spacing / distance / height | —       | World placement of the card grid in front of the player. |
| `cascadeDelayTicks`         | —       | Delay between decoy flips after the pick.                |
| `closeDelayTicks`           | —       | How long the revealed grid lingers before cleanup.       |
| back item / sounds          | —       | Card-back item and flip/win sounds.                      |

Implementations are Folia-safe: all card entities are spawned and flipped on the player's/entity's own scheduler.
