这是对 Minecraft 中 RFC 1149 “关于使用禽类载体传输 IP 数据报的标准” 的实现。

数据包由鸡在方块之间物理携带。它们无法飞行、难以穿越障碍或抵御怪物攻击的特性,复现了真实 IP 网络中的丢包和延迟现象——障碍物、水域、怪物以及玩家的不小心攻击都成为了合法的故障来源。
这个 Forge 模组本质上是一个玩笑。其次,它是一个动手实验沙盒,用于思考当基于物理而非光纤运行时,有损网络、前向纠错和重传协议的实际表现。
它添加了什么
| 概念 |
RFC 1149 术语 |
CluckNet 实现 |
| 发送端主机 |
源网关 |
数据包发送器方块(红色顶部) |
| 接收端主机 |
目标网关 |
数据包接收器方块(蓝色顶部) |
| 数据报 |
IP 数据报 |
鸡身上的 CompoundTag 载荷 |
| 禽类载体 |
载体 |
数据包鸡实体 |
| MTU(最大传输单元) |
1500 字节 |
16 字节(故意设小以便观察分块效果) |
| ACK / NACK |
TCP 确认 |
一只携带缺失块索引的返回鸡 |
| 前向纠错 |
(RFC 1149 中无此概念) |
每条消息包含一个 XOR 奇偶校验块 |
如何使用(60秒版)
- 在鸡可以行走的路径上放置一个数据包发送器和一个数据包接收器(最大步长1个方块,路径中间不能有水)。
- 潜行右键点击接收器,然后潜行右键点击发送器——它们现在已链接。
- 在书与笔中写入一条消息(不要签署),并将其放入发送器的 GUI 中。
- 观看鸡带着你数据包的分块在世界中行走。
- 重组成功后,接收器会交还给你一本**-written book**。
- 如果一只鸡死亡,你会得到一个带有丢失块预览的纸页物品。如果太多鸡死亡,会自动发送一只 NACK 鸡,发送器将重传缺失的分块。
执行 /clucknet stats 可打印全局数据包计数器(数据 / 奇偶校验 / 重传 / NACK / 损失的鸡)。
为什么特指鸡?
- 鸡不会飞。它们只能滑翔,会被 1.5 格高的台阶卡住,在水中淹死,也会被狼杀死。
- 发送器和接收器之间 13 格的步行距离是主要的吞吐量瓶颈,也是持续丢包的来源——这正是你所期望的最佳交付底层网络所具备的特性。
交付语义
接收方遵循类似 TCP 的交付机制:一旦有足够的分块到达以重建消息,消息即被交付。 它不会等待所有预期的鸡。
- 所有 N 个数据分块到达 → 重建并交付。迟到的奇偶校验块作为冗余被静默丢弃。
- N − 1 个数据分块 + 奇偶校验块到达 → XOR 恢复缺失的分块并交付。任何后续到达的同一消息的数据分块都被丢弃。
- 60 秒内到达的数量不足 → 广播
incomplete;消息 ID 会在另外 60 秒内被记住,以免将非常晚到的分块误认为是新消息。
这种权衡带来的视觉效果是:聊天消息通常出现在所有鸡走完之前。迟到的鸡随后到达,被识别为冗余并被静默丢弃。这是网络以最大吞吐量运行的表现。
要求
- Minecraft 1.20.6
- Minecraft Forge 50.1.x
- Java 21(如果缺失,Gradle 会在首次运行时下载)
CluckNet 目前仅针对 1.20.6 / Forge。欢迎提交 PR 移植到 1.20.1 (Forge) 或 1.21.x (NeoForge) —— 详情请参阅 GitHub 仓库。
更多
- 完整 README、协议细节、故障排除:
- 源代码 / 问题反馈:
- 背景资料: RFC 1149 (1990-04-01) 和 RFC 2549 (1999-04-01)。
许可证
MIT。请参阅 LICENSE。
An implementation of RFC 1149 "A Standard for the Transmission of IP Datagrams on Avian Carriers" for Minecraft.

Packets are physically carried between blocks by chickens. Their natural inability to fly, navigate obstacles, or survive mob attacks reproduces real IP-style packet loss and latency — obstacles, water, mobs and accidental player attacks all become legitimate sources of network failure.
This Forge mod is, primarily, a joke. It is secondarily a hands-on sandbox for thinking about how lossy networks, forward error correction, and retransmission protocols actually behave when they run on top of physics instead of fiber.
What it adds
| Concept |
RFC 1149 term |
CluckNet realisation |
| Sender host |
Origin gateway |
Packet Sender block (red top) |
| Receiver host |
Destination gateway |
Packet Receiver block (blue top) |
| Datagram |
IP datagram |
CompoundTag payload on a chicken |
| Avian carrier |
Carrier |
Packet Chicken entity |
| MTU |
1500 bytes |
16 bytes (small on purpose so chunking is visible) |
| ACK / NACK |
TCP ACK |
A return chicken with packed missing-chunk indices |
| Forward error correction |
(none in RFC 1149) |
One XOR parity chunk per message |
How to use it (60-second version)
- Place a Packet Sender and a Packet Receiver somewhere a chicken can walk between (1-block step max, no water across the path).
- Sneak-right-click the Receiver, then sneak-right-click the Sender — they are now linked.
- Write a message in a Book and Quill (do not sign it) and drop it into the Sender's GUI.
- Watch chickens walk across the world carrying chunks of your packet.
- The Receiver hands you back a Written Book when reassembly succeeds.
- If a chicken dies, you get a paper item with the lost chunk's preview. If too many die, a NACK chicken is automatically sent back and the Sender retransmits the missing chunks.
/clucknet stats prints process-wide packet counters (data / parity / retransmit / NACK / chickens lost).
Why chickens specifically?
- Chickens cannot fly. They glide, get stuck on 1.5-block ledges, drown in water, and die to wolves.
- A 13-block walk between sender and receiver is the throughput bottleneck and a constant source of dropped packets — exactly what you want from a best-effort delivery substrate.
Delivery semantics
The receiver follows TCP-like delivery: a message is delivered as soon as enough chunks have arrived to reconstruct it. It does not wait for every expected chicken.
- All N data chunks arrive → reconstruct & deliver. Late parity chunk silently dropped as redundant.
- N − 1 data chunks + parity arrive → XOR-recover the missing chunk & deliver. Any later-arriving data chunk for the same message is dropped.
- Fewer than enough within 60 s → broadcast
incomplete; the message ID is remembered for another 60 s so very-late chunks are not mistaken for a new message.
The trade-off: visually, the chat message often appears before all the chickens have walked in. The late chickens then arrive, are recognised as redundant, and are silently dropped. This is the network operating at maximum throughput.
Requirements
- Minecraft 1.20.6
- Minecraft Forge 50.1.x
- Java 21 (Gradle downloads it on first run if missing)
CluckNet currently targets 1.20.6 / Forge only. Ports to 1.20.1 (Forge) or 1.21.x (NeoForge) as PRs are welcome — see the GitHub repository for details.
More
- Full README, protocol details, troubleshooting:
- Source / issues:
- Background: RFC 1149 (1990-04-01) and RFC 2549 (1999-04-01).
License
MIT. See LICENSE.
评论 0
登录后参与评分
还没有评论,来抢沙发吧