common

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Version_1_7_10 = 5
	Version_1_8    = 47
	Version_1_9    = 107
	Version_1_9_1  = 108
	Version_1_9_2  = 109
	Version_1_9_3  = 110
	Version_1_9_4  = 111
	Version_1_10   = 210
	Version_1_11   = 315
	Version_1_11_1 = 316
	Version_1_12   = 335
	Version_1_12_1 = 338
	Version_1_12_2 = 340
	Version_1_13   = 393
	Version_1_13_1 = 401
	Version_1_13_2 = 404
	Version_1_14   = 477
	Version_1_14_1 = 480
	Version_1_14_2 = 485
	Version_1_14_3 = 490
	Version_1_14_4 = 498
	Version_1_15   = 573
	Version_1_15_1 = 575
	Version_1_15_2 = 578
	Version_1_16   = 735
	Version_1_16_1 = 736
	Version_1_16_2 = 751
	Version_1_16_3 = 753
	Version_1_16_4 = 754
	Version_1_17   = 755
	Version_1_17_1 = 756
	Version_1_18_1 = 757
	Version_1_18_2 = 758
	Version_1_19   = 759
	Version_1_19_1 = 760
	Version_1_19_2 = 760
	Version_1_19_3 = 761
	Version_1_19_4 = 762
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bound

type Bound uint8
const (
	ClientBound Bound = iota
	ServerBound
)

type PacketRegistry

type PacketRegistry interface {
	Register(state State, id common.VarInt, packet interface{})
	GetPacket(state State, id common.VarInt) any
	GetID(state State, packet interface{}) common.VarInt
}

func NewPacketRegistry

func NewPacketRegistry() PacketRegistry

Ideally we would get via something like PacketRegistry.GetPacketID(nil.(Type))

type State

type State uint8
const (
	HandshakingState State = iota
	StatusState
	LoginState
	PlayState
)

type Version

type Version uint16

Version is a type that represents the version of the protocol.

Jump to

Keyboard shortcuts

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