MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / StringTextComponent

Method StringTextComponent

protocol/net/io/encoding/writer.go:196–205  ·  view source on GitHub ↗
(text string)

Source from the content-addressed store, hash-verified

194}
195
196func (w Writer) StringTextComponent(text string) error {
197 if err := w.Byte(8); err != nil {
198 return err
199 }
200 if err := w.Short(int16(len(text))); err != nil {
201 return err
202 }
203
204 return w.String(text)
205}
206
207func (w Writer) NBT(data any) error {
208 enc := nbt.NewEncoder(w.w)

Callers

nothing calls this directly

Calls 3

ByteMethod · 0.95
ShortMethod · 0.95
StringMethod · 0.95

Tested by

no test coverage detected