LenientDeath (NeoForge 1.21.x, 1.21-1.21.11)
中文文档 / README_CN
Fabric 模组 JackFred2/LenientDeath 的 NeoForge 移植版。
本项目在开发过程中广泛使用了 AI 辅助编程和代码重构,包括但不限于代码生成、调试分析和文档编写。
游戏内命令
所有命令都需要 OP 权限(等级 >= 2)。除非另有说明,set 命令会立即生效并自动保存到当前世界的 serverconfig/lenientdeath-server.toml 中。
设置配置值
/lenientdeath config set <key> <value>
所有可用的键、值类型及描述:
| 键 |
类型 |
默认值 |
描述 |
enabled |
true | false |
true |
死亡保留物品的总开关。关闭时,所有保留规则均失效。 |
byItemTypeEnabled |
true | false |
true |
基于物品类型的保留总开关(护甲、工具、武器等)。 |
deathCoordinates |
true | false |
true |
重生时在聊天栏显示死亡坐标(含维度信息)。 |
itemGlow |
true | false |
true |
私有高亮:仅物品所有者能看到掉落物发光(颜色随剩余存活时间变化)。 |
glowVisibility |
enum |
DEAD_PLAYER_AND_TEAM |
谁可以看到发光效果:DEAD_PLAYER = 仅限所有者,DEAD_PLAYER_AND_TEAM = 所有者 + 队友,EVERYONE = 所有玩家。 |
noTeamIsValidTeam |
true | false |
false |
当 glowVisibility 为 DEAD_PLAYER_AND_TEAM 时:如果死者没有队伍,则向所有无队伍的玩家显示发光效果。 |
itemResilience |
true | false |
false |
使死亡掉落的物品免受所有伤害(火焰、仙人掌、爆炸等)。 |
extendedLifetimeEnabled |
true | false |
false |
是否修改死亡掉落物的存活时间。 |
deathDropItemLifetimeSeconds |
int 0-1800 |
900 |
死亡掉落物的存活秒数(如果 neverDespawn 为 true 则忽略此值)。300=5分钟,900=15分钟。 |
deathDropItemsNeverDespawn |
true | false |
false |
死亡掉落物永不消失。清理命令:/kill @e[type=item,tag=LENIENT_DEATH_INFINITE_LIFETIME] |
voidRecovery |
true | false |
true |
虚空恢复:当物品落入虚空时,自动将其传送至安全位置。 |
hazardRecovery |
true | false |
true |
危险恢复:当物品着火或处于岩浆中时,自动将其传送至安全位置。 |
voidRecoveryDebug |
true | false |
false |
虚空/危险恢复的调试日志。仅在运行时有效;不保存到配置文件;世界重载后重置为 false。 |
voidRecoveryMode |
enum |
DEATH_DROPS_ONLY |
虚空/危险恢复的作用范围(支持 Tab 补全):DEATH_DROPS_ONLY = 仅限死亡掉落物,ALL_DROPS = 所有掉落物,包括手动丢弃的物品。 |
restoreSlots |
true | false |
true |
将保留的物品恢复到其原始的背包槽位(快捷栏、护甲等)。 |
privateHighlightScanIntervalTicks |
int 1-200 |
10 |
私有高亮的扫描间隔(刻;20 刻 = 1 秒)。 |
privateHighlightScanRadius |
float 8.0-256.0 |
96.0 |
私有高亮的扫描半径(方块)。超出此范围的物品不会高亮。 |
privateHighlightMaxScannedEntities |
int 16-4096 |
256 |
每次扫描处理的最大物品实体数量;用于限制服务器开销。 |
voidRecoveryWindowTicks |
int 1-1200 |
10 |
恢复功能的速率限制窗口长度(刻)。 |
voidRecoveryMaxRecoveries |
int 1-100 |
3 |
在一个窗口期内允许的最大恢复次数,超过后将进入冷却。 |
voidRecoveryCooldownTicks |
int 1-1200 |
10 |
达到恢复上限后的冷却持续时间(刻)。 |
示例:
/lenientdeath config set enabled false
/lenientdeath config set voidRecoveryMode ALL_DROPS
/lenientdeath config set privateHighlightScanRadius 128.0
获取配置值
/lenientdeath config get <key>
支持上述列出的所有键。数值键会显示其允许的范围;枚举键会显示所有有效选项。
示例:
/lenientdeath config get voidRecoveryMode
/lenientdeath config get privateHighlightScanRadius
重载配置文件
/lenientdeath config reload
从当前世界重新读取 serverconfig/lenientdeath-server.toml 并立即应用更改。适用于手动编辑文件后无需重启即可生效的情况。
始终保留列表
管理始终保留的物品 ID 和标签。位于此列表中的物品在死亡时将始终被保留,不受其他规则影响。
| 命令 |
描述 |
/lenientdeath config preserve item add <item_id> |
添加物品 ID(例如 minecraft:totem_of_undying) |
/lenientdeath config preserve item remove <item_id> |
移除物品 ID |
/lenientdeath config preserve item list |
显示当前的物品 ID 列表 |
/lenientdeath config preserve tag add <tag_id> |
添加物品标签(例如 minecraft:logs) |
/lenientdeath config preserve tag remove <tag_id> |
移除物品标签 |
/lenientdeath config preserve tag list |
显示当前的标签列表 |
始终掉落列表
管理始终掉落的物品 ID 和标签。位于此列表中的物品在死亡时将始终掉落;这将覆盖保留规则。
| 命令 |
描述 |
/lenientdeath config drop item add <item_id> |
添加物品 ID |
/lenientdeath config drop item remove <item_id> |
移除物品 ID |
/lenientdeath config drop item list |
显示当前的物品 ID 列表 |
/lenientdeath config drop tag add <tag_id> |
添加物品标签 |
/lenientdeath config drop tag remove <tag_id> |
移除物品标签 |
/lenientdeath config drop tag list |
显示当前的标签列表 |
调试
/lenientdeath debug status
打印运行时调试信息,包括:反射访问器状态、私有高亮追踪的玩家数量、调试日志开关状态、缓存的保留物品与库存快照计数,以及待处理的死亡坐标消息。有助于排查模组问题。
如何修改配置
运行时配置文件路径(按世界):
<world>/serverconfig/lenientdeath-server.toml
建议在游戏/服务器停止时编辑此文件,然后重启以确保所有更改生效。或者,在运行时编辑并使用 /lenientdeath config reload 应用更改。
快速步骤
- 如果不存在配置文件,请运行一次客户端或服务器以自动生成默认值。
- 打开
<world>/serverconfig/lenientdeath-server.toml。
- 根据需要修改
[General]、[Randomizer]、[NBT]、[Features]、[Features.DroppedItemGlow]、[Features.ExtendedDeathItemLifetime]、[Lists]、[ItemTypes] 下的值。
- 保存并重启,或在游戏内运行
/lenientdeath config reload。
旧版配置迁移
如果检测到旧版全局配置文件 config/lenientdeath-common.toml,其内容会在首次加载世界时自动迁移到当前世界的 serverconfig/lenientdeath-server.toml 中并立即应用。
完整配置示例
[General]
# 启用死亡后保留物品的总开关
enabled = true
[Randomizer]
# 未匹配其他规则的物品的随机保留
enabled = false
# 基础随机保留几率(百分比,0-100)
chancePercent = 25
# 幸运加成因子(百分比):每点幸运值增加此数值到几率中
luckAdditive = 20
# 幸运乘数因子:公式 = chance * (1 + multiplier * luck) + additive * luck
# 示例:luck=2, multiplier=1.0, additive=20%, chance=25% -> 25%*(1+2)+40%=115% -> 限制为 100%
luckMultiplier = 1.0
[NBT]
# 保留具有特定 NBT 布尔标签的物品(类似灵魂绑定)
# 示例:/give @s diamond{Soulbound:1b} -> 始终保留
enabled = false
nbtKey = "Soulbound"
[Features]
# 重生后在聊天中显示死亡坐标(含维度)
deathCoordinates = true
# 掉落物的私有所有者专属发光高亮
itemGlow = true
# 私有高亮扫描间隔(刻,1-200),10 = 每 0.5 秒
privateHighlightScanIntervalTicks = 10
# 扫描半径(方块,8.0-256.0)
privateHighlightScanRadius = 96.0
# 每次扫描处理的最大物品实体数量(16-4096)
privateHighlightMaxScannedEntities = 256
[Features.DroppedItemGlow]
# 谁应该看到发光效果:DEAD_PLAYER / DEAD_PLAYER_AND_TEAM / EVERYONE
glowVisibility = "DEAD_PLAYER_AND_TEAM"
# 当 glowVisibility 为 DEAD_PLAYER_AND_TEAM 且死者没有队伍时,
# 是否向所有无队伍玩家显示轮廓?
noTeamIsValidTeam = false
# 使死亡掉落物免受所有伤害
itemResilience = false
[Features.ExtendedDeathItemLifetime]
# 是否修改死亡掉落物的存在时间
enabled = false
# 存在时间(秒)(如果 neverDespawn 为 true 则忽略)
# 300 = 5 分钟(原版),900 = 15 分钟,1800 = 30 分钟
deathDropItemLifetimeSeconds = 900
# 永不消失;清理命令:/kill @e[type=item,tag=LENIENT_DEATH_INFINITE_LIFETIME]
deathDropItemsNeverDespawn = false
# 从虚空恢复物品到安全位置
voidRecovery = true
# 从火焰/岩浆恢复物品到安全位置
hazardRecovery = true
# 虚空/危险区域恢复范围:DEATH_DROPS_ONLY(默认)或 ALL_DROPS
voidRecoveryMode = "DEATH_DROPS_ONLY"
# 将保留的物品恢复到其原始库存槽位
restoreSlots = true
# --- 虚空恢复速率限制器 ---
# 统计恢复次数的时间窗口(刻,1-1200)
voidRecoveryWindowTicks = 10
# 一个窗口内的最大恢复次数(1-100)
voidRecoveryMaxRecoveries = 3
# 达到限制后的冷却时间(刻,1-1200)
voidRecoveryCooldownTicks = 10
# 注意:voidRecoveryDebug 是仅运行时标志(不保存在配置文件中)。
# 每次加载世界时会重置为 false。通过以下方式启用:/lenientdeath config set voidRecoveryDebug true
[Lists]
# 始终保留这些确切的物品 ID
alwaysPreservedItems = ["minecraft:totem_of_undying"]
# 始终保留匹配这些标签的物品
alwaysPreservedTags = ["minecraft:logs"]
# 始终丢弃这些确切的物品 ID
alwaysDroppedItems = ["minecraft:diamond"]
# 始终丢弃匹配这些标签的物品
alwaysDroppedTags = ["minecraft:planks"]
[ItemTypes]
# 启用物品类型规则(每种类型可设置为 PRESERVE / DROP / IGNORE)
enabled = true
helmets = "PRESERVE"
chestplates = "PRESERVE"
leggings = "PRESERVE"
boots = "PRESERVE"
elytras = "PRESERVE"
shields = "PRESERVE"
tools = "PRESERVE"
weapons = "PRESERVE"
meleeWeapons = "IGNORE"
rangedWeapons = "IGNORE"
utilityTools = "IGNORE"
fishingRods = "IGNORE"
buckets = "IGNORE"
enchantedBooks = "IGNORE"
totems = "IGNORE"
blockItems = "IGNORE"
spawnEggs = "IGNORE"
arrows = "IGNORE"
food = "PRESERVE"
potions = "PRESERVE"
curios = "PRESERVE"
保留规则
物品在死亡时按以下优先级顺序进行评估:
- NBT 标签:CustomData 中包含指定布尔键(默认为
Soulbound:1b)的物品将始终被保留。需要 [NBT].enabled = true。
- 手动列表:位于
alwaysPreservedItems/alwaysPreservedTags 中的物品将始终被保留;位于 alwaysDroppedItems/alwaysDroppedTags 中的物品将始终被丢弃(丢弃优先于保留)。
- 物品类型规则:按护甲、工具、武器、食物、药水、Curios 等分类。每种类型可设置为
PRESERVE、DROP 或 IGNORE。
- 随机保留:未被上述任何规则匹配的物品将根据基础几率加上幸运修正进行随机保留。需要
[Randomizer].enabled = true。
恢复机制
- Void Recovery (
voidRecovery): 当掉落物掉落到世界最低高度以下时,会被传送至安全位置。
- Hazard Recovery (
hazardRecovery): 当掉落物处于着火状态或位于熔岩中时,会被传送至安全位置。
- 安全位置选择顺序:玩家历史安全点 -> 最近的合法三维着陆点 -> 世界重生点附近。
voidRecoveryMode 控制范围:DEATH_DROPS_ONLY(默认,仅限死亡掉落物)或 ALL_DROPS(所有掉落物)。
- 速率限制:
voidRecoveryWindowTicks、voidRecoveryMaxRecoveries 和 voidRecoveryCooldownTicks 防止短时间内进行过多恢复操作。
其他功能
- Private Highlight (
itemGlow): 死亡掉落物仅对拥有者发光(也可配置为队友或所有人可见,通过 glowVisibility 设置)。发光颜色随剩余时间变化:蓝色(>5分钟)-> 绿色(3-5分钟)-> 黄色(2-3分钟)-> 橙色(1-2分钟)-> 红色(30秒-1分钟)-> 闪烁红色(<30秒)。
- Item Resilience (
itemResilience): 使死亡掉落物免疫所有伤害(火焰、仙人掌、爆炸等)。
- Extended Lifetime (
extendedLifetimeEnabled): 延长死亡掉落物的存在时间,超过原版默认的5分钟,或使其永不消失。
- Death Coordinates (
deathCoordinates): 重生时在聊天栏显示死亡位置和维度。
- Slot Restoration (
restoreSlots): 保留的物品会自动放回其原始背包槽位。
开发
- 刷新依赖:
gradlew --refresh-dependencies
- 清理构建:
gradlew clean
- 编译:
gradlew compileJava
- 测试:
gradlew test
LenientDeath (NeoForge 1.21.x, 1.21-1.21.11)
中文文档 / README_CN
NeoForge port of Fabric mod JackFred2/LenientDeath.
This project was developed with extensive use of AI-assisted programming and code refactoring, including but not limited to code generation, debugging analysis and documentation writing.
In-Game Commands
All commands require OP permission (level >= 2). Unless otherwise noted, set commands take effect immediately and are auto-saved to the current world's serverconfig/lenientdeath-server.toml.
Set Config Values
/lenientdeath config set <key> <value>
All available keys, value types and descriptions:
| Key |
Type |
Default |
Description |
enabled |
true | false |
true |
Master switch for preserving items on death. When off, all preservation rules are disabled. |
byItemTypeEnabled |
true | false |
true |
Master switch for item-type-based preservation (armor, tools, weapons, etc.). |
deathCoordinates |
true | false |
true |
Show death coordinates (with dimension) in chat upon respawn. |
itemGlow |
true | false |
true |
Private highlight: only the item owner can see dropped items glow (color changes based on remaining lifetime). |
glowVisibility |
enum |
DEAD_PLAYER_AND_TEAM |
Who can see the glow: DEAD_PLAYER = owner only, DEAD_PLAYER_AND_TEAM = owner + teammates, EVERYONE = all players. |
noTeamIsValidTeam |
true | false |
false |
When glowVisibility is DEAD_PLAYER_AND_TEAM: if the dead player has no team, show glow to all teamless players. |
itemResilience |
true | false |
false |
Make death-dropped items invulnerable to all damage (fire, cactus, explosion, etc.). |
extendedLifetimeEnabled |
true | false |
false |
Whether to modify death drop item lifetime. |
deathDropItemLifetimeSeconds |
int 0-1800 |
900 |
Death drop lifetime in seconds (ignored if neverDespawn is true). 300=5min, 900=15min. |
deathDropItemsNeverDespawn |
true | false |
false |
Death drop items never despawn. Clean up: /kill @e[type=item,tag=LENIENT_DEATH_INFINITE_LIFETIME] |
voidRecovery |
true | false |
true |
Void recovery: auto-teleport dropped items to a safe position when falling into the void. |
hazardRecovery |
true | false |
true |
Hazard recovery: auto-teleport dropped items to a safe position when on fire or in lava. |
voidRecoveryDebug |
true | false |
false |
Debug logging for void/hazard recovery. Runtime-only; not saved to config; resets to false on world reload. |
voidRecoveryMode |
enum |
DEATH_DROPS_ONLY |
Scope for void/hazard recovery (tab-completable): DEATH_DROPS_ONLY = only death drops, ALL_DROPS = all drops including manually discarded items. |
restoreSlots |
true | false |
true |
Restore preserved items to their original inventory slots (hotbar, armor, etc.). |
privateHighlightScanIntervalTicks |
int 1-200 |
10 |
Private highlight scan interval (ticks; 20 ticks = 1 second). |
privateHighlightScanRadius |
float 8.0-256.0 |
96.0 |
Private highlight scan radius (blocks). Items beyond this are not highlighted. |
privateHighlightMaxScannedEntities |
int 16-4096 |
256 |
Max item entities processed per scan; limits server overhead. |
voidRecoveryWindowTicks |
int 1-1200 |
10 |
Recovery rate-limit window length (ticks). |
voidRecoveryMaxRecoveries |
int 1-100 |
3 |
Max recoveries allowed within one window before cooldown. |
voidRecoveryCooldownTicks |
int 1-1200 |
10 |
Cooldown duration after hitting the recovery limit (ticks). |
Examples:
/lenientdeath config set enabled false
/lenientdeath config set voidRecoveryMode ALL_DROPS
/lenientdeath config set privateHighlightScanRadius 128.0
Get Config Values
/lenientdeath config get <key>
Supports all keys listed above. Numeric keys display their allowed range; enum keys display all valid options.
Examples:
/lenientdeath config get voidRecoveryMode
/lenientdeath config get privateHighlightScanRadius
Reload Config File
/lenientdeath config reload
Re-reads serverconfig/lenientdeath-server.toml from the current world and applies changes immediately. Useful after manual file edits without restarting.
Always-Preserve List
Manage always-preserved item IDs and tags. Items on this list are always kept on death, regardless of other rules.
| Command |
Description |
/lenientdeath config preserve item add <item_id> |
Add item ID (e.g. minecraft:totem_of_undying) |
/lenientdeath config preserve item remove <item_id> |
Remove item ID |
/lenientdeath config preserve item list |
Show current item ID list |
/lenientdeath config preserve tag add <tag_id> |
Add item tag (e.g. minecraft:logs) |
/lenientdeath config preserve tag remove <tag_id> |
Remove item tag |
/lenientdeath config preserve tag list |
Show current tag list |
Always-Drop List
Manage always-dropped item IDs and tags. Items on this list are always dropped on death; this overrides preservation rules.
| Command |
Description |
/lenientdeath config drop item add <item_id> |
Add item ID |
/lenientdeath config drop item remove <item_id> |
Remove item ID |
/lenientdeath config drop item list |
Show current item ID list |
/lenientdeath config drop tag add <tag_id> |
Add item tag |
/lenientdeath config drop tag remove <tag_id> |
Remove item tag |
/lenientdeath config drop tag list |
Show current tag list |
Debug
/lenientdeath debug status
Prints runtime debug info including: reflection accessor status, number of players tracked by private highlight, debug logging toggle state, cached preserved-items and inventory snapshot counts, and pending death coordinate messages. Useful for troubleshooting mod issues.
How To Modify Configuration
Runtime config file path (per-world):
<world>/serverconfig/lenientdeath-server.toml
It is recommended to edit this file while the game/server is stopped, then restart to ensure all changes take effect. Alternatively, edit while running and use /lenientdeath config reload to apply.
Quick Steps
- If no config file exists, run the client or server once to auto-generate defaults.
- Open
<world>/serverconfig/lenientdeath-server.toml.
- Modify values under
[General], [Randomizer], [NBT], [Features], [Features.DroppedItemGlow], [Features.ExtendedDeathItemLifetime], [Lists], [ItemTypes] as needed.
- Save and restart, or run
/lenientdeath config reload in-game.
Legacy Config Migration
If a legacy global config config/lenientdeath-common.toml is detected, its contents are automatically migrated to the current world's serverconfig/lenientdeath-server.toml on first world load and applied immediately.
Full Configuration Example
[General]
# Master switch for preserving items on death
enabled = true
[Randomizer]
# Random preservation for items not matched by other rules
enabled = false
# Base random keep chance (percent, 0-100)
chancePercent = 25
# Luck additive factor (percent): each luck point adds this to chance
luckAdditive = 20
# Luck multiplier factor: formula = chance * (1 + multiplier * luck) + additive * luck
# Example: luck=2, multiplier=1.0, additive=20%, chance=25% -> 25%*(1+2)+40%=115% -> clamped to 100%
luckMultiplier = 1.0
[NBT]
# Preserve items with a specific NBT boolean tag (soulbound-like)
# Example: /give @s diamond{Soulbound:1b} -> always preserved
enabled = false
nbtKey = "Soulbound"
[Features]
# Show death coordinates in chat after respawn (with dimension)
deathCoordinates = true
# Private owner-only glow highlight for dropped items
itemGlow = true
# Private highlight scan interval in ticks (1-200), 10 = every 0.5s
privateHighlightScanIntervalTicks = 10
# Scan radius in blocks (8.0-256.0)
privateHighlightScanRadius = 96.0
# Max item entities processed per scan (16-4096)
privateHighlightMaxScannedEntities = 256
[Features.DroppedItemGlow]
# Who should see the glow: DEAD_PLAYER / DEAD_PLAYER_AND_TEAM / EVERYONE
glowVisibility = "DEAD_PLAYER_AND_TEAM"
# When glowVisibility is DEAD_PLAYER_AND_TEAM and the dead player has no team,
# show outline to all teamless players?
noTeamIsValidTeam = false
# Make death drops invulnerable to all damage
itemResilience = false
[Features.ExtendedDeathItemLifetime]
# Whether to modify death drop item lifetime
enabled = false
# Lifetime in seconds (ignored if neverDespawn is true)
# 300 = 5 min (vanilla), 900 = 15 min, 1800 = 30 min
deathDropItemLifetimeSeconds = 900
# Never despawn; clean up: /kill @e[type=item,tag=LENIENT_DEATH_INFINITE_LIFETIME]
deathDropItemsNeverDespawn = false
# Recover items from void to safe position
voidRecovery = true
# Recover items from fire/lava to safe position
hazardRecovery = true
# Void/hazard recovery scope: DEATH_DROPS_ONLY (default) or ALL_DROPS
voidRecoveryMode = "DEATH_DROPS_ONLY"
# Restore preserved items to their original inventory slots
restoreSlots = true
# --- Void Recovery Rate Limiter ---
# Time window for counting recoveries (ticks, 1-1200)
voidRecoveryWindowTicks = 10
# Max recoveries inside one window (1-100)
voidRecoveryMaxRecoveries = 3
# Cooldown after hitting limit (ticks, 1-1200)
voidRecoveryCooldownTicks = 10
# Note: voidRecoveryDebug is a runtime-only flag (not saved in config).
# It resets to false on each world load. Enable via: /lenientdeath config set voidRecoveryDebug true
[Lists]
# Always preserve these exact item IDs
alwaysPreservedItems = ["minecraft:totem_of_undying"]
# Always preserve items matching these tags
alwaysPreservedTags = ["minecraft:logs"]
# Always drop these exact item IDs
alwaysDroppedItems = ["minecraft:diamond"]
# Always drop items matching these tags
alwaysDroppedTags = ["minecraft:planks"]
[ItemTypes]
# Enable item type rules (PRESERVE / DROP / IGNORE per type)
enabled = true
helmets = "PRESERVE"
chestplates = "PRESERVE"
leggings = "PRESERVE"
boots = "PRESERVE"
elytras = "PRESERVE"
shields = "PRESERVE"
tools = "PRESERVE"
weapons = "PRESERVE"
meleeWeapons = "IGNORE"
rangedWeapons = "IGNORE"
utilityTools = "IGNORE"
fishingRods = "IGNORE"
buckets = "IGNORE"
enchantedBooks = "IGNORE"
totems = "IGNORE"
blockItems = "IGNORE"
spawnEggs = "IGNORE"
arrows = "IGNORE"
food = "PRESERVE"
potions = "PRESERVE"
curios = "PRESERVE"
Preservation Rules
Items are evaluated on death in the following priority order:
- NBT Tag: Items with the specified boolean key in CustomData (default
Soulbound:1b) are always preserved. Requires [NBT].enabled = true.
- Manual Lists: Items in
alwaysPreservedItems/alwaysPreservedTags are always preserved; items in alwaysDroppedItems/alwaysDroppedTags are always dropped (drop takes priority over preserve).
- Item Type Rules: Categorized by armor, tools, weapons, food, potions, Curios, etc. Each type can be set to
PRESERVE, DROP, or IGNORE.
- Random Preservation: Items not matched by any rule above are randomly kept based on base chance + luck modifier. Requires
[Randomizer].enabled = true.
Recovery Mechanics
- Void Recovery (
voidRecovery): When dropped items fall below the world's minimum height, they are teleported to a safe position.
- Hazard Recovery (
hazardRecovery): When dropped items are on fire or in lava, they are teleported to a safe position.
- Safe position selection order: player historical safe point -> nearest valid 3D landing spot -> near world spawn.
voidRecoveryMode controls scope: DEATH_DROPS_ONLY (default, death drops only) or ALL_DROPS (all drops).
- Rate limiting:
voidRecoveryWindowTicks, voidRecoveryMaxRecoveries, and voidRecoveryCooldownTicks prevent excessive recoveries in a short period.
Other Features
- Private Highlight (
itemGlow): Death-dropped items glow only for the owner (or teammates/everyone, configurable via glowVisibility). The glow color changes based on remaining lifetime: blue (>5min) -> green (3-5min) -> yellow (2-3min) -> orange (1-2min) -> red (30s-1min) -> flashing red (<30s).
- Item Resilience (
itemResilience): Make death-dropped items invulnerable to all damage (fire, cactus, explosion, etc.).
- Extended Lifetime (
extendedLifetimeEnabled): Extend death drop item lifetime beyond vanilla 5 minutes, or make them never despawn.
- Death Coordinates (
deathCoordinates): Death location and dimension shown in chat upon respawn.
- Slot Restoration (
restoreSlots): Preserved items are automatically placed back in their original inventory slots.
Development
- Refresh dependencies:
gradlew --refresh-dependencies
- Clean build:
gradlew clean
- Compile:
gradlew compileJava
- Test:
gradlew test
评论 0
登录后参与评分
还没有评论,来抢沙发吧