1.21.8 data
Some checks failed
CodeQL / Analyze (go) (push) Has been cancelled
Go / Test (1.22) (push) Has been cancelled
Go / Test (^1.22) (push) Has been cancelled

This commit is contained in:
2025-08-22 06:17:33 +08:00
parent 133e3fab4a
commit 0958972953
173 changed files with 13782 additions and 406 deletions

View File

@ -489,7 +489,7 @@ func NBT(v any) Field {
type NBTField struct {
V any
AllowUnknownFields bool
DisallowUnknownFields bool
}
func (n NBTField) WriteTo(w io.Writer) (int64, error) {
@ -511,7 +511,7 @@ func (n NBTField) ReadFrom(r io.Reader) (int64, error) {
cr := countingReader{r: r}
dec := nbt.NewDecoder(&cr)
dec.NetworkFormat(true)
if !n.AllowUnknownFields {
if n.DisallowUnknownFields {
dec.DisallowUnknownFields()
}
_, err := dec.Decode(n.V)