go fmt
This commit is contained in:
@ -15,6 +15,7 @@ type Block interface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This file stores all possible block states into a TAG_List with gzip compressed.
|
// This file stores all possible block states into a TAG_List with gzip compressed.
|
||||||
|
//
|
||||||
//go:embed block_states.nbt
|
//go:embed block_states.nbt
|
||||||
var blockStates []byte
|
var blockStates []byte
|
||||||
|
|
||||||
|
@ -39,7 +39,6 @@ func NewEncoder(w io.Writer) *Encoder {
|
|||||||
// expect `[]int8`, `[]int32`, `[]int64`, `[]uint8`, `[]uint32` and `[]uint64`,
|
// expect `[]int8`, `[]int32`, `[]int64`, `[]uint8`, `[]uint32` and `[]uint64`,
|
||||||
// which TagByteArray, TagIntArray and TagLongArray.
|
// which TagByteArray, TagIntArray and TagLongArray.
|
||||||
// To force encode them as TagList, add a struct field tag.
|
// To force encode them as TagList, add a struct field tag.
|
||||||
//
|
|
||||||
func (e *Encoder) Encode(v interface{}, tagName string) error {
|
func (e *Encoder) Encode(v interface{}, tagName string) error {
|
||||||
t, val := getTagType(reflect.ValueOf(v))
|
t, val := getTagType(reflect.ValueOf(v))
|
||||||
return e.marshal(val, t, tagName)
|
return e.marshal(val, t, tagName)
|
||||||
|
@ -136,6 +136,7 @@ func (d *Dialer) DialMCContext(ctx context.Context, addr string) (*Conn, error)
|
|||||||
// - now+Timeout
|
// - now+Timeout
|
||||||
// - d.Deadline
|
// - d.Deadline
|
||||||
// - the context's deadline
|
// - the context's deadline
|
||||||
|
//
|
||||||
// Or zero, if none of Timeout, Deadline, or context's deadline is set.
|
// Or zero, if none of Timeout, Deadline, or context's deadline is set.
|
||||||
//
|
//
|
||||||
// Copied from net/dial.go
|
// Copied from net/dial.go
|
||||||
|
@ -9,6 +9,7 @@ func (r *Realms) Available() (ok bool, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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,
|
||||||
// else it returns COMPATIBLE.
|
// else it returns COMPATIBLE.
|
||||||
|
@ -14,7 +14,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -153,7 +152,7 @@ func authentication(name, hash string) (*Resp, error) {
|
|||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
|
|
||||||
body, err := ioutil.ReadAll(resp.Body)
|
body, err := io.ReadAll(resp.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user