fix typo
This commit is contained in:
@ -118,7 +118,7 @@ for i := 0; i < int(WorldCount); i++ {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
But this is tediously long an not compatible with `p.Scan()` method.
|
But this is tediously long and not compatible with `p.Scan()` method.
|
||||||
|
|
||||||
In the latest version, two new types is added: `pk.Ary` and `pk.Opt`. Dedicated to handling "Array of ...." and "
|
In the latest version, two new types is added: `pk.Ary` and `pk.Opt`. Dedicated to handling "Array of ...." and "
|
||||||
Optional ...." fields.
|
Optional ...." fields.
|
||||||
|
@ -20,7 +20,7 @@ func ExamplePingAndList() {
|
|||||||
|
|
||||||
func ExampleClient_JoinServer_offline() {
|
func ExampleClient_JoinServer_offline() {
|
||||||
c := NewClient()
|
c := NewClient()
|
||||||
c.Auth.Name = "Tnze" // set it's name before login.
|
c.Auth.Name = "Tnze" // set its name before login.
|
||||||
|
|
||||||
id := offline.NameToUUID(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[:])
|
c.Auth.UUID = hex.EncodeToString(id[:])
|
||||||
|
@ -21,7 +21,7 @@ type registry struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//go:embed registries.json
|
//go:embed registries.json
|
||||||
var registeriesJson []byte
|
var registersJson []byte
|
||||||
|
|
||||||
//go:embed template.go.tmpl
|
//go:embed template.go.tmpl
|
||||||
var tempSource string
|
var tempSource string
|
||||||
@ -45,7 +45,7 @@ var temp = template.Must(template.
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var registries map[string]registry
|
var registries map[string]registry
|
||||||
if err := json.Unmarshal(registeriesJson, ®istries); err != nil {
|
if err := json.Unmarshal(registersJson, ®istries); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ const (
|
|||||||
scanContinue = iota // uninteresting byte
|
scanContinue = iota // uninteresting byte
|
||||||
scanBeginLiteral // end implied by next result != scanContinue
|
scanBeginLiteral // end implied by next result != scanContinue
|
||||||
scanBeginCompound // begin TAG_Compound (after left-brace )
|
scanBeginCompound // begin TAG_Compound (after left-brace )
|
||||||
scanBeginList // begin TAG_List (after left-brack)
|
scanBeginList // begin TAG_List (after left-bracket)
|
||||||
scanListValue // just finished read list value (after comma)
|
scanListValue // just finished read list value (after comma)
|
||||||
scanListType // just finished read list type (after "B;" or "L;")
|
scanListType // just finished read list type (after "B;" or "L;")
|
||||||
scanCompoundTagName // just finished read tag name (before colon)
|
scanCompoundTagName // just finished read tag name (before colon)
|
||||||
|
@ -2,7 +2,7 @@ package realms
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// Invite invite player to Realm
|
// Invite player to Realm
|
||||||
func (r *Realms) Invite(s Server, name, uuid string) error {
|
func (r *Realms) Invite(s Server, name, uuid string) error {
|
||||||
pl := struct {
|
pl := struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
@ -8,7 +8,7 @@ func (r *Realms) Available() (ok bool, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compatible returns whether the clients version is up to date with Realms.
|
// Compatible returns whether the clients version is up-to-date with Realms.
|
||||||
//
|
//
|
||||||
// if the client is outdated, it returns OUTDATED,
|
// if the client is outdated, it returns OUTDATED,
|
||||||
// if the client is running a snapshot, it returns OTHER,
|
// if the client is running a snapshot, it returns OTHER,
|
||||||
|
@ -23,7 +23,7 @@ func (e *Error) Error() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Domain is the URL of Realms API server
|
// Domain is the URL of Realms API server
|
||||||
// Panic if it cannot be parse by url.Parse().
|
// Panic if it cannot be parsed by url.Parse().
|
||||||
var Domain = "https://pc.realms.minecraft.net"
|
var Domain = "https://pc.realms.minecraft.net"
|
||||||
|
|
||||||
// New create a new Realms c with version, username, accessToken and UUID without dashes.
|
// New create a new Realms c with version, username, accessToken and UUID without dashes.
|
||||||
|
@ -221,7 +221,7 @@ func (r *Region) WriteSector(x, z int, data []byte) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExistSector return if a sector is exist
|
// ExistSector return if a sector is existed
|
||||||
func (r *Region) ExistSector(x, z int) bool {
|
func (r *Region) ExistSector(x, z int) bool {
|
||||||
return r.offsets[z][x] != 0
|
return r.offsets[z][x] != 0
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user