A Minecraft 1.21.8 protocol server implementation written in Go.
This project implements a Minecraft server that handles the protocol handshake, login, and configuration phases. It can accept client connections and respond to Minecraft protocol requests, making it useful for testing and protocol development.
- Go 1.25.1 or later
- Just (optional, for convenient command running)
- Node.js (optional, for testing with included client scripts)
go build -o ./out/ .Or using just:
just buildStart the server listening on port 44444:
go run .Or using just:
just runRun all tests:
just testFor verbose output:
just test-vThe test suite covers:
- Protocol reading/writing (VarInt, strings, UUIDs, struct serialization)
- NBT (Named Binary Tag) format parsing
- Type utilities (MCString, VarInt, PrefixedArray)
Included are Node.js-based client scripts for testing the server:
just echo <PORT> # Simple echo client
just echo-bot <PORT> # Bot that connects and plays
just server # Start a reference servermain.go- Server entry point and connection handlinginternal/protocol/- Minecraft protocol I/O (reading/writing data types)internal/packet/- Packet definitions for different protocol statesinternal/parsers/- Protocol state managementinternal/response/- Server response packet definitionsinternal/types/- Minecraft data types (VarInt, MCString, Position, etc.)internal/nbt/- NBT format supporttest/- Testing utilities and client scripts
See LICENSE file for details.