protocol

package
v0.0.0-...-da87c54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameProfile

type GameProfile struct {
	UUID       uuid.UUID       `mc:"UUID" json:"id"`
	Name       string          `json:"name"`
	Properties []user.Property `json:"properties"`
}

func (*GameProfile) ReadFrom

func (c *GameProfile) ReadFrom(r io.Reader) (n int64, err error)

func (GameProfile) WriteTo

func (c GameProfile) WriteTo(w io.Writer) (n int64, err error)

type LpVec3

type LpVec3 struct {
	X, Y, Z float64
}

func (*LpVec3) ReadFrom

func (v *LpVec3) ReadFrom(r io.Reader) (n int64, err error)

ReadFrom 實作 io.ReaderFrom 介面

func (*LpVec3) WriteTo

func (v *LpVec3) WriteTo(w io.Writer) (n int64, err error)

WriteTo 實作 io.WriterTo 介面

type PartialProfile

type PartialProfile struct {
	Username   pk.Option[pk.String, *pk.String]
	UUID       pk.Option[pk.UUID, *pk.UUID]
	Properties []user.Property
}

func (*PartialProfile) ReadFrom

func (c *PartialProfile) ReadFrom(r io.Reader) (n int64, err error)

func (PartialProfile) WriteTo

func (c PartialProfile) WriteTo(w io.Writer) (n int64, err error)

type Position

type Position [3]int32

func (Position) Add

func (p Position) Add(other Position) Position

func (Position) Clone

func (p Position) Clone() Position

func (Position) DistanceTo

func (p Position) DistanceTo(other Position) float64

func (Position) DistanceToSquared

func (p Position) DistanceToSquared(other Position) float64

func (Position) Div

func (p Position) Div(scalar float64) Position

func (Position) Equals

func (p Position) Equals(other Position) bool

func (Position) IsZero

func (p Position) IsZero() bool

func (Position) Mul

func (p Position) Mul(scalar float64) Position

func (Position) String

func (p Position) String() string

func (Position) Sub

func (p Position) Sub(other Position) Position

type ResolvableProfile

type ResolvableProfile struct {
	Type int32 `mc:"VarInt"`
	//opt:enum:Type:0
	Partial *PartialProfile
	//opt:enum:Type:1
	GameProfile *ResolvableProfile

	Body   pk.Option[pk.Identifier, *pk.Identifier]
	Cape   pk.Option[pk.Identifier, *pk.Identifier]
	Elytra pk.Option[pk.Identifier, *pk.Identifier]
	Model  pk.Option[pk.VarInt, *pk.VarInt]
}

func (*ResolvableProfile) ReadFrom

func (c *ResolvableProfile) ReadFrom(r io.Reader) (n int64, err error)

func (ResolvableProfile) WriteTo

func (c ResolvableProfile) WriteTo(w io.Writer) (n int64, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL