Documentation ¶
Index ¶
- Constants
- Variables
- func Colorize(in string) (out string)
- func NewPacketGenericCodec(id int, swappers *PacketGenericSwappers) (this *packetGenericCodec)
- func WriteGameProfileProperties(writer io.Writer, val []GameProfileProperty) (err error)
- func WriteProfilePublicKey(writer io.Writer, val *ProfilePublicKey) (err error)
- type CodecClientStatusPing
- type CodecClientStatusResponse
- type CodecServerHandshake
- type CodecServerStatusPing
- type CodecServerStatusRequest
- type GameProfile
- type GameProfileProperty
- type IdMap
- type IdMapPacket
- type Location
- type PacketClientDisconnect
- type PacketClientJoinGame
- type PacketClientLoginDisconnect
- type PacketClientLoginEncryptRequest
- type PacketClientLoginSetCompression
- type PacketClientLoginSuccess
- type PacketClientPlayerInfoRemove
- type PacketClientPlayerInfoUpdate
- type PacketClientPlayerInfoUpdateItem
- type PacketClientPlayerList
- type PacketClientPlayerListAddPlayer
- type PacketClientPlayerListItem
- type PacketClientPlayerListUpdateDisplayName
- type PacketClientPlayerListUpdateGamemode
- type PacketClientPlayerListUpdateLatency
- type PacketClientRespawn
- type PacketClientScoreboardObjective
- func NewPacketClientScoreboardObjectiveAdd(idMap *IdMap, name string, value string, stype string) (this *PacketClientScoreboardObjective)
- func NewPacketClientScoreboardObjectiveRemove(idMap *IdMap, name string) (this *PacketClientScoreboardObjective)
- func NewPacketClientScoreboardObjectiveUpdate(idMap *IdMap, name string, value string, stype string) (this *PacketClientScoreboardObjective)
- type PacketClientSetCompression
- type PacketClientStatusPing
- type PacketClientStatusResponse
- type PacketClientTeams
- func NewPacketClientTeamsAdd(idMap *IdMap, name string, displayName string, prefix string, suffix string, ...) (this *PacketClientTeams)
- func NewPacketClientTeamsInfoUpdate(idMap *IdMap, name string, displayName string, prefix string, suffix string, ...) (this *PacketClientTeams)
- func NewPacketClientTeamsPlayersAdd(idMap *IdMap, name string, players []string) (this *PacketClientTeams)
- func NewPacketClientTeamsPlayersRemove(idMap *IdMap, name string, players []string) (this *PacketClientTeams)
- func NewPacketClientTeamsRemove(idMap *IdMap, name string) (this *PacketClientTeams)
- type PacketClientViewDistance
- type PacketGeneric
- type PacketGenericSwappers
- type PacketServerClientSettings
- type PacketServerHandshake
- type PacketServerLoginEncryptResponse
- type PacketServerLoginStart
- type PacketServerPluginMessage
- type PacketServerStatusPing
- type PacketServerStatusRequest
- type ProfilePublicKey
- type Version
- type VersionTable
Constants ¶
View Source
const ( PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_ADD_PLAYER int = iota PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_INITIALIZE_CHAT PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_GAMEMODE PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_LISTED PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_LATENCY PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_DISPLAY_NAME )
View Source
const ( PACKET_CLIENT_PLAYER_LIST_ACTION_ADD = 0 PACKET_CLIENT_PLAYER_LIST_ACTION_UPDATE_GAMEMODE = 1 PACKET_CLIENT_PLAYER_LIST_ACTION_UPDATE_LATENCY = 2 PACKET_CLIENT_PLAYER_LIST_ACTION_UPDATE_DISPLAY_NAME = 3 PACKET_CLIENT_PLAYER_LIST_ACTION_REMOVE = 4 )
View Source
const ( PACKET_CLIENT_SCOREBOARD_OBJECTIVE_ACTION_ADD = int8(0) PACKET_CLIENT_SCOREBOARD_OBJECTIVE_ACTION_REMOVE = int8(1) PACKET_CLIENT_SCOREBOARD_OBJECTIVE_ACTION_UPDATE = int8(2) )
View Source
const ( PACKET_CLIENT_TEAMS_ACTION_ADD = int8(0) PACKET_CLIENT_TEAMS_ACTION_REMOVE = int8(1) PACKET_CLIENT_TEAMS_ACTION_INFO_UPDATE = int8(2) PACKET_CLIENT_TEAMS_ACTION_PLAYERS_ADD = int8(3) PACKET_CLIENT_TEAMS_ACTION_PLAYERS_REMOVE = int8(4) )
View Source
const ( MAGIC = string("§") PACKET_SERVER_HANDSHAKE = 0x00 PACKET_CLIENT_STATUS_RESPONSE = 0x00 PACKET_CLIENT_STATUS_PING = 0x01 PACKET_SERVER_STATUS_REQUEST = 0x00 PACKET_SERVER_STATUS_PING = 0x01 )
View Source
const ( PacketGenericSwappersClientSpawnObjectNoUUID int = iota PacketGenericSwappersClientSpawnObjectUUID PacketGenericSwappersClientSpawnObjectUUIDTypeVar )
View Source
const ( PacketGenericSwappersClientEntityDestroyVar int = iota PacketGenericSwappersClientEntityDestroyInt32 )
Variables ¶
View Source
var HandshakePacketClientCodec = HandshakePacketServerCodec.Flip()
View Source
var HandshakePacketServerCodec = packet.NewPacketCodecRegistryDual([]packet.PacketCodec{}, []packet.PacketCodec{ PACKET_SERVER_HANDSHAKE: new(CodecServerHandshake), })
View Source
var PacketClientPlayerInfoUpdateActions = []int{ PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_ADD_PLAYER, PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_INITIALIZE_CHAT, PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_GAMEMODE, PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_LISTED, PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_LATENCY, PACKET_CLIENT_PLAYER_INFO_UPDATE_ACTION_UPDATE_DISPLAY_NAME, }
View Source
var StatusPacketClientCodec = StatusPacketServerCodec.Flip()
View Source
var StatusPacketServerCodec = packet.NewPacketCodecRegistryDual([]packet.PacketCodec{ PACKET_CLIENT_STATUS_RESPONSE: new(CodecClientStatusResponse), PACKET_CLIENT_STATUS_PING: new(CodecClientStatusPing), }, []packet.PacketCodec{ PACKET_SERVER_STATUS_REQUEST: new(CodecServerStatusRequest), PACKET_SERVER_STATUS_PING: new(CodecServerStatusPing), })
Functions ¶
func NewPacketGenericCodec ¶
func NewPacketGenericCodec(id int, swappers *PacketGenericSwappers) (this *packetGenericCodec)
func WriteGameProfileProperties ¶
func WriteGameProfileProperties(writer io.Writer, val []GameProfileProperty) (err error)
func WriteProfilePublicKey ¶
func WriteProfilePublicKey(writer io.Writer, val *ProfilePublicKey) (err error)
Types ¶
type CodecClientStatusPing ¶
type CodecClientStatusPing struct { }
type CodecClientStatusResponse ¶
type CodecClientStatusResponse struct { }
type CodecServerHandshake ¶
type CodecServerHandshake struct { }
type CodecServerStatusPing ¶
type CodecServerStatusPing struct { }
type CodecServerStatusRequest ¶
type CodecServerStatusRequest struct { }
type GameProfile ¶
type GameProfile struct { Id string `json:"id"` Name string `json:"name"` Properties []GameProfileProperty `json:"properties"` }
type GameProfileProperty ¶
type GameProfileProperty struct { Name string `json:"name"` Value string `json:"value"` Signature string `json:"signature"` }
func ReadGameProfileProperties ¶
func ReadGameProfileProperties(reader io.Reader) (val []GameProfileProperty, err error)
type IdMap ¶
type IdMap struct { PacketClientKeepalive int PacketClientJoinGame int PacketClientChat int PacketClientTimeUpdate int PacketClientEntityEquipment int PacketClientSpawnPosition int PacketClientUpdateHealth int PacketClientRespawn int PacketClientPlayerPositionandLook int PacketClientUpdateViewDistance int PacketClientHeldItemChange int PacketClientUseBed int PacketClientAnimation int PacketClientSpawnPlayer int PacketClientCollectItem int PacketClientSpawnObject int PacketClientSpawnMob int PacketClientSpawnPainting int PacketClientSpawnExperienceOrb int PacketClientEntityVelocity int PacketClientDestroyEntities int PacketClientEntity int PacketClientEntityRelativeMove int PacketClientEntityLook int PacketClientEntityLookandRelativeMove int PacketClientEntityTeleport int PacketClientEntityHeadLook int PacketClientEntityStatus int PacketClientAttachEntity int PacketClientEntityMetadata int PacketClientEntityEffect int PacketClientRemoveEntityEffect int PacketClientSetExperience int PacketClientEntityProperties int PacketClientChunkData int PacketClientMultiBlockChange int PacketClientBlockChange int PacketClientBlockAction int PacketClientBlockBreakAnimation int PacketClientMapChunkBulk int PacketClientExplosion int PacketClientEffect int PacketClientNamedSoundEffect int PacketClientParticle int PacketClientChangeGameState int PacketClientSpawnGlobalEntity int PacketClientOpenWindow int PacketClientCloseWindow int PacketClientSetSlot int PacketClientWindowItems int PacketClientWindowProperty int PacketClientConfirmTransaction int PacketClientUpdateSign int PacketClientMaps int PacketClientUpdateBlockEntity int PacketClientSignEditorOpen int PacketClientStatistics int PacketClientPlayerList int PacketClientPlayerAbilities int PacketClientTabComplete int PacketClientScoreboardObjective int PacketClientUpdateScore int PacketClientDisplayScoreboard int PacketClientTeams int PacketClientPluginMessage int PacketClientDisconnect int PacketClientDifficulty int PacketClientCombatEvent int PacketClientCamera int PacketClientWorldBorder int PacketClientTitle int PacketClientSetCompression int PacketClientPlayerListHeadFoot int PacketClientResourcePack int PacketClientUpdateEntityNbt int PacketClientEntitySoundEffect int PacketServerKeepalive int PacketServerChat int PacketServerUseEntity int PacketServerPlayer int PacketServerPlayerPosition int PacketServerPlayerLook int PacketServerPlayerLookandPosition int PacketServerPlayerDigging int PacketServerPlayerBlockPlacement int PacketServerHeldItemChange int PacketServerAnimation int PacketServerEntityAction int PacketServerSteerVehicle int PacketServerCloseWindow int PacketServerClickWindow int PacketServerConfirmTransaction int PacketServerCreativeInventoryAction int PacketServerEnchantItem int PacketServerUpdateSign int PacketServerPlayerAbilities int PacketServerTabComplete int PacketServerClientSettings int PacketServerClientStatus int PacketServerPluginMessage int PacketServerSpectate int PacketServerResourcePackStatus int PacketClientLoginDisconnect int PacketClientLoginEncryptRequest int PacketClientLoginSuccess int PacketClientLoginSetCompression int PacketServerLoginStart int PacketServerLoginEncryptResponse int // 1.9 PacketClientBossBar int PacketClientSetCooldown int PacketClientUnloadChunk int PacketClientVehicleMove int PacketClientSetPassengers int PacketServerTeleportConfirm int PacketServerVehicleMove int PacketServerSteerBoat int PacketServerUseItem int // 1.12 PlayClientUnlockRecipes int PlayClientAdvancementProgress int PlayClientAdvancements int PlayServerPrepareCraftingGrid int PlayServerCraftingBookData int PlayServerAdvancementTab int // 1.13 PacketClientStopSound int // 1.18 PacketClientUpdateSimulationDistance int // 1.19 PacketClientChatPreview int PacketClientPlayerChatMessage int PacketClientSystemChatMessage int PacketClientSetDisplayChatPreview int PacketClientServerData int PacketServerChatCommand int PacketServerChatMessage int PacketServerChatPreview int PacketServerSetDisplayedRecipe int PacketServerSetBeaconEffect int // 1.19.1 PacketClientCustomChatCompletions int PacketClientDeleteChatMessage int PacketClientPlayerChatHeader int PacketServerChatAck int // 1.19.3 PacketClientDisguisedChat int PacketClientPlayerInfoRemove int PacketClientPlayerInfoUpdate int PacketClientUpdateEnabledFeatures int PacketServerChatSessionUpdate int // 1.19.4 PacketClientBundle int PacketClientChunkBiomes int PacketClientDamageEvent int PacketClientHitAnimation int // Entities EntityArrow int EntityFishingBobber int EntitySpectralArrow int }
type IdMapPacket ¶
type IdMapPacket struct {
// contains filtered or unexported fields
}
func (*IdMapPacket) Id ¶
func (this *IdMapPacket) Id() int
func (*IdMapPacket) IdFrom ¶
func (this *IdMapPacket) IdFrom(idMap *IdMap)
func (*IdMapPacket) IdSet ¶
func (this *IdMapPacket) IdSet(id int)
type PacketClientDisconnect ¶
type PacketClientDisconnect struct { IdMapPacket Json string }
func NewPacketClientDisconnect ¶
func NewPacketClientDisconnect(idMap *IdMap, json string) (this *PacketClientDisconnect)
func (*PacketClientDisconnect) IdFrom ¶
func (this *PacketClientDisconnect) IdFrom(idMap *IdMap)
type PacketClientJoinGame ¶
type PacketClientJoinGame struct { IdMapPacket EntityId int32 Hardcore bool // 1.16.2+ Gamemode int8 PreviousGamemode int8 // 1.16+ WorldNames []string // 1.16+ DimensionCodec nbt.Nbt // 1.16+ DimensionNBT nbt.Nbt // 1.16.2+ // removed in 1.19+ Dimension int8 // removed in 1.16+ DimensionName string // 1.16+ // removed in 1.16.2+ // added back in 1.19+ WorldName string // 1.16+ HashedSeed int64 Difficulty int8 MaxPlayers int LevelType string // removed in 1.16+ ViewDistance int ReducedDebugInfo bool EnableRespawnScreen bool IsDebug bool // 1.16+ IsFlat bool // 1.16+ SimulationDistance int // 1.18+ DeathLocation *Location // 1.19+ }
func (*PacketClientJoinGame) IdFrom ¶
func (this *PacketClientJoinGame) IdFrom(idMap *IdMap)
type PacketClientLoginDisconnect ¶
type PacketClientLoginDisconnect struct { IdMapPacket Json string }
func NewPacketClientLoginDisconnect ¶
func NewPacketClientLoginDisconnect(idMap *IdMap, json string) (this *PacketClientLoginDisconnect)
func (*PacketClientLoginDisconnect) IdFrom ¶
func (this *PacketClientLoginDisconnect) IdFrom(idMap *IdMap)
type PacketClientLoginEncryptRequest ¶
type PacketClientLoginEncryptRequest struct { IdMapPacket ServerId string PublicKey []byte VerifyToken []byte }
func NewPacketClientLoginEncryptRequest ¶
func NewPacketClientLoginEncryptRequest(idMap *IdMap, serverId string, publicKey []byte, verifyToken []byte) (this *PacketClientLoginEncryptRequest)
func (*PacketClientLoginEncryptRequest) IdFrom ¶
func (this *PacketClientLoginEncryptRequest) IdFrom(idMap *IdMap)
type PacketClientLoginSetCompression ¶
type PacketClientLoginSetCompression struct { IdMapPacket Threshold int }
func NewPacketClientLoginSetCompression ¶
func NewPacketClientLoginSetCompression(idMap *IdMap, threshold int) (this *PacketClientLoginSetCompression)
func (*PacketClientLoginSetCompression) IdFrom ¶
func (this *PacketClientLoginSetCompression) IdFrom(idMap *IdMap)
type PacketClientLoginSuccess ¶
type PacketClientLoginSuccess struct { IdMapPacket UUID string Name string Properties []GameProfileProperty // 1.19+ }
func NewPacketClientLoginSuccess ¶
func NewPacketClientLoginSuccess(idMap *IdMap, uuid string, name string, properties []GameProfileProperty) (this *PacketClientLoginSuccess)
func (*PacketClientLoginSuccess) IdFrom ¶
func (this *PacketClientLoginSuccess) IdFrom(idMap *IdMap)
type PacketClientPlayerInfoRemove ¶
type PacketClientPlayerInfoRemove struct { IdMapPacket UUIDs []uuid.UUID }
func NewPacketClientPlayerInfoRemove ¶
func NewPacketClientPlayerInfoRemove(idMap *IdMap, uuids []uuid.UUID) (this *PacketClientPlayerInfoRemove)
func (*PacketClientPlayerInfoRemove) IdFrom ¶
func (this *PacketClientPlayerInfoRemove) IdFrom(idMap *IdMap)
type PacketClientPlayerInfoUpdate ¶
type PacketClientPlayerInfoUpdate struct { IdMapPacket Actions []int Items []PacketClientPlayerInfoUpdateItem }
func (*PacketClientPlayerInfoUpdate) IdFrom ¶
func (this *PacketClientPlayerInfoUpdate) IdFrom(idMap *IdMap)
type PacketClientPlayerInfoUpdateItem ¶
type PacketClientPlayerInfoUpdateItem struct { UUID uuid.UUID // ADD_PLAYER Name string Properties []GameProfileProperty // INITIALIZE_CHAT ChatSessionId *uuid.UUID PublicKey *ProfilePublicKey // UPDATE_GAMEMODE Gamemode int // UPDATE_LISTED Listed bool // UPDATE_LATENCY Latency int // UPDATE_DISPLAY_NAME DisplayName string }
type PacketClientPlayerList ¶
type PacketClientPlayerList struct { IdMapPacket Action int Items []PacketClientPlayerListItem }
func NewPacketClientPlayerList ¶
func NewPacketClientPlayerList(idMap *IdMap, action int, items []PacketClientPlayerListItem) (this *PacketClientPlayerList)
func (*PacketClientPlayerList) IdFrom ¶
func (this *PacketClientPlayerList) IdFrom(idMap *IdMap)
type PacketClientPlayerListAddPlayer ¶
type PacketClientPlayerListAddPlayer struct { Name string Properties []GameProfileProperty Gamemode int Latency int DisplayName string PublicKey *ProfilePublicKey // 1.19+ }
type PacketClientPlayerListUpdateDisplayName ¶
type PacketClientPlayerListUpdateDisplayName struct {
DisplayName string
}
type PacketClientPlayerListUpdateGamemode ¶
type PacketClientPlayerListUpdateGamemode struct {
Gamemode int
}
type PacketClientPlayerListUpdateLatency ¶
type PacketClientPlayerListUpdateLatency struct {
Latency int
}
type PacketClientRespawn ¶
type PacketClientRespawn struct { IdMapPacket Dimension int32 // removed in 1.16+ DimensionName string // 1.16+ // removed in 1.16.2+ // added back in 1.19+ DimensionNBT nbt.Nbt // 1.16.2+ // removed in 1.19+ WorldName string // 1.16+ HashedSeed int64 Difficulty int8 Gamemode int8 PreviousGamemode int8 // 1.16+ LevelType string // removed in 1.16+ IsDebug bool // 1.16+ IsFlat bool // 1.16+ DeathLocation *Location // 1.19+ CopyMetadata bool // 1.16+ }
func NewPacketClientRespawnFrom ¶
func NewPacketClientRespawnFrom(idMap *IdMap, joinGame *PacketClientJoinGame) (this *PacketClientRespawn)
func (*PacketClientRespawn) IdFrom ¶
func (this *PacketClientRespawn) IdFrom(idMap *IdMap)
type PacketClientScoreboardObjective ¶
type PacketClientScoreboardObjective struct { IdMapPacket Name string Action int8 Value string Type string }
func NewPacketClientScoreboardObjectiveAdd ¶
func NewPacketClientScoreboardObjectiveAdd(idMap *IdMap, name string, value string, stype string) (this *PacketClientScoreboardObjective)
func NewPacketClientScoreboardObjectiveRemove ¶
func NewPacketClientScoreboardObjectiveRemove(idMap *IdMap, name string) (this *PacketClientScoreboardObjective)
func NewPacketClientScoreboardObjectiveUpdate ¶
func NewPacketClientScoreboardObjectiveUpdate(idMap *IdMap, name string, value string, stype string) (this *PacketClientScoreboardObjective)
func (*PacketClientScoreboardObjective) IdFrom ¶
func (this *PacketClientScoreboardObjective) IdFrom(idMap *IdMap)
type PacketClientSetCompression ¶
type PacketClientSetCompression struct { IdMapPacket Threshold int }
func NewPacketClientSetCompression ¶
func NewPacketClientSetCompression(idMap *IdMap, threshold int) (this *PacketClientSetCompression)
func (*PacketClientSetCompression) IdFrom ¶
func (this *PacketClientSetCompression) IdFrom(idMap *IdMap)
type PacketClientStatusPing ¶
type PacketClientStatusPing struct {
Time int64
}
func NewPacketClientStatusPing ¶
func NewPacketClientStatusPing(time int64) (this *PacketClientStatusPing)
func (*PacketClientStatusPing) Id ¶
func (this *PacketClientStatusPing) Id() int
type PacketClientStatusResponse ¶
type PacketClientStatusResponse struct {
Json string
}
func NewPacketClientStatusResponse ¶
func NewPacketClientStatusResponse(json string) (this *PacketClientStatusResponse)
func (*PacketClientStatusResponse) Id ¶
func (this *PacketClientStatusResponse) Id() int
type PacketClientTeams ¶
type PacketClientTeams struct { IdMapPacket Name string Action int8 DisplayName string Prefix string Suffix string FriendlyFire int8 NameTagVisibility string CollisionRule string Color int Players []string }
func NewPacketClientTeamsAdd ¶
func NewPacketClientTeamsPlayersAdd ¶
func NewPacketClientTeamsPlayersAdd(idMap *IdMap, name string, players []string) (this *PacketClientTeams)
func NewPacketClientTeamsPlayersRemove ¶
func NewPacketClientTeamsPlayersRemove(idMap *IdMap, name string, players []string) (this *PacketClientTeams)
func NewPacketClientTeamsRemove ¶
func NewPacketClientTeamsRemove(idMap *IdMap, name string) (this *PacketClientTeams)
func (*PacketClientTeams) IdFrom ¶
func (this *PacketClientTeams) IdFrom(idMap *IdMap)
type PacketClientViewDistance ¶
type PacketClientViewDistance struct { IdMapPacket ViewDistance int }
func NewPacketClientViewDistance ¶
func NewPacketClientViewDistance(idMap *IdMap, viewDistance int) (this *PacketClientViewDistance)
func (*PacketClientViewDistance) IdFrom ¶
func (this *PacketClientViewDistance) IdFrom(idMap *IdMap)
type PacketGeneric ¶
type PacketGeneric struct { Bytes []byte // contains filtered or unexported fields }
func NewPacketGeneric ¶
func NewPacketGeneric(id int, bytes []byte, compressed bool, swappers *PacketGenericSwappers) (this *PacketGeneric)
func (*PacketGeneric) Decompress ¶
func (this *PacketGeneric) Decompress() (err error)
func (*PacketGeneric) Id ¶
func (this *PacketGeneric) Id() int
func (*PacketGeneric) Raw ¶
func (this *PacketGeneric) Raw() bool
func (*PacketGeneric) SwapEntities ¶
func (this *PacketGeneric) SwapEntities(a int32, b int32, isClientBound bool)
type PacketGenericSwappers ¶
type PacketServerClientSettings ¶
type PacketServerClientSettings struct { IdMapPacket Locale string ViewDistance byte ChatFlags byte ChatColours bool Difficulty byte SkinParts byte MainHand int DisableTextFiltering bool AllowServerListings bool // 1.18+ }
func (*PacketServerClientSettings) IdFrom ¶
func (this *PacketServerClientSettings) IdFrom(idMap *IdMap)
type PacketServerHandshake ¶
type PacketServerHandshake struct { ProtocolVersion int ServerAddress string ServerPort uint16 State int }
func NewPacketServerHandshake ¶
func NewPacketServerHandshake(protocolVersion int, serverAddress string, serverPort uint16, state int) (this *PacketServerHandshake)
func (*PacketServerHandshake) Id ¶
func (this *PacketServerHandshake) Id() int
type PacketServerLoginEncryptResponse ¶
type PacketServerLoginEncryptResponse struct { IdMapPacket VerifyToken []byte Salt int64 // 1.19+ Signature []byte // 1.19+ }
func (*PacketServerLoginEncryptResponse) IdFrom ¶
func (this *PacketServerLoginEncryptResponse) IdFrom(idMap *IdMap)
type PacketServerLoginStart ¶
type PacketServerLoginStart struct { IdMapPacket Name string PublicKey *ProfilePublicKey UUID *uuid.UUID // 1.19.1+ }
func NewPacketServerLoginStart ¶
func NewPacketServerLoginStart(idMap *IdMap, name string, uuid *uuid.UUID) (this *PacketServerLoginStart)
func (*PacketServerLoginStart) IdFrom ¶
func (this *PacketServerLoginStart) IdFrom(idMap *IdMap)
type PacketServerPluginMessage ¶
type PacketServerPluginMessage struct { IdMapPacket Channel string Data []byte }
func NewPacketServerPluginMessage ¶
func NewPacketServerPluginMessage(idMap *IdMap, channel string, data []byte) (this *PacketServerPluginMessage)
func (*PacketServerPluginMessage) IdFrom ¶
func (this *PacketServerPluginMessage) IdFrom(idMap *IdMap)
type PacketServerStatusPing ¶
type PacketServerStatusPing struct {
Time int64
}
func NewPacketServerStatusPing ¶
func NewPacketServerStatusPing(time int64) (this *PacketServerStatusPing)
func (*PacketServerStatusPing) Id ¶
func (this *PacketServerStatusPing) Id() int
type PacketServerStatusRequest ¶
type PacketServerStatusRequest struct { }
func NewPacketServerStatusRequest ¶
func NewPacketServerStatusRequest() (this *PacketServerStatusRequest)
func (*PacketServerStatusRequest) Id ¶
func (this *PacketServerStatusRequest) Id() int
type ProfilePublicKey ¶
func ReadProfilePublicKey ¶
func ReadProfilePublicKey(reader io.Reader) (val *ProfilePublicKey, err error)
type Version ¶
type Version struct { Name string NameLatest string LoginClientCodec packet.PacketPipelineChild LoginServerCodec packet.PacketPipelineChild PlayClientCodec packet.PacketPipelineChild PlayServerCodec packet.PacketPipelineChild IdMap *IdMap Id []int IdLatest int }
type VersionTable ¶
type VersionTable struct {
// contains filtered or unexported fields
}
func NewVersionTable ¶
func NewVersionTable() (this *VersionTable)
func NewVersionTableFrom ¶
func NewVersionTableFrom(versions ...*Version) (this *VersionTable)
func (*VersionTable) ById ¶
func (this *VersionTable) ById(id int) *Version
func (*VersionTable) Latest ¶
func (this *VersionTable) Latest() *Version
func (*VersionTable) Register ¶
func (this *VersionTable) Register(register *Version)
Source Files ¶
- client_disconnect.go
- client_join_game.go
- client_login_disconnect.go
- client_login_encrypt_request.go
- client_login_set_compression.go
- client_login_success.go
- client_player_info_remove.go
- client_player_info_update.go
- client_player_list.go
- client_respawn.go
- client_scoreboard_objective.go
- client_set_compression.go
- client_status_ping.go
- client_status_response.go
- client_teams.go
- client_view_distance.go
- constants.go
- game_profile.go
- generic_packet.go
- id_map.go
- id_map_packet.go
- location.go
- profile_public_key.go
- server_client_settings.go
- server_handshake.go
- server_login_encrypt_response.go
- server_login_start.go
- server_plugin_message.go
- server_status_ping.go
- server_status_request.go
- util.go
- version.go
- version_table.go
Click to show internal directories.
Click to hide internal directories.