跳到正文

ViaVersion Recipe Fix

作者:yuna0x0

Server-side Fabric mod that prevents Fabric API recipe sync packets from crashing clients connecting via ViaVersion/ViaBackwards with older protocol versions.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

ViaVersion Recipe Fix

A server-side Fabric mod that prevents Fabric API’s recipe sync packets from crashing clients connecting via ViaVersion/ViaBackwards with non-native protocol versions.

Problem

Since Minecraft 1.21.2, vanilla no longer syncs all recipes to clients. Fabric API added an opt-in recipe sync API (fabric-recipe-api-v1) for mods that need client-side recipe data (e.g. JEI). When a server uses this alongside ViaFabric and ViaBackwards, clients on older Minecraft versions crash with:

Failed to decode packet 'clientbound/minecraft:custom_payload'
Caused by: Tried to read NBT tag that was too big

Neither ViaVersion nor ViaBackwards translates Fabric API’s custom RecipeSyncPayloadS2C packet, causing the client to misparse the data.

Solution

This mod intercepts recipe sync at the server level and skips sending the packet to players whose protocol version (detected via ViaVersion API) differs from the server’s native protocol.

Native-version clients receive recipe sync as normal.

Requirements

  • Minecraft 1.21.10+
  • Fabric Loader >=0.18.0
  • Fabric API (with fabric-recipe-api-v1)
  • ViaFabric (optional) — the mod does nothing without it but won’t crash

Building

./gradlew build

Output jar is in build/libs/.

License

MIT

常见问题

ViaVersion Recipe Fix 支持哪些 Minecraft 版本?

ViaVersion Recipe Fix 支持 Minecraft Java 版 1.21.10–26.1,共 3 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

ViaVersion Recipe Fix 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:仅服务端。

评论

登录后评论和评分

yuna0x0 的其他作品

查看全部 →