Documentation ¶
Index ¶
- func Copy(src protocol.Protocol, destinations ...protocol.Protocol)
- func Get(proto protocol.Protocol, state protocol.State, direction protocol.Direction, ...) (protocol.Packet, error)
- func GetID(proto protocol.Protocol, state protocol.State, direction protocol.Direction, ...) (int32, error)
- func Register(proto protocol.Protocol, ...) error
- type Description
- type PacketHandshakingStart
- type PacketLoginInStart
- type PacketLoginOutCompression
- type PacketLoginOutDisconnect
- type PacketLoginOutSuccess
- type PacketPlayInChatMessage
- type PacketPlayInKeepAlive
- type PacketPlayOutChatMessage
- type PacketPlayOutChunkData
- type PacketPlayOutDisconnect
- type PacketPlayOutJoinGame
- type PacketPlayOutKeepAlive
- type PacketPlayOutPositionAndLook
- type PacketPlayOutServerDifficulty
- type PacketStatusInPing
- type PacketStatusInRequest
- type PacketStatusOutPong
- type PacketStatusOutResponse
- type Players
- type Response
- type Sample
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Description ¶
func (Description) MarshalJSON ¶
func (d Description) MarshalJSON() ([]byte, error)
func (*Description) UnmarshalJSON ¶
func (d *Description) UnmarshalJSON(data []byte) error
type PacketHandshakingStart ¶
type PacketHandshakingStart struct { ProtocolVersion int32 ServerAddress string ServerPort uint16 NextState int32 }
func (*PacketHandshakingStart) GetID ¶
func (packet *PacketHandshakingStart) GetID(proto protocol.Protocol) (int32, error)
type PacketLoginInStart ¶
type PacketLoginInStart struct {
Username string
}
func (*PacketLoginInStart) GetID ¶
func (packet *PacketLoginInStart) GetID(proto protocol.Protocol) (int32, error)
type PacketLoginOutCompression ¶
type PacketLoginOutCompression struct {
Threshold int32
}
func (*PacketLoginOutCompression) GetID ¶
func (packet *PacketLoginOutCompression) GetID(proto protocol.Protocol) (int32, error)
type PacketLoginOutDisconnect ¶
func (*PacketLoginOutDisconnect) GetID ¶
func (packet *PacketLoginOutDisconnect) GetID(proto protocol.Protocol) (int32, error)
type PacketLoginOutSuccess ¶
func (*PacketLoginOutSuccess) GetID ¶
func (packet *PacketLoginOutSuccess) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayInChatMessage ¶
type PacketPlayInChatMessage struct {
Message string
}
func (*PacketPlayInChatMessage) GetID ¶
func (packet *PacketPlayInChatMessage) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayInKeepAlive ¶
type PacketPlayInKeepAlive struct {
KeepAliveID int32
}
func (*PacketPlayInKeepAlive) GetID ¶
func (packet *PacketPlayInKeepAlive) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutChatMessage ¶
func (*PacketPlayOutChatMessage) GetID ¶
func (packet *PacketPlayOutChatMessage) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutChunkData ¶
type PacketPlayOutChunkData struct {
ChunkX, ChunkZ int32
FullChunk bool
PrimaryBit int32
Heightmaps nbt.Tag
Biomes []int32
Data []byte
BlockEntities []nbt.Tag
}
func (*PacketPlayOutChunkData) GetID ¶
func (packet *PacketPlayOutChunkData) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutDisconnect ¶
func (*PacketPlayOutDisconnect) GetID ¶
func (packet *PacketPlayOutDisconnect) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutJoinGame ¶
type PacketPlayOutJoinGame struct { EntityID int32 Hardcore bool Gamemode uint8 PreviousGamemode int8 WorldNames []string DimensionCodec protocol.DimensionCodec Dimension protocol.Dimension WorldName string DimensionID int8 Difficulty uint8 HashedSeed int64 MaxPlayers int32 LevelType string ViewDistance int32 ReducedDebug bool RespawnScreen bool IsDebug bool IsFlat bool }
func (*PacketPlayOutJoinGame) GetID ¶
func (packet *PacketPlayOutJoinGame) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutKeepAlive ¶
type PacketPlayOutKeepAlive struct {
KeepAliveID int32
}
func (*PacketPlayOutKeepAlive) GetID ¶
func (packet *PacketPlayOutKeepAlive) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutPositionAndLook ¶
type PacketPlayOutPositionAndLook struct {
X, Y, Z float64
Yaw, Pitch float32
Flags uint8
TeleportID int32
}
func (*PacketPlayOutPositionAndLook) GetID ¶
func (packet *PacketPlayOutPositionAndLook) GetID(proto protocol.Protocol) (int32, error)
type PacketPlayOutServerDifficulty ¶
func (*PacketPlayOutServerDifficulty) GetID ¶
func (packet *PacketPlayOutServerDifficulty) GetID(proto protocol.Protocol) (int32, error)
type PacketStatusInPing ¶
type PacketStatusInPing struct {
Payload int64
}
func (*PacketStatusInPing) GetID ¶
func (packet *PacketStatusInPing) GetID(proto protocol.Protocol) (int32, error)
type PacketStatusInRequest ¶
type PacketStatusInRequest struct{}
func (*PacketStatusInRequest) GetID ¶
func (packet *PacketStatusInRequest) GetID(proto protocol.Protocol) (int32, error)
type PacketStatusOutPong ¶
type PacketStatusOutPong struct {
Payload int64
}
func (*PacketStatusOutPong) GetID ¶
func (packet *PacketStatusOutPong) GetID(proto protocol.Protocol) (int32, error)
type PacketStatusOutResponse ¶
type PacketStatusOutResponse struct {
Response Response
}
func (*PacketStatusOutResponse) GetID ¶
func (packet *PacketStatusOutResponse) GetID(proto protocol.Protocol) (int32, error)
type Response ¶
type Response struct { Version Version `json:"version"` Players Players `json:"players"` Description Description `json:"description"` }
Source Files ¶
- PacketHandshakingStart.go
- PacketLoginInStart.go
- PacketLoginOutCompression.go
- PacketLoginOutDisconnect.go
- PacketLoginOutSuccess.go
- PacketPlayInChatMessage.go
- PacketPlayInKeepAlive.go
- PacketPlayOutChatMessage.go
- PacketPlayOutChunkData.go
- PacketPlayOutDisconnect.go
- PacketPlayOutJoinGame.go
- PacketPlayOutKeepAlive.go
- PacketPlayOutPositionAndLook.go
- PacketPlayOutServerDifficulty.go
- PacketStatusInPing.go
- PacketStatusInRequest.go
- PacketStatusOutPong.go
- PacketStatusOutResponse.go
- registry.go
Click to show internal directories.
Click to hide internal directories.