{"url":"https://levimc.org/mods/github.com/IceBlcokMC/DebugShape/","tooth":"github.com/IceBlcokMC/DebugShape","name":"DebugShape","description":"minecraft bedrock debug shape packet wrapper","owner":"IceBlcokMC","icon":"https://avatars.githubusercontent.com/IceBlcokMC?s=144","repository":"https://github.com/IceBlcokMC/DebugShape","issues":"https://github.com/IceBlcokMC/DebugShape/issues","releases":"https://github.com/IceBlcokMC/DebugShape/releases","stars":8,"updated":"2026-11-04T17:00:18Z","published":"2025-09-10T14:43:00Z","created":"2025-09-10T13:51:57Z","license":"LGPL-3.0","categories":["library"],"platforms":["levilamina"],"env":["client"],"gameVersions":["1.26.60"],"tags":["platform:levilamina","type:mod","type:library"],"latest":{"variant":"","version":"0.12.0","install":"lip install github.com/IceBlcokMC/DebugShape@0.12.0"},"readmes":[{"file":"README.md","lang":"zh-Hans","text":"# DebugShape - 基岩版调试图形封装库 (Bedrock Edition Debug Shape Wrapper)\n\n基岩版调试图形封装库，用于在基岩版游戏中绘制调试图形。  \nA Bedrock Edition debug shape wrapper for drawing debug shapes in-game.\n\n![DebugShape](./test.png)\n![DebugShape-with-LegacyScriptEngine-QuickJS](./test-addon.png)\n\n## Features / 功能\n\n- 支持箭头、立方体、圆形、线段、球体、文本等基本图形\n- Support for arrows, boxes, circles, lines, spheres, text and other basic shapes\n- 支持 LegacyScriptEngine(QuickJS) 脚本引擎调用\n- Supports LegacyScriptEngine (QuickJS) script engine\n\n## Usage / 使用方法\n\n### LegacyScriptEngine(QuickJS) API\n\n> 此功能仅支持 LegacyScriptEngine-QuickJS 后端，版本需要严格匹配。  \n> This feature only supports the LegacyScriptEngine-QuickJS backend. Versions must match strictly.\n>\n> DebugShape 使用了绑定框架，使 DebugShape 可以与 QuickJS 引擎直接通信而不经过 LegacyRemoteCall 中间商转发，从而实现更好的性能和更好的使用体验。  \n> DebugShape uses a binding framework to communicate directly with the QuickJS engine without going through the LegacyRemoteCall proxy, achieving better performance and user experience.\n\n> **注意：** 当你的脚本导入 DebugShape.dll 后，用户需要每个版本使用与 Minecraft 版本匹配的 DebugShape.dll，否则可能会导致功能异常。  \n> **Note:** After your script imports DebugShape.dll, users must use a DebugShape.dll that matches the Minecraft version for each release, otherwise it may cause malfunctions.\n\n1. 在 manifest.json 中声明对 DebugShape.dll 的依赖，避免 QuickJS 加载时找不到 DebugShape.dll。  \n   Declare the dependency on DebugShape.dll in manifest.json to prevent QuickJS from failing to find it at load time.\n\n```json\n{\n  \"entry\": \"<entry file>\",\n  \"name\": \"<plugin name>\",\n  \"type\": \"lse-quickjs\",\n  \"dependencies\": [\n    {\n      \"name\": \"legacy-script-engine-quickjs\"\n    },\n    {\n      \"name\": \"DebugShape\"\n    }\n  ]\n}\n```\n\n2. 在 QuickJS 中直接 `import` DebugShape 模块即可使用。  \n   Directly `import` the DebugShape module in QuickJS to use it.\n\n```js\nimport { ShapeType } from \"DebugShape.dll\";\n\n// do something\n```\n\n> 完整示例请参考本项目的 [`test-addon/main.js`](./test-addon/main.js) 文件。  \n> For a complete example, see the [`test-addon/main.js`](./test-addon/main.js) file in this project.\n>\n> 此实例包含创建一个全局的 DebugText 实例并动态更新文本内容和随机颜色的示例。  \n> This example demonstrates creating a global DebugText instance and dynamically updating text content with random colors.\n\n> 你可以在这里找到关于 DebugShape.dll 提供的接口完整类型定义文件:  \n> You can find the complete type definition file of the interfaces provided by DebugShape.dll here:\n>\n> [src-addon/DebugShape.d.ts](./src-addon/DebugShape.d.ts)\n\n### C++ API\n\n- xmake.lua\n\n```lua\nadd_repositories(\"iceblcokmc https://github.com/IceBlcokMC/xmake-repo.git\")\n\nadd_requires(\"debug_shape 0.1.0\")\n\ntarget(\"YourProject\")\n    add_packages(\"debug_shape\")\n```\n\n```cpp\n#include \"debug_shape/api/shape/IDebugText.h\"\n\nvoid MyMod::enable() {\n    auto shape = debug_shape::IDebugText::create(Vec3{0,92,0}, \"foo\");\n    shape->draw();\n}\n```\n\n## Quick experience / 快速体验\n\n1. Clone the source code / 克隆源码\n\n```bash\ngit clone https://github.com/engsr6982/DebugShape.git\n```\n\n2. Compile the project and start the test code. / 编译项目并启动测试代码\n\n```bash\ncd DebugShape\nxmake f --test=y\n```\n\n3. Install levilamina and mod / 安装 LeviLamina 和模组\n\n4. Use the **/shape** command for a quick experience. / 使用 **/shape** 命令快速体验\n\n> Since this is test code, only basic demonstrations are provided. For more attributes (color, scaling, etc.), please\n> use the API.  \n> 由于这是测试代码，仅提供基础演示。如需更多属性（颜色、缩放等），请使用 API。\n\n```log\n? shape\n21:41:44.798 INFO [Server] shape:\n21:41:44.798 INFO [Server] Minecraft DebugShape\n21:41:44.798 INFO [Server] Usage:\n21:41:44.798 INFO [Server] - /shape arrow <start: x y z> <end: x y z>\n21:41:44.798 INFO [Server] - /shape box <start: x y z> <end: x y z>\n21:41:44.798 INFO [Server] - /shape circle <position: x y z> [scale: float]\n21:41:44.798 INFO [Server] - /shape clear\n21:41:44.798 INFO [Server] - /shape extension bounds_box <start: x y z> <end: x y z>\n21:41:44.798 INFO [Server] - /shape line <start: x y z> <end: x y z>\n21:41:44.798 INFO [Server] - /shape sphere <position: x y z> [scale: float]\n21:41:44.798 INFO [Server] - /shape text <position: x y z> <text: string>\n```\n\n## LICENSE\n\nLGPL v3 or later\n"}],"gallery":[],"variants":[{"label":"","versions":["0.12.0"]},{"label":"client","versions":["0.12.0"]}],"versions":[{"version":"0.12.0","prerelease":false,"released":"2026-11-04T17:00:18Z","releaseUrl":"https://github.com/IceBlcokMC/DebugShape/releases/tag/v0.12.0","manifestUrl":"https://github.com/IceBlcokMC/DebugShape/blob/v0.12.0/tooth.json","info":{"name":"DebugShape","description":"minecraft bedrock debug shape packet wrapper","tags":["platform:levilamina","type:mod","type:library"],"avatar_url":""},"variants":[{"label":"","platform":"win-x64","dependencies":{"github.com/LiteLDev/LeviLamina":"26.60.*"},"leviLamina":"26.60.*","install":"lip install github.com/IceBlcokMC/DebugShape@0.12.0"},{"label":"client","platform":"win-x64","dependencies":{"github.com/LiteLDev/LeviLamina#client":"26.60.*"},"leviLamina":"26.60.*","install":"lip install github.com/IceBlcokMC/DebugShape#client@0.12.0"}]}],"dependencies":{"github.com/liteldev/levilamina":{"tooth":"github.com/LiteLDev/LeviLamina","name":"LeviLamina","owner":"LiteLDev","url":"https://levimc.org/mods/github.com/LiteLDev/LeviLamina/"}},"requiredBy":[]}