Versions in this module Expand all Collapse all v0 v0.2.0 Aug 29, 2026 v0.1.0 Aug 28, 2026 Changes in this version + const Absent + const AirState + const ClientCommandPerformRespawn + const ClientCommandRequestStats + const CompressionDisabled + const DefaultNamespace + const DefaultStackSize + const DigCancel + const DigDropItem + const DigDropStack + const DigFinish + const DigReleaseUse + const DigStart + const DigSwapOffhand + const FaceBottom + const FaceCount + const FaceEast + const FaceNorth + const FaceSouth + const FaceTop + const FaceWest + const InputBackward + const InputForward + const InputJump + const InputLeft + const InputRight + const InputSneak + const InputSprint + const MainHand + const MaxBitsPerEntry + const MaxPacketSize + const MaxSections + const MaxStringLen + const MovementHasHorizontalCollision + const MovementOnGround + const NetherMinY + const OffHand + const OverworldMinY + const RelativeMoveUnit + const SectionHeight + const ShapeUnit + var FullCube = Box + func AppendVarInt(dst []byte, v int32) []byte + func AppendVarLong(dst []byte, v int64) []byte + func BareName(name string) string + func DecodeBlockPos(v int64) (x, y, z int32) + func Names() []string + func Namespaced(name string) string + func ReadVarInt(r io.ByteReader) (int32, error) + func ReadVarLong(r io.ByteReader) (int64, error) + func Register(v *Version) + func ValidFace(face int32) bool + func VarIntLen(v int32) int + type Box [6]int8 + func (b Box) Empty() bool + func (b Box) Height() float64 + func (b Box) MaxX() int8 + func (b Box) MaxY() int8 + func (b Box) MaxZ() int8 + func (b Box) MinX() int8 + func (b Box) MinY() int8 + func (b Box) MinZ() int8 + type ChunkColumn struct + MinY int32 + Sections []*ChunkSection + X int32 + Z int32 + func ParseChunkData(v *Version, x, z int32, data []byte) (*ChunkColumn, error) + func (c *ChunkColumn) BlockState(x, y, z int32) int32 + func (c *ChunkColumn) SetBlockState(x, y, z, state int32) + type ChunkFormat struct + HasFluidCount bool + HasSizePrefix bool + NBTHeightmaps bool + type ChunkSection struct + func (s *ChunkSection) BlockState(x, y, z int32) int32 + type ComponentEncoding struct + EntityDataKeepsTypeInNBT bool + EquippableHasNoShearing bool + LegacyBlockPredicates bool + NestedStacksCountFirst bool + ProfileHasNoVariantTag bool + RegistryRefsHaveLeadingFlag bool + TagsAreBareStrings bool + TrimHasTooltipFlag bool + type Conn struct + func Dial(addr string, timeout time.Duration) (*Conn, error) + func NewConn(c net.Conn) *Conn + func (c *Conn) Close() error + func (c *Conn) CompressionThreshold() int + func (c *Conn) ReadPacket() (Packet, error) + func (c *Conn) RemoteAddr() net.Addr + func (c *Conn) SetCompressionThreshold(t int) + func (c *Conn) SetReadDeadline(t time.Time) error + func (c *Conn) WritePacket(payload []byte) error + type Packet struct + Data []byte + ID int32 + func (p Packet) Reader() *Reader + type PacketIDs struct + CBConfigCodeOfConduct int32 + CBConfigDisconnect int32 + CBConfigFinishConfiguration int32 + CBConfigKeepAlive int32 + CBConfigPing int32 + CBConfigSelectKnownPacks int32 + CBLoginCompress int32 + CBLoginDisconnect int32 + CBLoginEncryptionBegin int32 + CBLoginSuccess int32 + CBPlayBlockChange int32 + CBPlayChunkBatchFinished int32 + CBPlayChunkBatchStart int32 + CBPlayCloseWindow int32 + CBPlayCollect int32 + CBPlayDeathCombatEvent int32 + CBPlayEntityDestroy int32 + CBPlayEntityEffect int32 + CBPlayEntityMoveLook int32 + CBPlayEntityTeleport int32 + CBPlayGameStateChange int32 + CBPlayHeldItemSlot int32 + CBPlayKeepAlive int32 + CBPlayKickDisconnect int32 + CBPlayLogin int32 + CBPlayMapChunk int32 + CBPlayMultiBlockChange int32 + CBPlayOpenWindow int32 + CBPlayPosition int32 + CBPlayRecipeBookAdd int32 + CBPlayRelEntityMove int32 + CBPlayRemoveEntityEffect int32 + CBPlayRespawn int32 + CBPlaySetSlot int32 + CBPlaySpawnEntity int32 + CBPlayTradeList int32 + CBPlayUnloadChunk int32 + CBPlayUpdateHealth int32 + CBPlayWindowItems int32 + SBConfigAcceptCodeOfConduct int32 + SBConfigFinishConfiguration int32 + SBConfigKeepAlive int32 + SBConfigPong int32 + SBConfigSelectKnownPacks int32 + SBConfigSettings int32 + SBHandshake int32 + SBLoginAcknowledged int32 + SBLoginStart int32 + SBPlayArmAnimation int32 + SBPlayAttack int32 + SBPlayBlockDig int32 + SBPlayBlockPlace int32 + SBPlayChatMessage int32 + SBPlayChunkBatchReceived int32 + SBPlayClientCommand int32 + SBPlayCloseWindow int32 + SBPlayContainerButton int32 + SBPlayCraftRecipeRequest int32 + SBPlayEntityAction int32 + SBPlayHeldItemSlot int32 + SBPlayKeepAlive int32 + SBPlayLook int32 + SBPlayNameItem int32 + SBPlayPlayerInput int32 + SBPlayPlayerLoaded int32 + SBPlayPosition int32 + SBPlayPositionLook int32 + SBPlaySelectTrade int32 + SBPlaySetBeaconEffect int32 + SBPlaySetCreativeSlot int32 + SBPlayTeleportConfirm int32 + SBPlayUseEntity int32 + SBPlayUseItem int32 + SBPlayWindowClick int32 + type Reader struct + func NewReader(buf []byte) *Reader + func (r *Reader) Bool() bool + func (r *Reader) Err() error + func (r *Reader) F32() float32 + func (r *Reader) F64() float64 + func (r *Reader) Fail(err error) + func (r *Reader) I16() int16 + func (r *Reader) I32() int32 + func (r *Reader) I64() int64 + func (r *Reader) I8() int8 + func (r *Reader) ReadByte() (byte, error) + func (r *Reader) Remaining() []byte + func (r *Reader) Skip(n int) + func (r *Reader) String() string + func (r *Reader) U8() uint8 + func (r *Reader) UUID() UUID + func (r *Reader) VarInt() int32 + func (r *Reader) VarLong() int64 + type State int + const StateConfiguration + const StateHandshaking + const StateLogin + const StatePlay + func (s State) String() string + type UUID [16]byte + func OfflineUUID(name string) UUID + func (u UUID) String() string + type Version struct + Chunk ChunkFormat + Name string + Packets PacketIDs + Protocol int32 + func ByName(name string) (*Version, error) + func ByProtocol(p int32) (*Version, error) + func NewVersion(spec VersionSpec) *Version + func (v *Version) BlocksMovement(state int32) bool + func (v *Version) CollisionHeight(state int32) float64 + func (v *Version) CollisionShape(state int32) []Box + func (v *Version) ComponentEncoding() (ComponentEncoding, bool) + func (v *Version) ComponentKind(wire int32) (int32, bool) + func (v *Version) EffectName(id int32) string + func (v *Version) EntityTypeName(id int32) string + func (v *Version) HasCollisionData(state int32) bool + func (v *Version) HasComponentIDs() bool + func (v *Version) IsAir(state int32) bool + func (v *Version) IsFluid(state int32) bool + func (v *Version) IsFullCube(state int32) bool + func (v *Version) IsLava(state int32) bool + func (v *Version) IsSolid(state int32) bool + func (v *Version) IsTargetable(state int32) bool + func (v *Version) IsWater(state int32) bool + func (v *Version) ItemID(name string) (int32, bool) + func (v *Version) ItemName(id int32) string + func (v *Version) SlotDisplayKind(wire int32) (int32, bool) + func (v *Version) StackSize(id int32) int32 + func (v *Version) StackSizeOf(name string) int32 + func (v *Version) SupportsAttackPacket() bool + type VersionSpec struct + Air [][2]int32 + Chunk ChunkFormat + ComponentIDs map[int32]int32 + Components *ComponentEncoding + EffectNames []string + EntityNames []string + ItemNames []string + ItemStacks []int32 + Lava [][2]int32 + Name string + Packets PacketIDs + Protocol int32 + ShapeRuns [][3]int32 + Shapes [][]Box + SlotDisplayIDs map[int32]int32 + Solid [][2]int32 + Water [][2]int32 + type Writer struct + func NewWriter(packetID int32) *Writer + func (w *Writer) BlockPos(x, y, z int32) *Writer + func (w *Writer) Bool(v bool) *Writer + func (w *Writer) Bytes() []byte + func (w *Writer) F16(v float32) *Writer + func (w *Writer) F32(v float32) *Writer + func (w *Writer) F64(v float64) *Writer + func (w *Writer) I16(v int16) *Writer + func (w *Writer) I32(v int32) *Writer + func (w *Writer) I64(v int64) *Writer + func (w *Writer) I8(v int8) *Writer + func (w *Writer) String(v string) *Writer + func (w *Writer) U16(v uint16) *Writer + func (w *Writer) U8(v uint8) *Writer + func (w *Writer) UUID(v UUID) *Writer + func (w *Writer) VarInt(v int32) *Writer + func (w *Writer) VarLong(v int64) *Writer