v662

package
v0.0.0-...-1aae147 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ItemVersion is the version of items of the game which use for downgrading and upgrading.
	ItemVersion = 181
	// BlockVersion is the version of blocks (states) of the game. This version is composed
	// of 4 bytes indicating a version, interpreted as a big endian int. The current version represents
	// 1.20.70.0
	BlockVersion int32 = (1 << 24) | (20 << 16) | (70 << 8)
)

Variables

This section is empty.

Functions

func ProtoDowngrade

func ProtoDowngrade(pks []packet.Packet) []packet.Packet

func ProtoUpgrade

func ProtoUpgrade(pks []packet.Packet) []packet.Packet

Types

type Protocol

type Protocol struct {
	// contains filtered or unexported fields
}

func New

func New(direct bool) *Protocol

func (Protocol) ConvertFromLatest

func (p Protocol) ConvertFromLatest(pk packet.Packet, conn *minecraft.Conn) []packet.Packet

func (Protocol) ConvertToLatest

func (p Protocol) ConvertToLatest(pk packet.Packet, conn *minecraft.Conn) []packet.Packet

func (Protocol) Encryption

func (Protocol) Encryption(key [32]byte) packet.Encryption

func (Protocol) ID

func (Protocol) ID() int32

func (Protocol) NewReader

func (Protocol) NewReader(r minecraft.ByteReader, shieldID int32, enableLimits bool) protocol.IO

func (Protocol) NewWriter

func (Protocol) NewWriter(w minecraft.ByteWriter, shieldID int32) protocol.IO

func (Protocol) Packets

func (Protocol) Packets(listener bool) packet.Pool

func (Protocol) Ver

func (Protocol) Ver() string

type Reader

type Reader struct {
	*protocol.Reader
}

func NewReader

func NewReader(r *protocol.Reader) *Reader

func (*Reader) PlayerInventoryAction

func (r *Reader) PlayerInventoryAction(x *protocol.UseItemTransactionData)

func (*Reader) Reads

func (*Reader) Reads() bool

func (*Reader) Recipe

func (r *Reader) Recipe(x *protocol.Recipe)

Recipe reads a Recipe from the reader.

func (*Reader) StackRequestAction

func (r *Reader) StackRequestAction(x *protocol.StackRequestAction)

func (*Reader) TransactionDataType

func (r *Reader) TransactionDataType(x *protocol.InventoryTransactionData)

type Writer

type Writer struct {
	*protocol.Writer
}

func NewWriter

func NewWriter(w *protocol.Writer) *Writer

func (*Writer) PlayerInventoryAction

func (w *Writer) PlayerInventoryAction(x *protocol.UseItemTransactionData)

PlayerInventoryAction writes a PlayerInventoryAction.

func (*Writer) Recipe

func (w *Writer) Recipe(x *protocol.Recipe)

Recipe writes a Recipe to the writer.

func (*Writer) StackRequestAction

func (w *Writer) StackRequestAction(x *protocol.StackRequestAction)

func (*Writer) TransactionDataType

func (w *Writer) TransactionDataType(x *protocol.InventoryTransactionData)

func (*Writer) Writes

func (*Writer) Writes() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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