HOT TNT GAME

A tag-and-run minigame: hit to pass the TNT, explode on zero, survive to win.

15

HOT TNT GAME

HOT TNT Datapack

HOT TNT 数据包

Overview / 简介

HOT TNT is a fast-paced tag-and-run minigame datapack for Minecraft Java Edition. One player holds the TNT; hit someone in melee to pass it on. When the countdown reaches zero, the current holder explodes and is eliminated. Survive to be the last one standing.

爆炸淘汰 是一个快节奏的“你追我赶”小游戏数据包(Java 版)。开局随机指定 爆炸淘汰;持有者用近战命中别人即可把 TNT 传给对方。倒计时归零时,当前持有者爆炸淘汰。活到最后即获胜。

- Bossbar: Launch, with threshold-based colors (green/yellow/red). - Chat broadcasts are unified with the prefix Launch. - Titles: - Game start: Launch (all players) - New round: Launch (all players) - Holder: Launch - Non-holders: Launch - Eliminated player: Launch Launch (self only) - Sound design uses fireworks: - Subtle ticks for ≥6s; intensified beeps at Launch. - Launch sound when TNT is passed or a new round starts. - Explosion blends TNT boom + firework blasts/twinkles.

- Bossbar:Launch,颜色随阈值变更(绿/黄/红)。 - 聊天播报统一使用前缀 Launch。 - 标题: - 开局:Launch(全体) - 新回合:Launch(全体) - 持有者:Launch - 非持有者:Launch - 淘汰者:Launch Launch(仅本人) - 音效采用烟花系设计: - ≥6 秒为轻提示,Launch 进入强化提示。 - TNT 传递与回合开始播放 Launch 音效。 - 爆炸声由 TNT 爆炸与烟花爆裂/闪烁叠加。

Installation / 安装

1. Copy the ZIP into your world: `…/saves/<your world>/datapacks/` 2. Enter the world and run `/reload`. You should see `[HOT TNT] Datapack loaded.` 3. (Optional) Operators can mark locations (see Commands).

1. 将 ZIP 放入你的世界: `…/saves/<你的世界>/datapacks/` 或直接把 ZIP 放进存档的 `datapacks` 文件夹。 2. 进入世界后执行 `/reload`。 你应看到 `[HOT TNT] 数据包已加载。` 3. (可选)OP 可先标记点位(见下方命令)。

> Compatibility: > - Target range: 1.21.10 under current datapack format coverage. > - Works on vanilla and common servers (Paper/Purpur). > > 兼容性: > - 目标范围:1.21.10(按当前数据包格式覆盖)。 > - 可在原版与常见服务端(Paper/Purpur)运行。 > Compatibility note (EN): > - `data/hot_tnt_game/function/core/post_load.mcfunction` keeps both gamerule syntaxes. > - Current default is 1.21.10 syntax: > - `gamerule fall_damage false` > - `gamerule drowning_damage false` > - For Java 1.21.10, comment the two snake_case lines above and uncomment: > - `# gamerule fallDamage false` -> `gamerule fallDamage false` > - `# gamerule drowningDamage false` -> `gamerule drowningDamage false` > - Not backward-compatible with 1.20.x (pack format + singular layout). > > 兼容补充(中文): > - `data/hot_tnt_game/function/core/post_load.mcfunction` 同时保留了两套 gamerule 写法。 > - 当前默认启用的是 1.21.10语法: > - `gamerule fall_damage false` > - `gamerule drowning_damage false` > - 若使用 Java 1.21.10,请注释上面两条 snake_case 并取消注释: > - `# gamerule fallDamage false` -> `gamerule fallDamage false` > - `# gamerule drowningDamage false` -> `gamerule drowningDamage false` > - 不兼容 1.20.x(pack format 与单数目录规范限制)。

Datapack Layout / 目录规范

- This pack uses the 1.21+ singular layout: - `data/<namespace>/function/` - `data/<namespace>/advancement/` - `data/minecraft/tags/function/` - 本包使用 1.21+ 单数目录规范: - `data/<命名空间>/function/` - `data/<命名空间>/advancement/` - `data/minecraft/tags/function/`

How to Play / 玩法

1. Admin starts the game → players gather at the game over area. 2. Round 1 begins: a game over is chosen, bossbar shows the timer. 3. The holder can game over to pass the TNT (short cooldown on both players). 4. When the timer hits 0: current holder game over and becomes game over. 5. If ≥2 players remain: game over starts; otherwise: game over.

1. 管理员开启游戏 → 玩家在结算集合。 2. 第 1 回合开始:随机指定 结算,Bossbar 开始倒计时。 3. 持有者结算即可传递 TNT(双方有短冷却)。 4. 计时归零:当前持有者结算并进入结算。 5. 若仍有 ≥2 人:进入结算;否则:结算

Admin Commands / 管理命令

All commands require operator permission.

```mcfunction /function hot_tnt_game:admin/start # Start the minigame /function hot_tnt_game:admin/reset # Reset to pre-game state /function hot_tnt_game:config/mark_prepare # Mark current position as prepare area /function hot_tnt_game:config/mark_arena # Mark current position as arena /function hot_tnt_game:config/mark_lobby # Mark current position as lobby /function hot_tnt_game:core/next_round # (Debug) force next round ```

以下命令需 OP 权限。

```mcfunction /function hot_tnt_game:admin/start # 开始游戏 /function hot_tnt_game:admin/reset # 重置至开局前 /function hot_tnt_game:config/mark_prepare # 标记准备点 /function hot_tnt_game:config/mark_arena # 标记战斗点 /function hot_tnt_game:config/mark_lobby # 标记大厅 /function hot_tnt_game:core/next_round # (调试)下一回合 ```

Configuration / 配置

Adjust these score values via `/scoreboard`:

- SFX intensity `scoreboard players set #BTime hot_cfg <seconds>` e.g. `... set #BTime hot_cfg 30` - SFX intensity `#SFX hot_cfg` - `2` = High (default) - `1` = Medium - `0` = Low ``` scoreboard players set #SFX hot_cfg 1 ``` 通过 `/scoreboard` 修改以下配置分数:

- 音效强度 `scoreboard players set #BTime hot_cfg <seconds>` 例如:`... set #BTime hot_cfg 30` - 音效强度 `#SFX hot_cfg` - `2` = 高(默认) - `1` = 中 - `0` = 低 ``` scoreboard players set #SFX hot_cfg 1 ```

Scoreboards (internal) / 计分板(内部)

You generally don’t need to touch these, but they help diagnostics.

| Objective | Meaning | | ----------- | -------------------------------------------------------- | | `hot_state` | phase flag (`#Phase`) | | `hot_round` | round number (`#Round`) | | `hot_timer` | time left (`#Timer`) | | `hot_tick` | 20-tick heartbeat (`#Tick20`) | | `hot_gate` | one-shot gate | | `hot_cd` | pass cooldown | | `hot_cfg` | config holder (`#BTime`,`#SFX`,`#MProtect`,`#MHolderFX`) | | `hot_cnt` | counters (e.g., alive count) |

Tags (partial): `Alive`, `TNT_Holder`, `HOT_WIN`, `HitVictim`, `hot_holder_line`.

通常无需改动,排障时可查看。

| 计分项 | 含义 | | ----------- | --------------------------------------------------- | | `hot_state` | 准备/战斗阶段(`#Phase`) | | `hot_round` | 回合计数(`#Round`) | | `hot_timer` | 回合剩余秒数(`#Timer`) | | `hot_tick` | 每秒节拍(`#Tick20`) | | `hot_gate` | 单向闸门 | | `hot_cd` | 传递冷却 | | `hot_cfg` | 配置寄存(`#BTime`,`#SFX`,`#MProtect`,`#MHolderFX`) | | `hot_cnt` | 计数器(例如存活人数) |

标签(部分):`Alive`, `TNT_Holder`, `HOT_WIN`, `HitVictim`, `hot_holder_line`(用于侧栏“持有者:”行的队伍前缀,仅侧栏显示,聊天已做去前缀处理)。

Visuals & Audio / 视觉与音频

- Sounds: title is Sounds; style `notched_10`; color changes by time thresholds (≥6 green, 3–5 yellow, ≤2 red). - Sounds: sent only to players with `Alive` tag; eliminated players no longer receive routine titles. - Sounds: fireworks `blast` as tick, stronger at 5/4/3/2/1; `launch` on pass and round start; explosion adds layered fireworks.

- 音效:标题 音效,`notched_10` 样式;颜色随时间阈值变化。 - 音效:仅对 `Alive` 玩家显示;被淘汰者不再收到常规标题。 - 音效:烟花 `blast` 作为节拍,5/4/3/2/1 更强;传递与回合开局播放 `launch`;爆炸叠加烟花声场。

Troubleshooting / 故障排查

- Datapack not loading? - Check path: `world/datapacks/Hot_TNT_…zip` (or extracted folder). - Verify: run `/datapack list` and `/reload`, then confirm the load message appears. - Advancement triggers not firing (no pass on hit)? - Ensure folder name is resets - Countdown stalls after one second? - Confirm `core/battle_second.mcfunction` resets `#Tick20 hot_tick` to `0` every second. - Chat shows holder prefix inside messages? - We temporarily `team leave` the holder before `tellraw` and re-join via `ui/update_sidebar`. Make sure those lines exist. - TNT can be placed? - Confirm your anti-place advancement & function are present and enabled(This feature is deprecated).

- 数据包未加载? - 路径是否正确;`/datapack list`、`/reload` 应出现 `[HOT TNT] 数据包已加载。` - 近战传递无效? - 确认部署文件夹名字为 `datapacks/` - 倒计时走 1 秒就停? - 检查 `battle_second` 是否每秒把 `#Tick20` 设回 `0`。 - 聊天里出现“持有者:名字”? - 确认在 `tellraw` 前后有 `team leave/join hot_holder_line`。 - 仍能放置 TNT? - 检查防放置进度与函数是否启用(该功能已弃用)。

Changelog (v1.03d) / 版本更新(v1.03d)

- v1.0 changelog (Internal) - Basic functions are implemented. - v1.01 changelog (Internal) - Added the configuration of lobby '【大厅】' preparation points'【准备点】' and battle points'【战斗点】'. - Unified chat style with `[HOT TNT]` prefix and consistent colors. - Bossbar retitled to bold red; threshold colors; notched style. - Round start & game start titles; per-role subtitles (holder / non-holder). - v1.02 changelog (Internal) - Eliminated player gets bold red “You exploded!” self-title; spectators no longer receive routine titles. - Fireworks-based audio cues (ticks, launch, layered explosion). - v1.03a/b/c beta changelog (Internal) - First-round starter broadcast stabilized. - v1.03d changelog (Internal) - Built-in explosion-proof modules have been deployed to prevent players from destroying the world.

- v1.0 版本更新(内部版本) - 基本功能已实现。 - v1.01 版本更新(内部版本) - 新增【大厅】、【准备点】和【战斗点】的配置。 - 统一聊天样式 `[HOT TNT]` 与配色。 - Bossbar 改名为 红色加粗,阈值变色,齿状样式。 - 首回合与后续回合开局标题;按角色显示副标题。 - v1.02 版本更新(内部版本) - 淘汰者获得红色加粗“你爆炸了!”自标题;旁观者不再接收常规标题。 - 烟花系音效提示(节拍、发射、分层爆炸)。 - v1.03a/b/c beta 版本更新(内部版本) - 首回合首发播报更稳。 - v1.03d/e 版本更新(v1.03d 为内部版本) - 内置防爆模块已部署,防止玩家毁坏地图。

License & Credits / 许可与鸣谢

- Author: Codex & Codex. - You are free to host it on servers, record videos, and tweak configs; please keep the prefix style if redistributing.

- 作者:CodexCodex。 - 允许在服务器使用、录制视频、按需改动配置;若再分发,请保留统一前缀样式。

---

Admin quick sheet - Start: `/function hot_tnt_game:admin/start` - Reset: `/function hot_tnt_game:admin/reset` - Round time: `/scoreboard players set #BTime hot_cfg 30` - SFX level: `/scoreboard players set #SFX hot_cfg 1`

管理速查 - 开始:`/function hot_tnt_game:admin/start` - 重置:`/function hot_tnt_game:admin/reset` - 回合时长:`/scoreboard players set #BTime hot_cfg 30` - 音效档位:`/scoreboard players set #SFX hot_cfg 1`

ADS