生命窃取
Life Steal FR 是一个简单的数据包,旨在配置并还原原版 Lifesteal SMP 中的生命窃取行为:
此数据包为重生信标添加了纹理,并使用 1.21 的食物/消耗品组件来与系统交互(食用一颗心、食用一个重命名过的重生信标)。
此数据包将 ? 始终 ? 更新以支持最新的 Minecraft 版本!
我会持续维护与新版本的兼容性,确保你无需等待即可在最新的 Minecraft 更新甚至快照中体验 Life Steal 机制。
如果使用数据包版本,请别忘了下载所需的 资源包
⚠️ 重要:需要服务器设置
本项目需要特殊权限才能执行封禁玩家操作!
如果你正在运行服务器,你必须编辑 server.properties 文件并设置:
function-permission-level=3
如果没有此设置,封禁功能将无法工作! 这是用户遇到的最常见问题。
修改后,请重启服务器以使更改生效。
如果你想修改配方,请阅读此 GitHub Issue:
⚙️ 配置
玩家可以通过输入 /trigger life_steal.withdraw 来提取心之碎片。
自 1.5.0 版本起,你现在可以通过运行以下命令交互式地查看和修改所有设置:
/function life_steal:_config
这将显示一个交互式菜单,你可以点击任何设置项直接进行修改!
默认设置:
- ? 复活玩家将以 4 颗心的状态重生
- ⬆️ 最大心数上限设置为 20 颗心
- ? 通过食用获得的最大心数设置为 20 颗心(如果低于最大心数,额外的心只能通过击杀获得)
- ⬇️ 最小心数下限设置为 0 颗心
- ? 玩家因自然原因死亡时失去一颗心(已启用)
- ? 玩家因自然原因死亡时,在心掉落位置掉落心之碎片(已启用)
- ➗ 半心模式已禁用(心数以整数形式追踪)
- ? 当达到最小心数时玩家将被封禁
- ? “ spectator 模式替代封禁”已禁用(玩家将被封禁,而非进入旁观者模式)
- ? “最后机会”功能已禁用(启用后,如果玩家在 MIN+1 颗心时死亡,他们将存活并保持 MIN+0.5 颗心;仅在半心模式禁用时有效)
- ⚔️ 击杀窃取已启用(击杀玩家会奖励心并从受害者处移除)
- ⚡ 即时消耗心已禁用(食用心需要完整的进食动画)
- ? 无掉落已禁用(心会正常掉落并可被窃取)
- ♾️ 心永不消失已启用(掉落的心之物品会不断重置其年龄以防止消失)
或者,你可以使用以下命令手动自定义设置(需要操作员权限):
- ⬆️
scoreboard players set MAX_HEARTS life_steal.data 20(绝对最大心数为 20 颗) - ?
scoreboard players set MAX_HEARTS_BY_CONSUMING life_steal.data 20(通过食用制作的心所能获得的最大心数,额外的心只能通过击杀获得(如果低于 MAX_HEARTS),默认为 20) - ⬇️
scoreboard players set MIN_HEARTS life_steal.data 0(玩家最少可拥有的心数,默认为 0) - ?
scoreboard players set REVIVED_HEARTS life_steal.data 4(复活时恢复的心数) - ?
scoreboard players set NATURAL_DEATH_HEART_LOSE life_steal.data 1(1 = 死于非玩家攻击时失去一颗心,0 = 禁用该效果) - ?
scoreboard players set NATURAL_DEATH_HEART_DROP life_steal.data 1(1 = 死于非玩家攻击时在心掉落位置掉落一颗心,0 = 禁用该效果) - ➗
scoreboard players set USE_HALF_HEARTS life_steal.data 1(1 = 启用半心模式,0 = 禁用 - 以 0.5 为增量追踪心数,而非整数) - ?
scoreboard players set BAN_REACHING_MIN_HEARTS life_steal.data 1(1 = 当达到最小心数时封禁玩家,0 = 仅阻止其心数进一步降低) - ?
scoreboard players set SPECTATOR_INSTEAD life_steal.data 1(1 = 当达到最小心数时将玩家移至旁观者模式而非封禁,0 = 正常封禁玩家) - ?
scoreboard players set LAST_CHANCE life_steal.data 1(1 = 当在 MIN+1 颗心时死亡,玩家将以 MIN+0.5 颗心存活而非失去所有心 - 仅在半心模式禁用时有效,0 = 玩家正常失去整颗心) - ⚔️
scoreboard players set STEAL_ON_KILL life_steal.data 1(1 = 击杀玩家会奖励心并从受害者处移除,0 = 禁用击杀时的偷心效果) - ⚡
scoreboard players set INSTANTLY_CONSUME_HEARTS life_steal.data 1(1 = 使用时心会被立即消耗,0 = 需要完整的进食动画) - ?
scoreboard players set NO_HEART_DROP_OR_STEAL life_steal.data 1(1 = 玩家死亡时心不会掉落或被盗取,覆盖 STEAL_ON_KILL 以防止所有死亡时的心窃取/掉落,0 = 心会正常掉落并可被窃取) - ♾️
scoreboard players set HEARTS_NEVER_DESPAWN life_steal.data 1(1 = 掉落的心之物品永远不会消失,通过不断重置其年龄实现,0 = 掉落的心之物品会自然消失)
你可以使用以下命令获取物品:
/function life_steal:_give_all(给予数据包中的所有物品)/loot give @s loot life_steal:i/heart(给予一颗心)/loot give @s loot life_steal:i/revive_beacon(给予一个重生信标)
⚠️ 管理
如果你想手动复活一名玩家,可以使用以下命令:?
function life_steal:player/revive {player:"Stoupy51"}
(将 Stoupy51 替换为你想要复活的玩家名称)
❤️ 设置玩家的心数
function life_steal:player/set_hearts {player:"Stoupy51",hearts:10}
为任意玩家设置生命值(以红心数量计)并立即更新其血条。 它也适用于已断开的玩家:新的数值会被存储,并在他们下次登录时修复血条。
- 该数值为完整的心数。在半心模式下,内部会将其翻倍,与
REVIVED_HEARTS设置完全一致。 - 该数值会在配置的
MIN_HEARTS(不得低于 1 点血量)和MAX_HEARTS之间进行限制,当发生这种情况时会有一条提示信息告知你。 - 它不会解除封禁:请使用复活功能来实现此目的。
如果你手动更改了 life_steal.hearts 分数(例如使用 /scoreboard players set Stoupy51 life_steal.hearts 7,这是设置半心的唯一方式),则需刷新血条:
function life_steal:player/refresh_health {player:"Stoupy51"}
(如果玩家在线则立即更新其血条,否则在其下次登录时更新)
? 调试:“我无法复活一个被封禁的玩家!”
以管理员身份运行以下命令,它们能精确告诉你问题出在哪里(⚠️ 名称区分大小写):
/function life_steal:_debug (数据模组是否允许封禁/解封?是谁执行了移除操作?)
/function life_steal:_debug/player {player:"Stoupy51"} (单个玩家的状态 + 可点击的修复选项)
最常见的原因:
- ❌
/ban 和 /pardon:不可用→ 在server.properties中设置function-permission-level=3并重启服务器,或者启用“旁观者模式代替封禁”选项(这些命令在单人游戏/LAN 中不存在)。 - ❌
被 LifeSteal 封禁:否→ 封禁来自其他来源(手动/ban、插件、名字拼写错误、账号重命名)。请先使用/pardon Stoupy51,然后使用/function life_steal:player/force_revive {player:"Stoupy51"},无论当前状态如何,这都会解除封禁并恢复红心。 - ❌ 复活信标必须在铁砧中重命名为完全相同的用户名。
? 下载链接:
- Modrinth:
- PlanetMinecraft:

| Beacon Recipe image | Heart Recipe image |
|---|---|
![]() |
Life Steal
Life Steal FR is a simple datapack configurable aiming to add life steal behaviours from the original Lifesteal SMP:
This datapack adds texture for the revive beacon and use 1.21 food/consumable components for interactions with the system (eating a heart, consuming a renamed revive beacon)
This datapack is and will ? ALWAYS ? be updated to support the latest Minecraft versions!
I continuously maintain compatibility with new releases, ensuring you can enjoy Life Steal mechanics on the newest Minecraft updates without waiting, even on snapshots.
DON'T FORGET TO DOWNLOAD THE REQUIRED RESOURCE PACK IF YOU ARE USING THE DATAPACK VERSION
⚠️ IMPORTANT: Server Setup Required
This project requires special permissions to ban players!
If you're running a server, you MUST edit your server.properties file and set:
function-permission-level=3
Without this setting, the ban feature will not work! This is the most common issue users encounter.
After making this change, restart your server for it to take effect.
If you want to modify the recipes, please read this GitHub issue:
⚙️ Configuration
Players can withdraw hearts by typing /trigger life_steal.withdraw.
Since 1.5.0, you can now view and modify all settings interactively by running:
/function life_steal:_config
This displays an interactive menu where you can click on any setting to modify it directly!
Default settings:
- ? Revived players respawn with 4 hearts
- ⬆️ Maximum heart limit is set to 20 hearts
- ? Maximum hearts by consuming is set to 20 hearts (if lower than maximum hearts, additional hearts only obtainable through kills)
- ⬇️ Minimum heart limit is set to 0 hearts
- ? Players lose a heart when dying from natural causes (enabled)
- ? Hearts drop at death location when dying from natural causes (enabled)
- ➗ Half hearts mode is disabled (hearts are tracked in whole numbers)
- ? Players are banned when reaching the minimum heart limit
- ? Spectator instead of ban is disabled (players are banned, not moved to spectator mode)
- ? Last chance is disabled (when enabled, if a player at MIN+1 hearts dies, they survive with MIN+0.5 hearts; only works with half hearts mode disabled)
- ⚔️ Steal on kill is enabled (killing players rewards hearts and removes them from victims)
- ⚡ Instantly consume hearts is disabled (hearts require full eating animation)
- ? No heart drop is disabled (hearts drop and can be stolen normally)
- ♾️ Hearts never despawn is enabled (dropped heart items keep their age reset to prevent despawn)
Alternatively, settings can be customized manually using the following commands (requires operator permissions):
- ⬆️
scoreboard players set MAX_HEARTS life_steal.data 20(Absolute maximum of 20 hearts) - ?
scoreboard players set MAX_HEARTS_BY_CONSUMING life_steal.data 20(Maximum hearts obtainable by consuming crafted hearts, additional hearts can only be gained through kills (if lower than MAX_HEARTS), default is 20) - ⬇️
scoreboard players set MIN_HEARTS life_steal.data 0(Minimum number of hearts a player can have, default is 0) - ?
scoreboard players set REVIVED_HEARTS life_steal.data 4(Amount of hearts to respawn with when revived) - ?
scoreboard players set NATURAL_DEATH_HEART_LOSE life_steal.data 1(1 = lose a heart when dying to non player, 0 = disable that) - ?
scoreboard players set NATURAL_DEATH_HEART_DROP life_steal.data 1(1 = drop a heart at death location when dying to non player, 0 = disable that) - ➗
scoreboard players set USE_HALF_HEARTS life_steal.data 1(1 = enable half hearts mode, 0 = disable - tracks hearts in 0.5 increments instead of whole numbers) - ?
scoreboard players set BAN_REACHING_MIN_HEARTS life_steal.data 1(1 = ban player when reaching minimum hearts, 0 = just prevent them from going lower) - ?
scoreboard players set SPECTATOR_INSTEAD life_steal.data 1(1 = move players to spectator mode instead of banning them when reaching minimum hearts, 0 = ban players normally) - ?
scoreboard players set LAST_CHANCE life_steal.data 1(1 = when dying at MIN+1 hearts, player survives with MIN+0.5 hearts instead of losing everything - only works when half hearts mode is disabled, 0 = players lose full hearts normally) - ⚔️
scoreboard players set STEAL_ON_KILL life_steal.data 1(1 = killing players rewards hearts and removes them from victims, 0 = disable heart stealing on kill) - ⚡
scoreboard players set INSTANTLY_CONSUME_HEARTS life_steal.data 1(1 = hearts are consumed instantly when used, 0 = require full eating animation) - ?
scoreboard players set NO_HEART_DROP_OR_STEAL life_steal.data 1(1 = hearts won't drop or be stolen when players die, overrides STEAL_ON_KILL by preventing all heart steal/drop on death, 0 = hearts drop and can be stolen normally) - ♾️
scoreboard players set HEARTS_NEVER_DESPAWN life_steal.data 1(1 = dropped heart items never despawn by constantly resetting their age, 0 = dropped heart items despawn naturally)
You can obtain the items using these commands:
/function life_steal:_give_all(gives all items from the datapack)/loot give @s loot life_steal:i/heart(gives a heart)/loot give @s loot life_steal:i/revive_beacon(gives a revive beacon)
⚠️ Administration
If you want to manually revive a player, you can use the following command: ?
function life_steal:player/revive {player:"Stoupy51"}
(replace Stoupy51 with the player name you want to revive)
❤️ Setting a player's hearts
function life_steal:player/set_hearts {player:"Stoupy51",hearts:10}
Sets the hearts amount of any player and updates their health bar right away. It also works on disconnected players: the new amount is stored and their health bar is fixed on their next login.
- The amount is a whole number of hearts. In half hearts mode it is doubled internally, exactly like the
REVIVED_HEARTSsetting. - It is clamped between the configured
MIN_HEARTS(never below 1 heart score) andMAX_HEARTS, and a message tells you when that happened. - It does not unban a player: use the revive function for that.
If you changed the life_steal.hearts score by hand instead (for example with /scoreboard players set Stoupy51 life_steal.hearts 7, the only way to set half hearts), refresh the health bar with:
function life_steal:player/refresh_health {player:"Stoupy51"}
(updates their health bar now if they are connected, on their next login otherwise)
? Debugging: "I can't revive a banned player!"
Run these as an operator, they tell you exactly where the problem is (⚠️ names are case sensitive):
/function life_steal:_debug (can the datapack ban/unban? who did it remove?)
/function life_steal:_debug/player {player:"Stoupy51"} (state of one player + clickable fix)
Most common causes:
- ❌
/ban and /pardon: NOT AVAILABLE→ setfunction-permission-level=3inserver.propertiesand restart, or enable the "Spectator Instead of Ban" option (those commands don't exist in singleplayer/LAN). - ❌
Banned by LifeSteal: NO→ the ban comes from somewhere else (manual/ban, plugin, misspelled name, renamed account). Use/pardon Stoupy51then/function life_steal:player/force_revive {player:"Stoupy51"}which unbans and restores hearts whatever the state. - ❌ The revive beacon must be renamed to the exact username in an anvil.
? Download links:
- Modrinth:
- PlanetMinecraft:

| Beacon Recipe image | Heart Recipe image |
|---|---|
![]() |
下载 LifeSteal FR
下载 LifeSteal FR
下载 LifeSteal FR
下载 LifeSteal FR
下载 LifeSteal FR
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LifeSteal FR
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LifeSteal FR
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LifeSteal FR
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LifeSteal FR
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 LifeSteal FR
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
让你能够在世界中的任何位置定位结构。
模组
简单的原版生物群系更新,包含有趣的怪物、方块等更多内容!
模组
为你的终界增添新生物群系、神秘仪式和全新生物
模组
TerraFirmaCraft (TFC) 是一个全面转换模组,对生存模式进行了彻底的改造与重新设计。
模组
更多生物群系,更多生物,更多工具,为炽热的维度
模组
Minecraft 中的表情符号

评论 0
登录后参与评分
还没有评论,来抢沙发吧