{"url":"https://levimc.org/mods/github.com/Maskviva/CrossBind/","tooth":"github.com/Maskviva/CrossBind","name":"crossbind","description":"Lets Bedrock clients on a different protocol version join the server, by translating packets in both directions.","owner":"Maskviva","icon":"https://avatars.githubusercontent.com/Maskviva?s=144","repository":"https://github.com/Maskviva/CrossBind","issues":"https://github.com/Maskviva/CrossBind/issues","releases":"https://github.com/Maskviva/CrossBind/releases","stars":8,"updated":"2026-09-08T12:52:22Z","published":"2026-08-11T22:00:14Z","created":"2026-08-11T21:45:23Z","license":"Apache-2.0","categories":[],"platforms":["levilamina"],"env":["client"],"gameVersions":["1.26.32","1.26.20"],"tags":["platform:levilamina","type:mod"],"latest":{"variant":"","version":"0.2.1","install":"lip install github.com/Maskviva/CrossBind@0.2.1"},"readmes":[{"file":"README.md","lang":"zh-Hans","text":"<h1 align=\"center\">crossbind</h1>\n\n<p align=\"center\">\n  <b>让协议版本和服务端不一致的基岩版客户端也能进服。</b>\n</p>\n\n<p align=\"center\">\n  <a href=\"../../actions/workflows/build.yml\"><img src=\"../../actions/workflows/build.yml/badge.svg\" alt=\"Build\"></a>\n  <a href=\"https://github.com/Maskviva/crossbind/releases\"><img src=\"https://img.shields.io/github/v/release/Maskviva/crossbind?color=334155\" alt=\"Release\"></a>\n  <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/license-Apache--2.0-blue\" alt=\"Apache-2.0\"></a>\n  <img src=\"https://img.shields.io/badge/Pier-26.20.1-62B47A\" alt=\"Pier 26.20.1\">\n  <img src=\"https://img.shields.io/badge/LeviLamina-26.20.4-8B5CF6\" alt=\"LeviLamina 26.20.4\">\n</p>\n\ncrossbind 在字节层拦下每一个数据包，按版本差异逐字段改写，然后放行。服务端本身完全不\n知道客户端是别的版本。思路和 ViaVersion 一样，只是跑在基岩版上。\n\n它是一个 [Pier](https://github.com/Maskviva/pier) 模组，用 Rust 写。\n\n## 安装\n\n用 [lip](https://lip.futrime.com)：\n\n```bash\nlip install github.com/Maskviva/crossbind\n```\n\n或者把发布压缩包解压到 `mods/crossbind/`。\n\n需要先装好 [Pier](https://github.com/Maskviva/pier) 26.20.1，它是让 LeviLamina 能装载\nRust 模组的装载器。没有它，crossbind 根本不会被扫到。\n\n装上之后不需要配置。服务端启动时它会打印自己认得哪些版本，之后按连进来的客户端自动选\n翻译链。\n\n## 覆盖范围\n\n**能互通的版本**，任意两两组合：\n\n|   协议 | Minecraft |\n|-----:|-----------|\n| 2169 | 1.26.45   |\n| 2168 | 1.26.40   |\n| 1001 | 1.26.30   |\n|  975 | 1.26.20   |\n|  944 | 1.26.10   |\n|  924 | 1.26.0    |\n|  898 | 1.21.130  |\n|  860 | 1.21.124  |\n|  859 | 1.21.120  |\n\n相邻版本各有一个双向翻译步骤，不相邻的走链式串联——v859 的客户端连 v2169 的服务端会\n经过八跳。\n\n**认得但翻译不了的版本**：844 / 827 / 819 / 818 / 800 / 786 / 776 / 766 / 748 / 729。\n它们只在版本表里登记了名字，用来把拒绝理由说清楚，没有翻译逻辑。往下扩每加一个版本，\n都需要那一档边界上确切的线格式差异，而那不是读代码能读出来的。\n\n## 它做不到什么\n\n**不改服务端行为。** 客户端看到的世界仍然是服务端那个版本生成的。新版本才有的方块，在\n旧客户端上是它翻译得到的最接近的那个，不是原样。\n\n**不能凭空造出不存在的东西。** 一条 v2169 才有的配方，在 v1001 的客户端上会被整条丢\n掉，而不是变成一条半对的配方。丢弃是有意的：一条形状对不上的配方会让客户端的合成界面\n错乱，而少一条配方只是少一条。\n\n**翻译不了的版本就是进不来。** 那时客户端看到的是正常的版本不匹配提示，和没装\ncrossbind 时一样。\n\n## 架构\n\n```\ncrates/\n  bedrock-codec       线格式的读写：primitives、item、nbt、commands 等类型编解码\n  bedrock-protocol    版本图、包 id 表、翻译步骤\n  crossbind-mod       Pier 模组本体：挂上数据包拦截，按连接选翻译链\n```\n\n`bedrock-protocol` 里的两个目录分工是硬的：\n\n- **`steps/`** 只放协议转换逻辑。一个目录一个版本对，目录里按数据包分文件，`mod.rs`\n  只做注册、不含任何转换。\n- **`convert/`** 放被 steps 调用的转换工具。它们不注册任何包，也不认识版本图。\n\n数据表不放代码里。`data/*.tsv` 用 `include_str!` 读进来，代码侧只有解析和索引。\n\n## 从源码构建\n\n```bash\ncargo build --release -p crossbind-mod                    # 服务端\ncargo build --release -p crossbind-mod --features client  # 客户端\n```\n\n产物是 `target/release/crossbind.dll`，和 `manifest.json` 一起放进 `mods/crossbind/`。\n\n`client` 只置模组 vtable 里 `mod_flags` 的一位，不增删任何 API，所以同一份源码两个目标\n都编得过；装错目标会在 Pier 的握手阶段被明确拒绝。\n\n```bash\ncargo test -p bedrock-codec -p bedrock-protocol\n```\n\n翻译步骤的测试是往返式的：构造一个版本的字节，翻过去再翻回来，比对是否一致。协议转换\n器最容易出的错是「翻过去看起来对，翻回来少了一个字段」，只有往返能抓到。\n\n## 参与开发\n\n`devdocs/` 有各 crate 的说明和 `ADDING-A-VERSION.md`。\n\n## 许可\n\nApache-2.0，见 [LICENSE](LICENSE)。\n"}],"gallery":[],"variants":[{"label":"","versions":["0.2.1","0.2.0","0.2.0-fix"]}],"versions":[{"version":"0.2.1","prerelease":false,"released":"2026-09-08T12:52:22Z","releaseUrl":"https://github.com/Maskviva/CrossBind/releases/tag/v0.2.1","manifestUrl":"https://github.com/Maskviva/CrossBind/blob/v0.2.1/tooth.json","info":{"name":"crossbind","description":"Lets Bedrock clients on a different protocol version join the server, by translating packets in both directions.","tags":["platform:levilamina","type:mod"],"avatar_url":""},"variants":[{"label":"","platform":"win-x64","dependencies":{"github.com/LiteLDev/LeviLamina":"26.32.0","github.com/Maskviva/pier":"26.32.2"},"leviLamina":"26.32.0","install":"lip install github.com/Maskviva/CrossBind@0.2.1"}]},{"version":"0.2.0","prerelease":false,"released":"2026-09-03T11:21:20Z","releaseUrl":"https://github.com/Maskviva/CrossBind/releases/tag/v0.2.0","manifestUrl":"https://github.com/Maskviva/CrossBind/blob/v0.2.0/tooth.json","info":{"name":"crossbind","description":"Lets Bedrock clients on a different protocol version join the server, by translating packets in both directions.","tags":["platform:levilamina","type:mod"],"avatar_url":""},"variants":[{"label":"","platform":"win-x64","dependencies":{"github.com/LiteLDev/LeviLamina":"26.20.4","github.com/Maskviva/pier":"26.20.1"},"leviLamina":"26.20.4","install":"lip install github.com/Maskviva/CrossBind@0.2.0"}]},{"version":"0.2.0-fix","prerelease":false,"released":"2026-09-07T08:17:54Z","releaseUrl":"https://github.com/Maskviva/CrossBind/releases/tag/v0.2.0-fix","manifestUrl":"https://github.com/Maskviva/CrossBind/blob/v0.2.0-fix/tooth.json","info":{"name":"crossbind","description":"Lets Bedrock clients on a different protocol version join the server, by translating packets in both directions.","tags":["platform:levilamina","type:mod"],"avatar_url":""},"variants":[{"label":"","platform":"win-x64","dependencies":{"github.com/LiteLDev/LeviLamina":"26.20.4","github.com/Maskviva/pier":"26.20.1"},"leviLamina":"26.20.4","install":"lip install github.com/Maskviva/CrossBind@0.2.0-fix"}]}],"dependencies":{"github.com/liteldev/levilamina":{"tooth":"github.com/LiteLDev/LeviLamina","name":"LeviLamina","owner":"LiteLDev","url":"https://levimc.org/mods/github.com/LiteLDev/LeviLamina/"},"github.com/maskviva/pier":{"tooth":"github.com/Maskviva/Pier","name":"Pier","owner":"Maskviva","url":"https://levimc.org/mods/github.com/Maskviva/Pier/"}},"requiredBy":[]}