theoparis / zigmcp

A Minecraft protocol implementation in Zig

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zigmcp

A Minecraft (Java Edition) protocol implementation in Zig. Currently supports 1.20.4 (765). Contains the protocol implementation, and a static and dynamic NBT implementation. Depends on tensorush/zig-uuid and PrismarineJS/minecraft-data.

Currently, many parts of this are probably untested. Several parts of protocol implementation probably should be reworked, and perhaps put into separate parts of the library for easier use. Several things may be hardcoded using information only found from the data generators, and it would be nice if they were a little less hardcoded, although obtaining that data automatically through a zig build may be annoying to implement (and annoying for any user of this library).

I used these sources a lot in this:

Check out the examples/ directory for some example usage. Should only need a zig build run in the corresponding folder to run.

  • statusserver: a simple server that displays a server status in the server list.
  • sniff: a proxy that tracks connection state and displays packet ids sent between server and client. make sure client and server are 1.20.4, and online-mode=false and network-compression-threshold=-1 because I haven't implemented compression or encryption.

About

A Minecraft protocol implementation in Zig


Languages

Language:Zig 100.0%