11 Star 86 Fork 16

Tnze / go-mc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Go-MC

Version Go Reference Go Report Card Discord

教程 · Tutorial

Require Go version: 1.19

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 github.com/Tnze/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 github.com/Tnze/go-mc@master
To get old versions (e.g. 1.18.2): go get github.com/Tnze/go-mc@v1.18.2 To get the first of each primary version: go get github.com/Tnze/go-mc@v1.19.0

Run Examples

  • Run go run github.com/Tnze/go-mc/cmd/mcping localhost to ping and list the localhost mc server.
  • Run go run github.com/Tnze/go-mc/cmd/daze to join the local server at localhost:25565 as player named Daze on the offline mode.

Supported Version

As the go-mc/net package implements the minecraft network protocol, there is no update between the versions at this level. So net package actually supports any version. It's just that the ID and content of the package are different between different versions.

由于go-mc/net实现的是MC底层的网络协议,而这个协议在MC更新时其实并不会有改动,MC更新时其实只是包的ID和内容的定义发生了变化,所以net包本身是跨版本的。

MIT License Copyright (c) 2019 Tnze Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Minecraft(我的世界)各种底层功能的Go实现,可用于实现高效的纯Go服务端/客户端。 展开 收起
Go 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/Tnze/go-mc.git
git@gitee.com:Tnze/go-mc.git
Tnze
go-mc
go-mc
master

搜索帮助