This commit is contained in:
Tnze
2022-11-16 23:32:33 +08:00
parent 59f946302b
commit 64667826d0
11 changed files with 22 additions and 21 deletions

View File

@ -15,6 +15,7 @@ type Block interface {
}
// This file stores all possible block states into a TAG_List with gzip compressed.
//
//go:embed block_states.nbt
var blockStates []byte

View File

@ -39,7 +39,6 @@ func NewEncoder(w io.Writer) *Encoder {
// expect `[]int8`, `[]int32`, `[]int64`, `[]uint8`, `[]uint32` and `[]uint64`,
// which TagByteArray, TagIntArray and TagLongArray.
// To force encode them as TagList, add a struct field tag.
//
func (e *Encoder) Encode(v interface{}, tagName string) error {
t, val := getTagType(reflect.ValueOf(v))
return e.marshal(val, t, tagName)

View File

@ -136,6 +136,7 @@ func (d *Dialer) DialMCContext(ctx context.Context, addr string) (*Conn, error)
// - now+Timeout
// - d.Deadline
// - the context's deadline
//
// Or zero, if none of Timeout, Deadline, or context's deadline is set.
//
// Copied from net/dial.go

View File

@ -9,6 +9,7 @@ func (r *Realms) Available() (ok bool, err error) {
}
// Compatible returns whether the clients version is up to date with Realms.
//
// if the client is outdated, it returns OUTDATED,
// if the client is running a snapshot, it returns OTHER,
// else it returns COMPATIBLE.

View File

@ -14,7 +14,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"strings"
@ -153,7 +152,7 @@ func authentication(name, hash string) (*Resp, error) {
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}