Versions in this module Expand all Collapse all v1 v1.20.2 Aug 8, 2023 Changes in this version + const DefaultPort + const ProtocolVersion + func PingAndList(addr string) ([]byte, time.Duration, error) + func PingAndListContext(ctx context.Context, addr string) ([]byte, time.Duration, error) + func PingAndListTimeout(addr string, timeout time.Duration) ([]byte, time.Duration, error) + type Auth struct + AsTk string + Name string + UUID string + type Client struct + Auth Auth + Conn *Conn + Events Events + LoginPlugin map[string]func(data []byte) ([]byte, error) + Name string + UUID uuid.UUID + func NewClient() *Client + func (c *Client) Close() error + func (c *Client) HandleGame() error + func (c *Client) JoinServer(addr string) (err error) + func (c *Client) JoinServerWithDialer(dialer *net.Dialer, addr string) (err error) + func (c *Client) JoinServerWithOptions(addr string, options JoinOptions) (err error) + type Conn struct + func (c *Conn) Close() error + func (c *Conn) ReadPacket(p *pk.Packet) error + func (c *Conn) WritePacket(p pk.Packet) error + type DisconnectErr chat.Message + func (d DisconnectErr) Error() string + type Events struct + func (e *Events) AddGeneric(listeners ...PacketHandler) + func (e *Events) AddListener(listeners ...PacketHandler) + type JoinOptions struct + Context context.Context + KeyPair *user.KeyPairResp + MCDialer mcnet.MCDialer + NoPublicKey bool + type LoginErr struct + Err error + Stage string + func (l LoginErr) Error() string + func (l LoginErr) Unwrap() error + type PacketHandler struct + F func(p pk.Packet) error + ID packetid.ClientboundPacketID + Priority int + type PacketHandlerError struct + Err error + ID packetid.ClientboundPacketID + func (d PacketHandlerError) Error() string + func (d PacketHandlerError) Unwrap() error + type PacketHandlerFunc func(p pk.Packet) error + type Position struct + X int + Y int + Z int