升级到1.14.4
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
# Go-MC
|
||||

|
||||

|
||||

|
||||

|
||||
[](https://godoc.org/github.com/Tnze/go-mc)
|
||||
[](https://goreportcard.com/report/github.com/Tnze/go-mc)
|
||||
[](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.
|
@ -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))
|
||||
|
@ -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.
|
||||
|
@ -35,6 +35,7 @@ func init() {
|
||||
|
||||
const blockStatesLen = 11270 + 1
|
||||
|
||||
// TODO: check updates of block status
|
||||
var blockStatesJSON = `
|
||||
{
|
||||
"minecraft:air": {
|
||||
|
@ -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{
|
||||
|
@ -17,6 +17,7 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: check updates itemIDS
|
||||
var itemIDsJSON = ` {
|
||||
"minecraft:air": {
|
||||
"protocol_id": 0
|
||||
|
@ -98,7 +98,8 @@ const (
|
||||
EntityProperties
|
||||
EntityEffect
|
||||
DeclareRecipes
|
||||
Tags //0x5B
|
||||
Tags
|
||||
AcknowledgePlayerDigging //0x5C
|
||||
)
|
||||
|
||||
// Serverbound packet IDs
|
||||
|
@ -1,5 +1,7 @@
|
||||
package data
|
||||
|
||||
//TODO: check updates sound names
|
||||
|
||||
//SoundNames match the sound IDs' name
|
||||
var SoundNames = []string{
|
||||
"ambient.cave",
|
||||
|
Reference in New Issue
Block a user