MonitoringMinecraft MonitoringMinecraft

Death Transfer

Датапак Datapack

A datapack lets you transfer death to other players

14 скачиваний 0 подписчиков
Оцените первым

ENG verson

⚰️ Death Transfer

Upon death, choose a player to take fatal damage in your place.


Overview

When a player dies, instead of immediately losing items or experience, they enter spectator mode and see a list of online players in the chat. You can:

  • Click a number to directly select a player as your "substitute"
  • Click ⏎ Auto Select to let the system pick the nearest player for you
  • Wait 30 seconds for automatic selection of the nearest player

The chosen substitute is instantly killed (items will drop), while the originally deceased player respawns at their death location and receives Water Breathing and Fire Resistance effects.


Features

Feature Description
🎯 Visual selection On death, a tellraw menu shows all online players; click to select
⏎ One‑click auto Click the "Auto Select" button to automatically pick the nearest player
🔢 Numbered selection Each player has a unique number [1] [2] [3]... – click directly
📍 Respawn at location Uses minecraft:armor_stand to mark the death position; teleports you back after selection
⏱ Timeout protection No selection within 30 seconds → automatically picks the nearest player
🔥 Respawn effects Receive 120 seconds of Water Breathing + Fire Resistance after respawn
💎 Substitute drops Temporarily disables keepInventory while killing the substitute to ensure normal item drops
🗺 Sidebar Shows player number sidebar on death; hides automatically after selection
🧹 Auto cleanup All tags, entities, and scheduled tasks are cleaned up automatically after completion
🔄 Reload safety Skips detection on the first tick to prevent accidental triggers from /reload

Use Cases

  • 🎮 Minigame servers – adds interaction and strategy
  • 👥 Multiplayer worlds – introduces risk‑transfer mechanics in PvP or cooperative play
  • 🏆 Hardcore mode – gives players a second chance at the cost of a teammate
  • 🎭 Role‑playing – customises death mechanics for deeper immersion

Installation

  1. Download the data pack.
  2. Place death_transfer.zip into the datapacks/ folder of your world save.
  3. Run /reload in game.
  4. You will see [Death Transfer] Loaded! – installation is successful.

Usage

Action Description
/reload Load / reload the data pack
Normal death Automatically enters the selection flow
Click a player number Select that player as the substitute
Click ⏎ Auto Select Select the nearest online player
Wait 30 seconds Automatic selection

No extra commands are needed – install and play.


Compatibility

Item Requirement
Minecraft 26.2 (pack_format 107)
Mode Works in both singleplayer and multiplayer
Cheats Not required (uses pure functions + trigger tags)
Dependencies None

How It Works

  1. Death detection – Captures the death position using the deathCount scoreboard and DeathTime NBT at the moment of death.
  2. Position marking – Spawns an invisible armour stand (Marker:1b,Invisible:1b,NoGravity:1b) at the death coordinates.
  3. Selection mechanism – Uses /function instead of /trigger, allowing all players to click and interact (no OP required).
  4. Substitute elimination – Temporarily disables keepInventory, kills the substitute, then restores it – ensuring items drop.
  5. Respawn teleport – Teleports the dead player to the armour stand (death location), restores survival mode, and applies potion effects.

File Structure

death_transfer/
├── pack.mcmeta
├── data/
│ ├── minecraft/tags/function/
│ │ ├── load.json
│ │ └── tick.json
│ └── death_transfer/~~~~
│ ├── function/
│ │ ├── load.mcfunction # Initialisation
│ │ ├── tick.mcfunction # Main loop
│ │ ├── on_death.mcfunction # Death handling
│ │ ├── assign_idx.mcfunction # Number assignment
│ │ ├── choose_by_number.mcfunction # Number selection logic
│ │ ├── choose_{1-5}.mcfunction # Number selection entry points
│ │ ├── auto_select_click.mcfunction # Auto select
│ │ └── auto_target.mcfunction # Timeout auto selection
│ └── advancement/
│ └── test.json # Test advancement (no functional effect)

License

MIT License – free to use, modify, and distribute.

中文版本

⚰️ 死亡转移(Death Transfer)

死亡时,选择一名玩家替你承受致命伤害。


概述

当一名玩家死亡时,不会直接失去物品或经验,而是进入旁观模式,并在聊天栏中看到在线玩家列表。你可以:

  • 点击编号直接选择一名玩家作为「替身」
  • 点击 ⏎ 自动选择让系统帮你选最近的玩家
  • 等待 30 秒自动选择最近玩家

被选中的替身会被立即击杀(会掉落物品),而原本死亡的玩家则在死亡地点复活,并获得 水下呼吸火焰抗性 效果。


功能

功能 说明
🎯 可视化选择 死亡后以 tellraw 菜单显示所有在线玩家,点击即可选择
⏎ 一键自动 点击「自动选择」按钮,系统自动选择最近玩家作为替身
🔢 编号选择 每个玩家有独立编号 [1] [2] [3]...,直接点击即可
📍 原地复活 使用 minecraft:armor_stand 标记死亡位置,选择后传送回死亡地点
⏱ 超时保护 30 秒未选择 → 自动选择最近玩家
🔥 复活效果 复活后获得 120 秒水下呼吸 + 火焰抗性
💎 替身掉落 击杀替身时临时关闭保留物品栏,确保替身正常掉落物品
🗺 侧边栏 死亡时显示玩家编号侧边栏,选择后自动隐藏
🧹 自动清理 所有标签、实体、调度任务在完成后自动清理
🔄 重载安全 首次 tick 跳过检测,防止 /reload 误触发

适用场景

  • 🎮 小游戏服务器 — 增加互动和策略性
  • 👥 多人联机 — PVP 或合作中增加了风险转移的玩法
  • 🏆 极限模式 — 给玩家第二次机会,但代价是牺牲队友
  • 🎭 角色扮演 — 自定义死亡机制,增强沉浸感

安装

  1. 下载数据包
  2. death_transfer.zip 放入世界存档的 datapacks/ 文件夹
  3. 进入游戏后执行 /reload
  4. 看到 [死亡转移] 已加载! 提示即安装成功

使用

操作 说明
/reload 加载/重载数据包
正常死亡 自动进入选择流程
点击玩家编号 选择该玩家作为替身
点击 ⏎ 自动选择 选择最近在线玩家
等待 30 秒 自动选择

无需任何额外命令,安装即用。


兼容性

项目 要求
Minecraft 26.2(pack_format 107)
模式 单人 / 多人均可用
作弊 无需开启(使用纯函数 + 触发标记)
依赖

工作原理

  1. 死亡检测:通过 deathCount 计分板 + DeathTime NBT 在死亡瞬间捕获位置
  2. 位置标记:在死亡坐标生成不可见盔甲架(Marker:1b,Invisible:1b,NoGravity:1b
  3. 选择机制:使用 /function 代替 /trigger,所有玩家均可点击交互(无需 OP)
  4. 替身击杀:暂时关闭 keepInventory,击杀替身后再恢复,确保物品掉落
  5. 传送复活:将死亡玩家传送到盔甲架位置(死亡地点),恢复生存模式并给予药水效果

文件结构

death_transfer/
├── pack.mcmeta
├── data/
│   ├── minecraft/tags/function/
│   │   ├── load.json
│   │   └── tick.json
│   └── death_transfer/
│       ├── function/
│       │   ├── load.mcfunction          # 初始化
│       │   ├── tick.mcfunction          # 主循环
│       │   ├── on_death.mcfunction      # 死亡处理
│       │   ├── assign_idx.mcfunction    # 编号分配
│       │   ├── choose_by_number.mcfunction  # 编号选择逻辑
│       │   ├── choose_{1-5}.mcfunction      # 编号选择入口
│       │   ├── auto_select_click.mcfunction # 自动选择
│       │   └── auto_target.mcfunction      # 超时自动选择
│       └── advancement/
│           └── test.json               # 测试用进度(无实际作用)

许可

MIT License — 可自由使用、修改、分发。

Смотри также

Похожие подборки датапаки — по версиям Майнкрафта, загрузчикам и жанрам.

Сервера Майнкрафт

Играть интереснее на сервере — выбирай в рейтинге серверов Майнкрафт и заходи прямо сейчас.

SkyBars
SkyBars Java + BE
1890 онлайн
1.8 — 26.2 версия
🎮 ВЫЖИВАНИЕ ⚔️ АНАРХИЯ 🚗 ГТА РП 🎤 ГОЛОСОВОЙ ЧАТ 🎁 БЕСПЛАТНЫЙ ДОНАТ 🌟 СМП 💻 ПК+ТЕЛЕФОН
MineLandy
MineLandy Java + BE
162 онлайн
1.12.2 — 26.1.2 версия
Ванила и анархия без приватов — полная свобода действий и честное выживание
BULLCRAFT
BULLCRAFT Java + BE
140 онлайн
26.2 версия
Анархия! PvP | Работают поршни и вагонетки
beesmp
beesmp Java
0 онлайн
26.2 — 1.21.11 версия
Bee smp-улей,где каждый оставляет свой след
MineLauncher
Лаунчер Майнкрафт без лицензии — все версии
Бесплатный лаунчер для ПК и Андроид — все версии 26.2, 1.21.11, 26.1.2, 1.16.5. Fabric, NeoForge, Forge, шейдеры, моды и скины в один клик.
Без лицензии Fabric, NeoForge, Forge Моды, шейдеры, скины Все версии Майнкрафта ПК и Андроид Для слабых ПК Сервера в лаунчере
Скачать бесплатно
Windows и Андроид · Бесплатно · Без лицензии
Наш чат