# Chest DNA 1.02q
First release. Chest DNA records where every item came from and shows it in the item's tooltip.
## Downloads
| File | Minecraft | Loader |
| --- | --- | --- |
| `chestdna-1.02q-mc26.1-26.2-fabric.jar` | 26.1, 26.1.1, 26.1.2, 26.2 | Fabric |
| `chestdna-1.02q-mc26.1-26.2-neoforge.jar` | 26.1, 26.1.1, 26.1.2, 26.2 | NeoForge 26.1 and 26.2 |
| `chestdna-1.02q-mc1.21.8-fabric.jar` | 1.21.8 | Fabric |
| `chestdna-1.02q-mc1.21.8-neoforge.jar` | 1.21.8 | NeoForge 21.8 |
| `chestdna-1.02q-mc1.21.1-fabric.jar` | 1.21.1 | Fabric |
| `chestdna-1.02q-mc1.21.1-neoforge.jar` | 1.21.1 | NeoForge 21.1 |
| `chestdna-1.02q-mc1.20.1-fabric.jar` | 1.20.1 | Fabric |
| `chestdna-1.02q-mc1.20.1-forge.jar` | 1.20.1 | Forge 47 |
| `chestdna-1.02q-mc1.16.5-forge.jar` | 1.16.5 | Forge 36 |
| `chestdna-1.02q-mc1.12.2-forge.jar` | 1.12.2 | Forge 14.23 |
| `chestdna-1.02q-mc1.7.10-forge.jar` | 1.7.10 | Forge 10.13 |
Every build needs Fabric API on Fabric. Install on both the client and the server: the server
records origins, the client draws them. A client with Chest DNA can still join a server without
it, there is simply nothing to show.
The version ranges are deliberately narrow. Each jar declares only the Minecraft versions it was
actually tested on, so a jar cannot load on a version whose tooltip internals it does not match.
## What it does
- Attaches an origin to every item the moment it is created: looted from a chest, dropped by a
mob, bought from a villager, fished up, crafted, smelted, mined or taken from the creative menu.
- The origin holds the source type, the loot table or entity behind it, the biome, the
coordinates, the dimension, the game time and the name of the player who obtained it. It is a
real data component, so it survives saves, shulker boxes and servers.
- 36 built-in origin types, mapped from vanilla loot table paths, each with a name, a pixel glyph
and a rarity tier.
- The first source to touch an item wins; history is never overwritten.
## The tooltip card
- Pixel-art card drawn entirely from single-pixel rectangles, no textures, so it stays crisp at
every GUI scale.
- Rarity-coloured frame with corner studs, an animated DNA helix down the left edge, and shimmer
pixels travelling around the border of legendary and mythic origins.
- Compact by default: source name with the tier stamped underneath and a drawn chevron hinting at
more. Shift expands it with biome, dimension, coordinates and finder.
- Loot table ids appear only with advanced tooltips (F3+H), like vanilla.
- Sizes itself against the screen: long values wrap, the card is capped in width and height, and
it reports its real height so the tooltip stays on screen.
- `tooltipStyle` can be set to `lines` for plain vanilla text, or `off`.
## Compatibility
- Tagged and untagged stacks still merge exactly like vanilla on every version; the origin is
excluded from stack comparison. When two stacks merge, the one already in the slot keeps its own
card, so the first item's origin is the one that survives. Turn this off with
`ignoreOriginForStacking` if you want sticky stacks. 1.12.2 and 1.7.10 reach this with a tiny
coremod, since those versions have no other way to touch stack comparison.
- The structure lookup is skipped for mined blocks, so breaking blocks costs nothing measurable.
- Works alongside other loot mods: the stamp is applied by a loot function attached to each table
rather than by replacing loot generation.
## Commands and config
- `/chestdna inspect` prints the full DNA of the held item, `/chestdna clear` wipes it.
- `config/chestdna.json` has a switch per source group, switches for how much detail is recorded
(position, biome, structure, player name), and the tooltip options.
## For mod authors
The whole system is an open API in `xsoras.chestdna.api`, and it does not depend on a loader.
- Register your own origin types with their own glyph, colour and tier.
- Claim your own loot tables with a prioritised classifier, or override the vanilla mapping.
- Rewrite or veto a stamp before it is written, or observe stamps as they happen.
- Add lines to the card, or replace its theme entirely.
- Fabric builds also expose a `chestdna` entrypoint that runs after the built-ins are registered.
## Notes per version
The mod is the same on every version; only the plumbing differs, because the APIs it hooks were
rewritten between these releases.
- **26.1 to 26.2** - the card renders on the 26.x render state pipeline. The loot function
registry holds map codecs directly on this version, so the stamping function carries no separate
type object.
- **1.21.8** - loot is stamped by a `chestdna:stamp_origin` loot function attached to every table,
which is the one mechanism that works on both loaders; the card renders through `GuiGraphics`.
- **1.21.1** - same loot function; the tooltip component is not told the width of the tooltip on
this version, so the card is handed it explicitly.
- **1.20.1** - the first version without data components, so the origin lives in the stack's NBT
under a `ChestDNA` compound, written with the same codec the newer versions feed into the
component. Smelting is stamped as the result leaves the furnace, since the stack has no
machine-crafted hook here.
- **1.16.5 and 1.12.2** carry their own copy of the sources rather than sharing them: the package
flattening landed in 1.17, so nearly every class name differs. Both are Java 8, both draw the
card after the tooltip text through Forge's RenderTooltipEvent since there is no tooltip
component API, and 1.12.2 hooks Forge events instead of loot functions.
- NeoForge builds register through deferred registers and rebuild loot tables on load, since
NeoForge has no loot table builder event and freezes its registries before mods are constructed.
The Forge build instead uses a global loot modifier, which already knows the table id.
**1.7.10 is the one version that has to guess.** Loot tables do not exist there, so nothing can
say which kind of chest an item came from. The build stamps container contents when a player first
opens them and reads the blocks around the chest to name the structure: a spawner with mossy cobble
is a dungeon, nether brick is a fortress, rails and wood supports are a mineshaft, sandstone is a
desert pyramid, and anything unrecognised stays a plain chest with its position and biome. There is
also no tooltip render event on this version, so the card is drawn on top of the screen after the
tooltip rather than as part of it, using vanilla's own tooltip layout maths so it lands in the same
place. Mob drops, mining, crafting and smelting are exact, the same as everywhere else.
## Known gaps
- 1.12.2 has no villager trade or creative menu tracking, and neither 1.16.5 nor 1.12.2 records
the structure an item was found in.
- The NeoForge builds have no plain-text tooltip fallback yet (`tooltipStyle: lines`) and do not
scan for add-on entrypoints; both are Fabric only for now.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }