messages

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Router = router{
	// contains filtered or unexported fields
}

Functions

func Encode added in v1.38.0

func Encode(msg *Message) []byte

Types

type Close added in v1.33.1

type Close struct {
	Type string
	ID   string
}

close self

type ConnectState added in v1.31.1

type ConnectState int
const (
	ConnectStateBegin ConnectState = iota + 1
	ConnectStateListening
	ConnectStateServerConnecting
	ConnectStateReceivingResources
	ConnectStateEstablished
	ConnectStateDone
)

type ConnectStateUpdate added in v1.39.0

type ConnectStateUpdate struct {
	ListenIP   string
	ListenPort int
	State      ConnectState
}

type DownloadedPack added in v1.28.1

type DownloadedPack struct {
	Path string
	Err  error
}

type Error added in v1.33.1

type Error error

type ExitSubcommand added in v1.33.1

type ExitSubcommand struct{}

type Features added in v1.38.0

type Features struct {
	Request  bool
	Features []string
}

type FinishedPack added in v1.31.1

type FinishedPack struct {
	Pack resource.Pack
}

type FinishedSavingWorld added in v1.39.1

type FinishedSavingWorld struct {
	World *SavedWorld
}

type Handler added in v1.33.1

type Handler interface {
	HandleMessage(msg *Message) *Message
}

type HandlerFunc

type HandlerFunc = func(msg *Message) *Message

type HaveFinishScreen added in v1.33.1

type HaveFinishScreen struct{}

type InitialPacksInfo added in v1.29.0

type InitialPacksInfo struct {
	Packs    []protocol.TexturePackInfo
	OnlyKeys bool
}

type Invalidate added in v1.39.1

type Invalidate struct{}

type MapLookup added in v1.32.0

type MapLookup struct {
	Lookup *image.RGBA
}

type Message added in v1.33.1

type Message struct {
	Source string
	Target string
	Data   any
}

func Decode added in v1.38.0

func Decode(bytes []byte) (*Message, error)

type NewSkin

type NewSkin struct {
	PlayerName string
	Skin       *protocol.Skin
}

type PackDownloadProgress added in v1.29.0

type PackDownloadProgress struct {
	UUID      string
	LoadedAdd uint64
}

type PlayerPosition added in v1.34.3

type PlayerPosition struct {
	Position mgl32.Vec3
}

type ProcessingPack added in v1.31.1

type ProcessingPack struct {
	ID         string
	Processing bool
	Path       string
	Err        error
}

type ProcessingWorldUpdate added in v1.39.1

type ProcessingWorldUpdate struct {
	Name  string
	State string
}

type RequestLogin added in v1.39.0

type RequestLogin struct {
	Wait bool
}

type SavedWorld added in v1.30.0

type SavedWorld struct {
	Name     string
	Path     string
	Chunks   int
	Entities int
	Image    image.Image
}

type SetValue added in v1.38.0

type SetValue struct {
	Name  string
	Value string
}

type ShowPopup added in v1.33.1

type ShowPopup struct {
	Popup any
}

type StartSubcommand added in v1.33.1

type StartSubcommand struct {
	Command  any
	CtxKey   any
	CtxValue any
}

type UIState

type UIState int
const (
	UIStateInvalid UIState = iota
	UIStateMain
	UIStateFinished
)

type UpdateAvailable added in v1.30.0

type UpdateAvailable struct {
	Version string
}

type UpdateMap

type UpdateMap struct {
	Chunks        map[protocol.ChunkPos]*image.RGBA
	UpdatedChunks []protocol.ChunkPos
	ChunkCount    int
	Rotation      float32
}

Jump to

Keyboard shortcuts

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