{"url":"https://levimc.org/mods/github.com/GroupMountain/Phantom/","id":"github.com/GroupMountain/Phantom","name":"Phantom","description":"A LeviLamina Bedrock hologram plugin inspired by DecentHolograms.","owner":"GroupMountain","logo":"https://levimc.org/mods/icons/569eac642026012c-288.webp","repository":"https://github.com/GroupMountain/Phantom","issues":"https://github.com/GroupMountain/Phantom/issues","releases":"https://github.com/GroupMountain/Phantom/releases","stars":0,"downloads":30,"updated":"2026-09-30T15:49:32Z","published":"2026-08-05T06:34:45Z","created":"2026-06-15T13:31:08Z","license":"LGPL-3.0","side":["server"],"platform":["win-x64"],"gameVersions":["1.26.20","1.26.10"],"tags":["platform:levilamina","type:mod"],"latest":{"variant":"","version":"26.51.0","install":"lip install github.com/GroupMountain/Phantom@26.51.0"},"readmes":[{"file":"README.md","lang":"zh-Hans","text":"# Phantom\n\nPhantom 是一个 LeviLamina 基岩版悬浮字插件，当前版本 `0.0.1`。它参考 DecentHolograms 的管理模型，但按基岩版客户端能力重新实现：悬浮字通过协议 ID 328 的 Debug Drawer TEXT shape 渲染，不在服务端世界里生成真实实体。\n\n## 功能\n\n- 多行悬浮字，支持 Minecraft 颜色符号。\n- 一个悬浮字只发送一个 Primitive TEXT shape，多行文本使用基岩版换行能力合并渲染。\n- 按玩家距离和维度动态显示或隐藏。\n- 支持自定义维度 ID，不限于主世界、下界、末地。\n- 支持动态悬浮字：每行可配置内容池、轮播间隔和玩家变量解析。\n- 数据持久化到 `plugins/Phantom/data/holograms.json`。\n- `/phantom`、`/hologram`、`/holo` 三个指令入口。\n- 基岩版表单管理：创建、列表、编辑文本、动态行、移动到玩家附近、启用、禁用、删除。\n- 表单、命令反馈和日志支持 LeviLamina I18n，默认生成中文和英文语言文件。\n\n## 指令\n\n权限：`GameDirectors`。\n\n```text\n/phantom\n/phantom gui\n/phantom list\n/phantom reload\n/phantom create <name> <text>\n/phantom remove <name>\n/phantom movehere <name>\n/phantom enable <name>\n/phantom disable <name>\n/phantom append <name> <text>\n/phantom setline <name> <index> <text>\n/phantom dynamicline <name> <index> <intervalMs> <parseVariables> <text>\n/phantom removeline <name> <index>\n```\n\n说明：\n\n- `/phantom` 和 `/phantom gui` 打开表单，只能由玩家执行。\n- `/phantom create <name> <text>` 在玩家头顶附近创建一行悬浮字。\n- 行号从 1 开始。\n- 多行文本建议在表单的 Lines 编辑器里维护。\n- 动态行的 `text` 可用 `|` 分隔多个内容变体，例如 `A|B|C`。\n- `parseVariables` 使用 `0` 或 `1`。\n- `movehere` 会把悬浮字移动到执行玩家当前位置上方约 2.2 格。\n\n## 动态悬浮字\n\n表单中进入 `Dynamic lines` 可逐行设置：\n\n- `Content pool`：一行一个内容变体。\n- `Update interval ms`：大于 0 时按毫秒轮播内容；为 0 时不轮播。\n- `Parse variables`：启用后解析 Phantom 内置变量。\n\n内置变量：\n\n```text\n{player}        玩家名\n{online}        在线人数\n{dimension}     玩家当前维度 ID\n{hologram}      悬浮字名称\n{line}          当前行号，从 1 开始\n{contentIndex}  当前内容池索引，从 0 开始\n{x} {y} {z}     玩家整数坐标\n```\n\n动态实现保留“每行写什么、每行如何轮播”的管理逻辑，但协议层会把当前各行文本合并为一个带换行的 Primitive TEXT shape。只有当前玩家看到的最终文本实际变化时才重新发包。\n\n## 配置\n\n`plugins/Phantom/config/config.json`：\n\n```json\n{\n  \"version\": 1,\n  \"holograms\": true,\n  \"forms\": true,\n  \"viewDistance\": 48.0,\n  \"lineSpacing\": 0.27,\n  \"refreshIntervalTicks\": 10,\n  \"dynamicRefreshIntervalTicks\": 10,\n  \"language\": \"zh_CN\"\n}\n```\n\n`plugins/Phantom/data/holograms.json` 保存实际悬浮字：\n\n- `name`：唯一名称，只保留字母、数字、`_`、`-`。\n- `dimension`：维度 ID，可填写自定义维度使用的整数 ID。\n- `position`：悬浮字的位置。\n- `lines`：文本行；每行支持 `text`、`content`、`updateIntervalMs`、`parseVariables`。\n- `enabled`：是否显示。\n- `viewDistance`：单个悬浮字覆盖默认可视距离；小于等于 0 时使用全局配置。\n- `lineSpacing`：保留给管理和未来渲染策略；当前 TEXT shape 使用客户端换行。\n\n## I18n\n\n首次加载插件时会检查 `plugins/Phantom/lang/`：\n\n- 缺少 `en_US.json` 或 `zh_CN.json` 时会生成默认语言文件。\n- 语言文件已存在时只加载，不覆盖服主修改。\n- 表单发送给玩家时按玩家客户端语言选择文本。\n- 控制台、日志或没有玩家语言的场景使用 `config.json` 中的 `language`。\n\n## 构建\n\n```bash\nxmake f -y -p windows -a x64 -m release\nxmake build Phantom\n```\n\n依赖：\n\n- LeviLamina\n- SculkCatalystMC/Protocol\n\n## 许可证\n\n本项目基于 GNU Lesser General Public License v3.0（LGPL-3.0）开源，完整协议文本见 [LICENSE](LICENSE)。\n\n## 参考\n\n- DecentHolograms：Java 版成熟悬浮字的功能结构参考。\n- BedrockServerClientInterface：基岩版悬浮显示思路参考。\n- GMLIB FloatingText：运行时悬浮字管理模型参考。\n- GMSidebar：动态内容池、轮播间隔和每玩家缓存刷新策略参考。\n- SculkCatalystMC/Protocol：协议 ID、基础类型和序列化范式参考；ID 328 在当前 BDS/LeviLamina 中按 `DebugDrawerPacket` 线格式写入。\n"}],"gallery":[],"versions":[{"version":"26.51.0","prerelease":false,"released":"2026-09-30T15:49:32Z","releaseUrl":"https://github.com/GroupMountain/Phantom/releases/tag/v26.51.0","manifestUrl":"https://github.com/GroupMountain/Phantom/blob/v26.51.0/tooth.json","info":{"name":"Phantom","description":"A LeviLamina Bedrock hologram plugin inspired by DecentHolograms.","tags":["platform:levilamina","type:mod"],"logo":"https://example.com/phantom/avatar.png"},"variants":{"":[{"side":"server","platform":"win-x64","deps":{"github.com/LiteLDev/LeviLamina":"26.20.*"}}]}},{"version":"26.20.0","prerelease":false,"released":"2026-08-05T06:34:45Z","releaseUrl":"https://github.com/GroupMountain/Phantom/releases/tag/v26.20.0","manifestUrl":"https://github.com/GroupMountain/Phantom/blob/v26.20.0/tooth.json","info":{"name":"Phantom","description":"A LeviLamina Bedrock hologram plugin inspired by DecentHolograms.","tags":["platform:levilamina","type:mod"],"logo":"https://example.com/phantom/avatar.png"},"variants":{"":[{"side":"server","platform":"win-x64","deps":{"github.com/LiteLDev/LeviLamina":"26.20.*"}}]}}],"dependencies":{"github.com/liteldev/levilamina":{"id":"github.com/LiteLDev/LeviLamina","name":"LeviLamina","owner":"LiteLDev","url":"https://levimc.org/mods/github.com/LiteLDev/LeviLamina/"}},"requiredBy":[]}