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

Method TextComponent

protocol/net/io/encoding/reader.go:250–263  ·  view source on GitHub ↗
(comp *text.TextComponent)

Source from the content-addressed store, hash-verified

248}
249
250func (r Reader) TextComponent(comp *text.TextComponent) error {
251 var tag int8
252 if err := r.Byte(&tag); err != nil {
253 return err
254 }
255 switch tag {
256 case nbt.String:
257 return r.nbtString(&comp.Text)
258 case nbt.Compound:
259 return r.NBT(comp)
260 default:
261 return fmt.Errorf("invalid text component root compound")
262 }
263}
264
265func (r Reader) nbtString(v *string) error {
266 var stringlen int16

Callers 15

decodeFunction · 0.45
EncodeMethod · 0.45
DecodeMethod · 0.45
EncodeMethod · 0.45
DecodeMethod · 0.45
EncodeMethod · 0.45
EncodeMethod · 0.45
DecodeMethod · 0.45
EncodeMethod · 0.45
DecodeMethod · 0.45
EncodeMethod · 0.45
DecodeMethod · 0.45

Calls 3

ByteMethod · 0.95
nbtStringMethod · 0.95
NBTMethod · 0.95

Tested by

no test coverage detected