format the code

This commit is contained in:
Tnze
2019-05-29 21:34:58 +08:00
parent ec50ada707
commit 778caf1a40
4 changed files with 4 additions and 3 deletions

View File

@ -24,7 +24,7 @@ Some examples are at `/cmd` folder.
# Getting start # Getting start
After you install golang tools: After you install golang tools:
- Run `go run cmd/ping/ping.go` to ping and list the Miaoscraft mc-server. - 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. - 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 infomation about how to create your own robot.

View File

@ -124,7 +124,7 @@ func (c *Client) handlePacket(p pk.Packet) (disconnect bool, err error) {
case data.NamedSoundEffect: case data.NamedSoundEffect:
err = handleNamedSoundEffect(c, p) err = handleNamedSoundEffect(c, p)
default: default:
// fmt.Printf("ignore pack id %X\n", p.ID) // fmt.Printf("ignore pack id %X\n", p.ID)
} }
return return

View File

@ -11,7 +11,7 @@ type Player struct {
Yaw, Pitch float32 Yaw, Pitch float32
OnGround bool OnGround bool
HeldItem int //拿着的物品栏位 HeldItem int //拿着的物品栏位
Health float32 //血量 Health float32 //血量
Food int32 //饱食度 Food int32 //饱食度

View File

@ -1,3 +1,4 @@
// Useage: go run cmd/ping/ping.go localhost
package main package main
import ( import (