
Chest DNA

记录每件物品的来源,并在物品工具提示中显示。


打开箱子时,你只会得到没有故事的战利品。Chest DNA 解决了这个问题:物品在生成的瞬间就会被盖上起源印记,该印记将伴随物品直到其生命周期结束。

功能说明
每当物品进入世界时——无论是从箱子里开出、怪物掉落、向村民购买、钓鱼获得、合成、熔炼还是挖掘——Chest DNA 都会为其附加一个包含以下信息的起源(origin):

- 来源(Source) - 村庄、地牢、末地城、远古城市、怪物、交易、工作台……
- 详情(Detail) - 它掷骰子的战利品表,或掉落它的实体
- 它所在的生物群系(Biome)和维度(dimension)
- 精确位置的坐标(Coordinates)
- 如果有的话,它被发现所在的结构(Structure)
- 获取者的姓名(Who)
这些数据以真实的数据组件形式存储,因此能够存活于世界保存、潜影盒、末影箱以及多人游戏中——并且可以被命令、数据包和其他模组读取。
外观展示
悬停在物品上时,会在常规工具提示下方绘制一张像素艺术卡片。该卡片逐像素绘制且无纹理,因此在任何 GUI 缩放比例下都保持清晰:
- 顶部显示来源名称,下方印有稀有度等级
- 边框颜色根据稀有度变化——灰色代表村庄箱子,金色并带有沿边框爬行的闪烁像素代表末地城、远古城市或危险保险库
- 左侧边缘有一条动态的 DNA 双螺旋动画
- 默认一眼即可看清;按住 Shift 可查看生物群系、维度、坐标和发现者信息
- ID 仅在启用高级工具提示(F3+H)时显示,如同原版行为
卡片大小会自动适应屏幕:长值会自动换行,宽度或高度绝不会超过必要值,并且它会报告实际尺寸,以确保工具提示始终保持在屏幕内。
支持的来源类型
| 组别 | 涵盖范围 |
|---|---|
| 结构宝箱 | 村庄、地牢、废弃矿井、要塞、下界堡垒、堡垒遗迹、末地城、远古城市、丛林神庙、试炼密室、危险保险库、沉船、埋藏的宝藏、沙漠神殿、丛林神庙、冰屋、废弃传送门、掠夺者前哨站、海洋废墟、奖励宝箱 |
| 生物掉落 | 怪物掉落、Boss 掉落、剪羊毛、猫和嗅探犬礼物、村庄英雄 |
| 玩家操作 | 合成、熔炼、村民和流浪商人交易、钓鱼、考古、创造模式菜单 |
| 挖掘 | 你破坏的每一个方块 |
总计 36 种起源类型,每种都有自己独特的名称、图标和稀有度等级。
不影响游戏体验
- 堆叠机制不变。 仅 DNA 不同的两件物品仍会像原版一样完美堆叠,因此开出的圆石不会导致你的背包碎片化。
- 首次来源优先。 物品在生成时被盖印一次,之后永远不会被覆盖。
- 性能低廉。 每个生成的物品仅写入一个组件;对于挖掘的方块会跳过结构查找,因此破坏方块不会产生可测量的性能损耗。
- 可配置。 可以关闭每个来源组,如果你不想记录某些数据,也可以单独关闭坐标、生物群系、结构和玩家姓名的记录。
命令
/chestdna inspect- 打印手中物品的完整 DNA 信息/chestdna clear- 清除手持物品的 DNA 信息(需要管理员权限)
给模组作者的信息
整个系统是一个开放 API —— 请参阅 README 获取代码示例:
- 注册你自己的起源类型,拥有独特的图标、颜色和等级
- 声明你自己的战利品表,或覆盖 Chest DNA 对原版战利品表的判断
- 在盖印写入之前重写或否决盖印,或者监听盖印事件
- 向卡片添加行,或完全替换其主题
- 提供
chestdna入口点,以便你的插件在正确的时间加载
要求
Minecraft 1.7.10 - 26.2
Chest DNA 可安装在任意一侧,且不会阻塞连接。服务端负责记录数据,客户端负责渲染显示,因此实际效果取决于安装位置:
| 配置 | 结果 |
|---|---|
| 单人游戏 | 一切正常运行,集成服务器会进行记录。 |
| 客户端与服务端均安装 | 一切正常运行。 |
| 仅客户端安装,服务端未安装该模组 | 你可以正常加入游戏。 经测试,在纯净版 vanilla 26.2 专用服务器上,客户端可以连接并游玩,无任何错误。但由于记录功能在服务端,因此不会有任何数据被记录,导致卡片无法出现。 |
| 仅服务端安装 | 起源(Origins)会被记录,且 <code>/chestdna inspect</code> 命令可正常使用。玩家需安装模组才能查看卡片,因此建议对玩家设置为可选模组或手动分发。 |
客户端可选,服务端可选,双方都装则效果更佳。

Chest DNA

Records where every item came from and shows it in the item's tooltip.


Open a chest and you get loot with no story. Chest DNA fixes that: the moment an item is created it gets an origin stamped onto it, and that stamp travels with the item for the rest of its life.

What it does
Whenever an item enters the world - looted from a chest, dropped by a mob, bought from a villager, fished up, crafted, smelted or mined - Chest DNA attaches an origin to it containing:

- Source - village, dungeon, End City, ancient city, mob, trade, workbench, …
- Detail - the loot table it rolled from, or the entity that dropped it
- Biome and dimension it came from
- Coordinates of the exact spot
- Structure it was found inside, when there is one
- Who obtained it, by name
This is stored as a real data component, so it survives world saves, shulker boxes, ender chests and multiplayer - and it is readable by commands, datapacks and other mods.
What it looks like
Hovering the item draws a pixel-art card under the normal tooltip, drawn one pixel at a time with no textures, so it stays crisp at every GUI scale:
- source name on top, tier stamped underneath
- frame colour by rarity - grey for a village chest, gold with shimmer pixels crawling around the border for an End City, an ancient city or an ominous vault
- an animated DNA helix down the left edge
- one glance by default; hold Shift for biome, dimension, coordinates and finder
- ids are shown only with advanced tooltips (F3+H), like vanilla
The card sizes itself against the screen: long values wrap, it never grows wider or taller than it has to, and it reports its real size so the tooltip always stays on screen.
Sources it recognises
| Group | Covered |
|---|---|
| Structure chests | village, dungeon, mineshaft, stronghold, nether fortress, bastion, End City, ancient city, woodland mansion, trial chambers, ominous vaults, shipwreck, buried treasure, desert pyramid, jungle temple, igloo, ruined portal, pillager outpost, ocean ruins, bonus chest |
| Creatures | mob drops, boss drops, shearing, cat and sniffer gifts, hero of the village |
| Player actions | crafting, smelting, villager and wandering trader trades, fishing, archaeology, creative menu |
| Mining | every block you break |
36 origin types in total, each with its own name, glyph and rarity tier.
It does not get in your way
- Stacking is unchanged. Two items that differ only in their DNA still stack exactly like vanilla, so a looted cobblestone does not fragment your inventory.
- The first source wins. An item is stamped once, when it is created, and never overwritten.
- Cheap. One component write per generated item; the structure lookup is skipped for mined blocks so breaking blocks costs nothing measurable.
- Configurable. Every source group can be turned off, and so can coordinates, biome, structure and player name if you do not want that data recorded at all.
Commands
/chestdna inspect- print the full DNA of the item in your hand/chestdna clear- wipe the DNA of the held item (gamemaster permission)
For mod authors
The whole system is an open API - see the README for code samples:
- register your own origin types with their own glyph, colour and tier
- claim your own loot tables, or override what Chest DNA says about vanilla ones
- rewrite or veto a stamp before it is written, or listen for stamps
- add lines to the card, or replace its theme entirely
- a
chestdnaentrypoint so your add-on loads at the right moment
Requirements
Minecraft 1.7.10 - 26.2
Chest DNA installs on either side and never blocks a connection. The server does the recording, the client does the drawing, so what you get depends on where it is installed:
| Setup | Result |
|---|---|
| Singleplayer | Everything works, the integrated server records. |
| Client and server | Everything works. |
| Client only, server without the mod | You can join normally. Tested against a plain vanilla 26.2 dedicated server: the client connects and plays with no errors. Nothing is recorded though, because recording is server side, so no cards appear. |
| Server only | Origins are recorded and /chestdna inspect works. Players need the mod to see the cards, so keep it optional for them or hand it out. |
Optional on the client, optional on the server, useful on both.
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
下载 Chest DNA
Chest DNA 1.03q
发布日期:2026 年 10 月 2 日
此更新在保留物品历史的前提下,改进了堆叠合并、存储传输以及旧版本兼容性。
更改内容
- 当仅 Chest DNA 历史不同的物品堆叠时,使物品相等性和哈希计算保持一致。
- 修复了 Fabric Transfer API 比较中的问题:该问题可能导致在不同时间插入的相同物品被保留在不同的存储组中。此修复已包含在 Fabric 和 Quilt 构建版中。
- 合并时保留了目标堆叠的历史记录。自定义名称和其他物品数据仍会影响物品是否可以堆叠。禁用
ignoreOriginForStacking可使具有不同历史的堆叠保持分离。 - 移除了 Forge 1.12.2 上空的战利品表包装器。历史记录现在在战利品生成后应用,从而保留原始表、其池以及由其他模组添加的内容。
- 在检测到 ChromaticTooltips 时,为 Forge 1.7.10 添加了普通工具提示回退机制。历史记录以常规工具提示行的形式显示,并禁用了独立面板以减少视觉冲突。
- 更正了 Forge 1.7.10 的语言文件名至
en_US.lang和tr_TR.lang,修复了因打包问题导致翻译键而非翻译文本出现的问题。 - 添加了针对受支持的现代 Minecraft 版本的 Forge 构建版。战利品历史使用全局战利品修改器,并包含了所需的数据包元数据和生产映射文件。
- 使用 Java 21 模组字节码编译了 Minecraft 26.x 的 Forge 构建版,以兼容 Forge 捆绑的 Mixin 版本。Minecraft 本身仍需 Java 25。
支持版本
| Minecraft | Fabric | Quilt | Forge | NeoForge |
|---|---|---|---|---|
| 1.7.10 | 不可用 | 不可用 | 可用 | 不可用 |
| 1.12.2 | 不可用 | 不可用 | 可用 | 不可用 |
| 1.20.1 | 可用 | 可用 | 可用 | 可用 |
| 1.21.1 | 可用 | 可用 | 可用 | 可用 |
| 1.21.8 | 可用 | 可用 | 可用 | 可用 |
| 1.21.11 | 可用 | 可用 | 可用 | 可用 |
| 26.1 | 可用 | 可用 | 可用 | 可用,beta 加载器 |
| 26.1.1 | 可用 | 可用 | 可用 | 可用,beta 加载器 |
| 26.1.2 | 可用 | 可用 | 可用 | 可用 |
| 26.2 | 可用 | 可用 | 可用 | 可用 |
| 26.3 | 可用 | 可用 | 可用 | 可用,beta 加载器 |
Minecraft 26.1、26.1.1 和 26.1.2 拥有独立的构建版。Fabric 和 Quilt 共享同一个 JAR 文件,其文件名中包含 fabric-quilt 标识。发布版共包含 29 个模组 JAR 文件。仅安装与您的 Minecraft 版本及加载器匹配的 Chest DNA 文件。
Fabric 和 Quilt 需要对应 Minecraft 版本的 Fabric API。Quilt 检查使用了 Quilt Loader 0.30.1。Minecraft 1.20.1 的 NeoForge 构建版面向遗留的 47.1.106 加载器系列。NeoForge 对于 26.1、26.1.1 和 26.3 的构建版使用了 beta 加载器版本。
验证
现代服务器的检查涵盖了具有不同历史的火把、煤炭和箭矢;正常库存合并;目标历史的保留;不同名称物品的分离;以及在启用基于起源的堆叠时的行为。Fabric 和 Quilt 的检查涵盖了 Transfer API 的相等性、哈希计算、存储分组和库存插入。Forge 和 NeoForge 的检查还涵盖了向熔炉添加煤炭。新的 Forge 构建版额外检查了奖励箱战利品上的历史戳记。
Forge 1.12.2 的检查涵盖了原始战利品表和池的保留、后续添加到池的战利品,以及战利品列表生成和箱子填充。Forge 1.7.10 的英文和土耳其语语言文件已通过 Minecraft 的实际语言读取器进行检查。
完整的整合包测试(包括 Tom's Simple Storage、Cleanroom 下的 TF2 Stuff Reloaded 和 JEI,以及最终使用 ChromaticTooltips 的游戏内外观)仍然是必要的。由于无法获取报告的 NeoForge 1.21.1 问题的模组列表,因此无法复现与该设置相关的特定冲突。尚未在所有构建版中完成客户端视觉测试。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧