← Назад к ресурсам

Chest DNA

Shows where the items in the inventory came from.

Modrinth adventure game-mechanics utility

Описание

[![Partner](https://cdn.modrinth.com/data/cached_images/06ea55e48cc0c4a3c88e3534b56dafe514340b0f_0.webp)](https://url-shortener.curseforge.com/DGqyP) [![image](https://media.forgecdn.net/attachments/description/1321365/description_19767e94-ef82-4569-92c6-b1e8b60e6e07.png)](https://discord.gg/XgH4EpyPD2) # Chest DNA ![image](https://media.forgecdn.net/attachments/description/1649754/description_1d66986c-bf08-4a88-a1bc-189ab8ff4c6a.gif) ![image](https://media.forgecdn.net/attachments/description/1649754/description_1a36a39b-176b-4be8-8ebc-5c27da7287a7.gif) **Records where every item came from and shows it in the item's tooltip.** ![image](https://media.forgecdn.net/attachments/description/1649754/description_44fcddca-6701-408a-a762-5203a3341f92.gif) ![image](https://media.forgecdn.net/attachments/description/null/description_2f86d6ce-1e73-43c5-bf96-b3d3a1ac3585.png) 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. ![image](https://media.forgecdn.net/attachments/description/null/description_92cf3d59-5b82-4180-8518-d535513f7313.png) *** ## 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: ![image](https://media.forgecdn.net/attachments/description/null/description_e5d47a21-f3f1-420d-9dc4-d5567172bdd3.png) * **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 `chestdna` entrypoint 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.