format the code
This commit is contained in:
@ -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.
|
@ -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
|
||||||
|
@ -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 //饱食度
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
// Useage: go run cmd/ping/ping.go localhost
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Reference in New Issue
Block a user