codec

package
v0.0.0-...-821fc04 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package codec implements the various minecraft protocol types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean bool

func (*Boolean) Decode

func (b *Boolean) Decode(r io.Reader) error

func (*Boolean) Encode

func (b *Boolean) Encode(w io.Writer) error

type Byte

type Byte int8

func (*Byte) Decode

func (v *Byte) Decode(r io.Reader) (err error)

func (Byte) Encode

func (v Byte) Encode(w io.Writer) (err error)

type Codec

type Codec interface {
	Decode(r io.Reader) error
	Encode(w io.Writer) error
}

type Double

type Double float64

func (*Double) Decode

func (v *Double) Decode(r io.Reader) (err error)

func (Double) Encode

func (v Double) Encode(w io.Writer) (err error)

type Float

type Float float32

func (*Float) Decode

func (v *Float) Decode(r io.Reader) (err error)

func (Float) Encode

func (v Float) Encode(w io.Writer) (err error)

type Int

type Int int32

func (*Int) Decode

func (v *Int) Decode(r io.Reader) (err error)

func (Int) Encode

func (v Int) Encode(w io.Writer) (err error)

type Long

type Long int64

func (*Long) Decode

func (v *Long) Decode(r io.Reader) (err error)

func (Long) Encode

func (v Long) Encode(w io.Writer) (err error)

type Position

type Position struct {
	X, Y, Z int
}

func (*Position) Decode

func (v *Position) Decode(r io.Reader) (err error)

func (Position) Encode

func (v Position) Encode(w io.Writer) (err error)

type Short

type Short uint16

func (*Short) Decode

func (v *Short) Decode(r io.Reader) (err error)

func (Short) Encode

func (v Short) Encode(w io.Writer) (err error)

type String

type String string

func (*String) Decode

func (v *String) Decode(r io.Reader) (err error)

func (String) Encode

func (v String) Encode(w io.Writer) (err error)

func (String) String

func (v String) String() string

type UByte

type UByte uint8

func (*UByte) Decode

func (v *UByte) Decode(r io.Reader) (err error)

func (UByte) Encode

func (v UByte) Encode(w io.Writer) (err error)

type UShort

type UShort uint16

func (*UShort) Decode

func (v *UShort) Decode(r io.Reader) (err error)

func (UShort) Encode

func (v UShort) Encode(w io.Writer) (err error)

type VarInt

type VarInt int32

func (*VarInt) Decode

func (v *VarInt) Decode(r io.Reader) (err error)

func (VarInt) Encode

func (v VarInt) Encode(w io.Writer) (err error)

func (VarInt) Length

func (v VarInt) Length() int

type VarLong

type VarLong int64

func (*VarLong) Decode

func (v *VarLong) Decode(r io.Reader) (err error)

func (VarLong) Encode

func (v VarLong) Encode(w io.Writer) (err error)

Jump to

Keyboard shortcuts

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