DataTip
作者:cooobird
JSON-driven custom item tooltips via resource packs. Multi-language, rich text, NBT/condition matching, shift-protected display. No coding — just JSON.
截图
介绍
中文介绍正在准备中,下面暂时显示原文。
About
Add custom tooltips to any item with a JSON file in your resource pack. Multi-language, rich styling, conditional display — no Java required.
{
"minecraft:diamond": {
"type": "text",
"text": "A shiny diamond",
"color": "#55FFFF"
}
}
Features
- 14 Content Types — text, items, 3D blocks/entities, progress bars, charts, carousels, typewriter effect, textures, images, layouts
- Rich Text — hex/named colors, bold, italic, underline, strikethrough, custom fonts
- Multi-Language — per-language text with per-language styles, no fallback
- Custom Fonts —
fontproperty for text and typewriter (e.g.minecraft:alt,minecraft:uniform) - Live Variables (27+) —
{durability},{player_health},{player_x/y/z},{game_time},{nbt:path}, and more - Expressions —
{durability > 100 ? 'Good' : 'Needs repair'} - Color Expressions —
"color": "{durability > 100 ? 'green' : 'red'}" - Flexible Matching — exact ID, tags (
#minecraft:swords), wildcards (minecraft:*_sword) - Conditions (17 types) — filter by dimension, biome, weather, time, health, hunger, nbt, item_tag, etc.
- Shift Toggle — hide details behind a “Hold Shift” prompt
- Prepend Display — show content after item name (before original tooltip)
- Hot Reload —
/reloadorF3+Tapplies changes instantly - Charts — bar, pie, line charts with variable support
- 3D Rendering — rotating block models, entity models, painting display
- X/Y Offset — fine-tune position with
offsetXandoffsetY - Event System — pre/post render hooks, variable resolve events
Quick Start
- Create
assets/<namespace>/datatip/datatip.jsonin your resource pack - Define entries with item ID as key
/reload— done
Configuration
config/datatip-common.toml:
enabled— global on/off toggledefaultColor— default text color (ARGB format)defaultLineHeight— default line height in pixelsmaxWidth— maximum tooltip width
Key bind in Controls → DataTip (default: Left Shift)
For Mod Developers
Datagen Support
// Text with styles and fonts
TipContentBuilder.text("Hello", "gold", true, false, false, false)
TipContentBuilder.text("Hello", "gold", "minecraft:alt")
// Multi-language with styles
TipContentBuilder.langText(langMap, "gold", true, false, false, false)
// All content types
TipContentBuilder.item("minecraft:diamond")
TipContentBuilder.entity("minecraft:wolf", 48, 0, 8)
TipContentBuilder.block("minecraft:stone", 48)
TipContentBuilder.atlas("minecraft:apple", 32)
TipContentBuilder.image("mymod:icon.png", 32, 32)
TipContentBuilder.progress(0.75f, 100, "75%")
TipContentBuilder.chart("bar", 100, 60, "Title", chartEntry("A", 50, "#FF0000"))
TipContentBuilder.typewriter(0xFF55FF, "Line 1", "Line 2")
TipContentBuilder.divider("gray", "dashed")
TipContentBuilder.aligned(content, HorizontalAlign.CENTER)
Java API
// Register custom content type
TipContentRegistry.registerParser("my_type", new MyContentParser());
// Register custom variable
VariableResolver.registerVariable("my_var", stack -> "custom_value");
// Register custom condition
ConditionChecker.registerCondition("my_condition", (value, stack, player, level) -> {
return player.getAbsorptionAmount() > 0;
});
// Event hooks
TipEventManager.onPreRender(event -> { /* ... */ });
TipEventManager.onResolveVariable(event -> { /* ... */ });
TipEventManager.onAppendLines(event -> { /* ... */ });
常见问题
DataTip 支持哪些 Minecraft 版本?
DataTip 支持 Minecraft Java 版 1.20.1–1.21.1,共 2 个版本,可用的加载器:Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
DataTip 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
cooobird 的其他作品
查看全部 →Terra Curio
by Magic_Team.Jvav
一些有趣的《泰拉瑞亚》饰品复刻品
469.8万
9 个月前
Modrinth · CurseForge
Confluence: Otherworld
by westernat233, magic_harp 等
一个将泰拉瑞亚内容融入 Minecraft 的模组,旨在打造两款游戏浑然一体又乐趣十足的组合体验。
53.4万
11 天前
CurseForge
Confluence: Otherworld
by Magic_Team.Jvav
一款融合《Minecraft》和《泰拉瑞亚》的扩展模组
45.1万
9 天前
Modrinth
Terra Entity
by Magic_Team.Jvav
A mod contains many monsters and bosses in Terraria
7.4万
7 个月前
Modrinth
评论
登录后评论和评分