denis 946ba44d3c
Some checks failed
Go / Test (1.22) (push) Successful in 9m59s
Go / Test (^1.22) (push) Successful in 10m49s
CodeQL / Analyze (go) (push) Failing after 37s
Use string for the content, instead of chat.Message, since it is plain.
2026-01-11 01:17:21 -05:00
2026-01-10 12:55:09 -05:00
2026-01-10 12:55:09 -05:00
2026-01-10 12:55:09 -05:00
2026-01-10 12:55:09 -05:00
2022-11-26 20:37:57 +08:00
2023-04-05 19:35:20 +08:00
2026-01-10 12:55:09 -05:00
2021-12-28 10:51:51 +03:00
2026-01-10 12:55:09 -05:00
2023-04-05 14:15:11 +08:00
2019-09-10 09:06:56 +08:00
2026-01-10 12:55:09 -05:00

Go-MC

Version Go Reference Go Report Card Discord

教程 · Tutorial

文档 · Documents

Require Go version: 1.22

There's some library in Go support you to create your Minecraft client or server.
这是一些Golang库用于帮助你编写自己的Minecraft客户端或服务器。

  • 👍 Minecraft network protocol
  • 👍 Robot framework
  • 👍 Server framework
  • 👍 Dual role RCON protocol (Server & Client)
  • 👍 Chat Message (Support both Json and old § format)
  • 👍 NBT (Based on reflection)
  • 👌 SNBT ⇋ NBT
  • 👍 Regions & Chunks & Blocks
  • Yggdrasil (Mojang login)
  • Realms Server

We don't promise that API is 100% backward compatible.

Getting start

Go-MC tag the old version after new version released. For example, if 1.19.4 is the latest Minecraft version, the newest go-mc tag will be v1.19.3. To get the latest Go-MC that support 1.19.4, usually you must use go get -u git.qilk.de/denis/go-mc@master. Special cases are version like 1.19, the Go-MC support it is tagged v1.19.0 to avoid automatically upgrade.

Examples:
To get the latest version: go get git.qilk.de/denis/go-mc@master
To get old versions (e.g. 1.18.2): go get git.qilk.de/denis/go-mc@v1.18.2 To get the first of each primary version: go get git.qilk.de/denis/go-mc@v1.19.0

Run Examples

  • Run go run git.qilk.de/denis/go-mc/examples/mcping localhost to ping and list the localhost mc server.
  • Run go run git.qilk.de/denis/go-mc/examples/daze to join the local server at localhost:25565 as player named Daze on the offline mode.
Languages
Go 98.4%
Java 1.6%