Documentation ¶
Index ¶
- Constants
- func ProtoDowngrade(pks []packet.Packet) []packet.Packet
- func ProtoUpgrade(pks []packet.Packet) []packet.Packet
- type Protocol
- func (p Protocol) ConvertFromLatest(pk packet.Packet, conn *minecraft.Conn) []packet.Packet
- func (p Protocol) ConvertToLatest(pk packet.Packet, conn *minecraft.Conn) []packet.Packet
- func (Protocol) Encryption(key [32]byte) packet.Encryption
- func (Protocol) ID() int32
- func (Protocol) NewReader(r minecraft.ByteReader, shieldID int32, enableLimits bool) protocol.IO
- func (Protocol) NewWriter(w minecraft.ByteWriter, shieldID int32) protocol.IO
- func (Protocol) Packets(listener bool) packet.Pool
- func (Protocol) Ver() string
- type Reader
- type Writer
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 ¶
Types ¶
type Protocol ¶
type Protocol struct {
// contains filtered or unexported fields
}
func (Protocol) ConvertFromLatest ¶
func (Protocol) ConvertToLatest ¶
func (Protocol) Encryption ¶
func (Protocol) Encryption(key [32]byte) packet.Encryption
type Reader ¶
func (*Reader) PlayerInventoryAction ¶
func (r *Reader) PlayerInventoryAction(x *protocol.UseItemTransactionData)
func (*Reader) StackRequestAction ¶
func (r *Reader) StackRequestAction(x *protocol.StackRequestAction)
func (*Reader) TransactionDataType ¶
func (r *Reader) TransactionDataType(x *protocol.InventoryTransactionData)
type Writer ¶
func (*Writer) PlayerInventoryAction ¶
func (w *Writer) PlayerInventoryAction(x *protocol.UseItemTransactionData)
PlayerInventoryAction writes a PlayerInventoryAction.
func (*Writer) StackRequestAction ¶
func (w *Writer) StackRequestAction(x *protocol.StackRequestAction)
func (*Writer) TransactionDataType ¶
func (w *Writer) TransactionDataType(x *protocol.InventoryTransactionData)
Click to show internal directories.
Click to hide internal directories.