升级到1.14.4

This commit is contained in:
Tnze
2019-07-20 02:13:26 +08:00
parent 2809be4542
commit a1cc368be2
8 changed files with 18 additions and 11 deletions

View File

@ -1,6 +1,6 @@
# Go-MC
![](https://img.shields.io/badge/Minecraft-1.14.3-blue.svg)
![](https://img.shields.io/badge/Protocol-490-blue.svg)
![](https://img.shields.io/badge/Minecraft-1.14.4-blue.svg)
![](https://img.shields.io/badge/Protocol-497-blue.svg)
[![GoDoc](https://godoc.org/github.com/Tnze/go-mc?status.svg)](https://godoc.org/github.com/Tnze/go-mc)
[![Go Report Card](https://goreportcard.com/badge/github.com/Tnze/go-mc)](https://goreportcard.com/report/github.com/Tnze/go-mc)
[![Build Status](https://travis-ci.org/Tnze/go-mc.svg?branch=master)](https://travis-ci.org/Tnze/go-mc)
@ -11,7 +11,7 @@ There's some library in Go support you to create your Minecraft client or server
- [x] Parse NBT
- [x] Simple MC robot lib
- [x] Mojang authenticate
- [x] Minecraft network protocal
- [x] Minecraft network protocol
- [ ] World container / encoding
bot:
@ -40,4 +40,4 @@ After you install golang tools:
- Run `go run cmd/ping/ping.go localhost` to ping and list the Miaoscraft mc-server.
- Run `go run cmd/daze/daze.go` to join local server at *localhost:25565* as Steve on offline mode.
See `/bot` folder to get more infomation about how to create your own robot.
See `/bot` folder to get more information about how to create your own robot.

View File

@ -67,7 +67,7 @@ func (c *Client) handlePacket(p pk.Packet) (disconnect bool, err error) {
err = handleSpawnPositionPacket(c, p)
case data.PlayerAbilitiesClientbound:
err = handlePlayerAbilitiesPacket(c, p)
c.conn.WritePacket(
_ = c.conn.WritePacket(
//ClientSettings packet (serverbound)
pk.Marshal(
data.ClientSettings,
@ -138,7 +138,7 @@ func handleSoundEffect(c *Client, p pk.Packet) error {
}
if c.Events.SoundPlay != nil {
c.Events.SoundPlay(
err = c.Events.SoundPlay(
data.SoundNames[SoundID], int(SoundCategory),
float64(x)/8, float64(y)/8, float64(z)/8,
float32(Volume), float32(Pitch))
@ -160,7 +160,7 @@ func handleNamedSoundEffect(c *Client, p pk.Packet) error {
}
if c.Events.SoundPlay != nil {
c.Events.SoundPlay(
err = c.Events.SoundPlay(
string(SoundName), int(SoundCategory),
float64(x)/8, float64(y)/8, float64(z)/8,
float32(Volume), float32(Pitch))

View File

@ -13,7 +13,7 @@ import (
)
// ProtocolVersion , the protocol version number of minecraft net protocol
const ProtocolVersion = 490
const ProtocolVersion = 497
// PingAndList check server status and list online player.
// Returns a JSON data with server status, and the delay.

View File

@ -35,6 +35,7 @@ func init() {
const blockStatesLen = 11270 + 1
// TODO: check updates of block status
var blockStatesJSON = `
{
"minecraft:air": {

View File

@ -1,5 +1,7 @@
package data
//TODO: check updates en_us translation
// EnUs , the default language translate data
// When update this data, replace "%[0-9]\$s" with "%[0-9]s"
var EnUs = map[string]string{

View File

@ -17,6 +17,7 @@ func init() {
}
}
//TODO: check updates itemIDS
var itemIDsJSON = ` {
"minecraft:air": {
"protocol_id": 0

View File

@ -98,7 +98,8 @@ const (
EntityProperties
EntityEffect
DeclareRecipes
Tags //0x5B
Tags
AcknowledgePlayerDigging //0x5C
)
// Serverbound packet IDs

View File

@ -1,5 +1,7 @@
package data
//TODO: check updates sound names
//SoundNames match the sound IDs' name
var SoundNames = []string{
"ambient.cave",