Regenerate files, moves packet id from data package

This commit is contained in:
Tnze
2021-02-18 21:29:16 +08:00
parent b4fc573118
commit ea0e0d1cae
19 changed files with 181 additions and 1379 deletions

View File

@ -3,6 +3,7 @@ package bot
import (
"encoding/hex"
"fmt"
"github.com/Tnze/go-mc/offline"
"github.com/Tnze/go-mc/yggdrasil"
"log"
)
@ -21,7 +22,7 @@ func ExampleClient_JoinServer_offline() {
c := NewClient()
c.Auth.Name = "Tnze" // set it's name before login.
id := OfflineUUID(c.Auth.Name) // optional, get uuid of offline mode game
id := offline.NameToUUID(c.Auth.Name) // optional, get uuid of offline mode game
c.Auth.UUID = hex.EncodeToString(id[:])
//Login
@ -77,7 +78,7 @@ func ExampleClient_JoinServer_online() {
}
func ExampleOfflineUUID() {
fmt.Println(OfflineUUID("Tnze"))
fmt.Println(offline.NameToUUID("Tnze"))
// output:
// c7b9eece-2f2e-325c-8da8-6fc8f3d0edb0