PacketWeave
A bounded binary transfer library for Minecraft mods, with chunk reassembly, resource limits, and permission hooks.
介绍
PacketWeave
PacketWeave is a shared library for Minecraft mods that transfer binary assets between clients and servers. Its transfer core helps mod developers split and reconstruct media, structure files, and other custom payloads with explicit resource limits.
Features
- Chunked transfers: Split files and byte arrays into indexed chunks and reconstruct chunks received out of order.
- Resource limits: Bound individual transfers, sessions per sender, total sessions, and memory use.
- Authorization hooks: Let the consuming mod check permissions when a transfer begins, receives chunks, and completes.
- Transfer cleanup: Cancel transfers, expire inactive sessions, and release state when a connection closes.
- Input checks: Reject duplicate chunks and invalid transfer geometry, detect files that change during sending, and provide SHA-256 digest utilities.
- Shared core: Use the same Java 8-compatible transfer implementation across supported loaders and Minecraft versions.
How it works
PacketWeave provides a public Java API for sending and receiving binary assets through Minecraft’s native networking. Its transfer registry assembles indexed chunks, enforces resource budgets, invokes authorization callbacks, and cleans up transfer sessions.
It runs as a library dependency, with the same transfer core packaged for each supported loader.
Platform targets
| Minecraft | Loaders |
|---|---|
| 1.16.5 | Fabric, Forge |
| 1.20.1 | Fabric, Forge |
| 1.21.1 | Fabric, NeoForge |
| 26.1.2 | Fabric, NeoForge |
Choose the native mod file matching your Minecraft version and loader. Do not install the development-only core jar as a replacement.
For mod developers
Compile against the public API, install the native PacketWeave runtime mod, and declare the required minimum version in loader metadata. Do not duplicate the public API classes inside a consuming mod. PacketWeave itself does not require Architectury API or Fabric API.
See the integration guide and API example for runtime dependency declarations, transfer limits, and adapter responsibilities.
Support and license
常见问题
PacketWeave 支持哪些 Minecraft 版本?
PacketWeave 支持 Minecraft Java 版 1.12.2–26.2,共 6 个版本,可用的加载器:Fabric / Forge / NeoForge。下载时注意选择和你游戏版本一致的文件。
PacketWeave 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
NsTut 的其他作品
查看全部 →Simply Screens
Simple screens that display images from local files or the web.
Simply Speakers
Allows players to play custom audio from a local URL in-game using a speaker block.
Industrial Contraptions Expansion: Core
A library for all IC Expansion mods
Industrial Contraptions Expansion: Generators
An FTB Industrial Contraptions addon that adds more generators.
评论
登录后评论和评分