Documentation
¶
Index ¶
- Variables
- type Argument
- type BlockUpdate
- type BundleDelimiter
- type ChangeDifficulty
- type ChatCommandServer
- type ChatMessageServer
- type ChunkData
- type ClickContainer
- type ClientCommandServer
- type ClientSettings
- type CombatDeath
- type CommandSuggestionsRequest
- type CommandSuggestionsResponse
- type ConfigurationClientboundPluginMessage
- type DamageEvent
- type DeclareCommands
- type DeleteMessage
- type DestroyEntities
- type DisconnectLogin
- type DisconnectPlay
- type DisguisedChatMessage
- type Enchantment
- type EncryptionRequest
- type EncryptionRequest121
- type EncryptionResponse
- type EntityAnimation
- type EntityEvent
- type EntityHeadRotation
- type EntityPosition
- type EntityPositionRotation
- type EntityRotation
- type EntitySoundEffect
- type Explosion
- type GameEvent
- type Handshake
- type HeldItemChange
- type HurtAnimation
- type InteractServer
- type JoinGame
- type KeepAliveClient
- type KeepAliveServer
- type LoginStart
- type LoginSuccess
- type LoginSuccess121
- type MessageAcknowledgment
- type Packet
- type PaddleBoat
- type Particle
- type Ping
- type PlayClientboundPluginMessage
- type PlayerAbilities
- type PlayerAbilitiesServer
- type PlayerActionServer
- type PlayerChatMessage
- type PlayerCommandServer
- type PlayerInfoRemove
- type PlayerInfoUpdate
- type PlayerMovement
- type PlayerPosition
- type PlayerPositionRotation
- type PlayerRotation
- type PlayerSessionServer
- type Pong
- type PreviousMessage
- type Request
- type ResourcePack
- type ResourcePackResult
- type Respawn
- type Response
- type ServerData
- type SetBlockDestroyStage
- type SetCenterChunk
- type SetCompression
- type SetContainerContent
- type SetContainerSlot
- type SetCreativeModeSlot
- type SetDefaultSpawnPosition
- type SetEntityMetadata
- type SetEntityVelocity
- type SetEquipment
- type SetHealth
- type SetHeldItem
- type SetHeldItemServer
- type SetTablistHeaderFooter
- type Slot
- type SlotTag
- type SoundEffect
- type SpawnEntity
- type SpawnPlayer
- type SuggestionMatch
- type SwingArmServer
- type SyncPlayerPos
- type SystemChatMessage
- type Tag
- type TagType
- type TeleportConfirm
- type TeleportEntity
- type TeleportToEntityServer
- type TestPacket
- type Unknown
- type UnloadChunk
- type UpdateTags
- type UpdateTime
- type UseItem
- type UseItemOnServer
- type WorldEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var NotImplemented = errors.New("a packet field has not been implemented")
Functions ¶
This section is empty.
Types ¶
type BlockUpdate ¶
func (BlockUpdate) ID ¶
func (c BlockUpdate) ID() int32
type BundleDelimiter ¶
type BundleDelimiter struct{}
func (BundleDelimiter) ID ¶
func (b BundleDelimiter) ID() int32
type ChangeDifficulty ¶
func (ChangeDifficulty) ID ¶
func (m ChangeDifficulty) ID() int32
type ChatCommandServer ¶
type ChatCommandServer struct { Command string Timestamp int64 Salt int64 ArgumentSignatures []Argument AcknowledgedMessages []int64 }
func (ChatCommandServer) ID ¶
func (m ChatCommandServer) ID() int32
type ChatMessageServer ¶
type ChatMessageServer struct { Message string Timestamp int64 Salt int64 Signature []byte AcknowledgedMessages []int64 }
func (ChatMessageServer) ID ¶
func (m ChatMessageServer) ID() int32
type ChunkData ¶
type ClickContainer ¶
type ClickContainer struct { WindowID uint8 StateID int32 Slot int16 Button int8 Mode int32 Slots map[int16]Slot CarriedItem Slot }
func (ClickContainer) ID ¶
func (c ClickContainer) ID() int32
type ClientCommandServer ¶
type ClientCommandServer struct {
ActionID int32
}
func (ClientCommandServer) ID ¶
func (m ClientCommandServer) ID() int32
type ClientSettings ¶
type ClientSettings struct { Locale string ViewDistance int8 ChatMode int32 ChatColors bool DisplayedSkinParts uint8 MainHand int32 DisableTextFiltering bool AllowServerListings bool }
func (ClientSettings) ID ¶
func (s ClientSettings) ID() int32
type CombatDeath ¶
func (CombatDeath) ID ¶
func (c CombatDeath) ID() int32
type CommandSuggestionsRequest ¶
func (*CommandSuggestionsRequest) Decode ¶
func (m *CommandSuggestionsRequest) Decode(r *encoding.Reader) error
func (CommandSuggestionsRequest) Encode ¶
func (m CommandSuggestionsRequest) Encode(w *encoding.Writer) error
func (CommandSuggestionsRequest) ID ¶
func (m CommandSuggestionsRequest) ID() int32
type CommandSuggestionsResponse ¶
type CommandSuggestionsResponse struct { TransactionId int32 Start int32 Length int32 Matches []SuggestionMatch }
func (*CommandSuggestionsResponse) Decode ¶
func (m *CommandSuggestionsResponse) Decode(r *encoding.Reader) error
func (CommandSuggestionsResponse) Encode ¶
func (m CommandSuggestionsResponse) Encode(w *encoding.Writer) error
func (CommandSuggestionsResponse) ID ¶
func (m CommandSuggestionsResponse) ID() int32
type ConfigurationClientboundPluginMessage ¶
func (ConfigurationClientboundPluginMessage) Decode ¶
func (p ConfigurationClientboundPluginMessage) Decode(r *encoding.Reader) error
func (ConfigurationClientboundPluginMessage) Encode ¶
func (p ConfigurationClientboundPluginMessage) Encode(w *encoding.Writer) error
func (ConfigurationClientboundPluginMessage) ID ¶
func (p ConfigurationClientboundPluginMessage) ID() int32
type DamageEvent ¶
type DamageEvent struct { EntityID int32 SourceTypeID int32 SourceCauseID int32 SourceDirectID int32 HasSrcPos bool X, Y, Z float64 }
func (DamageEvent) ID ¶
func (l DamageEvent) ID() int32
type DeclareCommands ¶
type DeclareCommands struct { Nodes []types.CommandNode RootIndex int32 }
func (*DeclareCommands) ID ¶
func (d *DeclareCommands) ID() int32
type DeleteMessage ¶
func (DeleteMessage) ID ¶
func (m DeleteMessage) ID() int32
type DestroyEntities ¶
type DestroyEntities struct {
EntityIds []int32
}
func (DestroyEntities) ID ¶
func (d DestroyEntities) ID() int32
type DisconnectLogin ¶
func (DisconnectLogin) ID ¶
func (l DisconnectLogin) ID() int32
type DisconnectPlay ¶
type DisconnectPlay struct {
DisconnectLogin
}
func (DisconnectPlay) ID ¶
func (p DisconnectPlay) ID() int32
type DisguisedChatMessage ¶
type DisguisedChatMessage struct { Message chat.Message ChatType int32 ChatTypeName chat.Message TargetName *chat.Message }
func (*DisguisedChatMessage) Decode ¶
func (m *DisguisedChatMessage) Decode(r *encoding.Reader) error
func (DisguisedChatMessage) ID ¶
func (m DisguisedChatMessage) ID() int32
type Enchantment ¶
type EncryptionRequest ¶
func (EncryptionRequest) ID ¶
func (r EncryptionRequest) ID() int32
type EncryptionRequest121 ¶
type EncryptionRequest121 struct { *EncryptionRequest ShouldAuthenticate bool }
type EncryptionResponse ¶
type EncryptionResponse struct { VerifyToken []byte }
func (EncryptionResponse) ID ¶
func (e EncryptionResponse) ID() int32
type EntityAnimation ¶
func (EntityAnimation) ID ¶
func (a EntityAnimation) ID() int32
type EntityEvent ¶
func (EntityEvent) ID ¶
func (c EntityEvent) ID() int32
type EntityHeadRotation ¶
func (EntityHeadRotation) ID ¶
func (l EntityHeadRotation) ID() int32
type EntityPosition ¶
func (EntityPosition) ID ¶
func (p EntityPosition) ID() int32
type EntityPositionRotation ¶
func (*EntityPositionRotation) Decode ¶
func (r *EntityPositionRotation) Decode(rd *encoding.Reader) error
func (EntityPositionRotation) Encode ¶
func (r EntityPositionRotation) Encode(w *encoding.Writer) error
func (EntityPositionRotation) ID ¶
func (r EntityPositionRotation) ID() int32
type EntityRotation ¶
func (EntityRotation) ID ¶
func (r EntityRotation) ID() int32
type EntitySoundEffect ¶
type EntitySoundEffect struct { SoundID int32 SoundName string HasRange bool Range float32 Category int32 EntityID int32 Volume, Pitch float32 Seed int64 }
func (EntitySoundEffect) ID ¶
func (c EntitySoundEffect) ID() int32
type Explosion ¶
type Handshake ¶
type HeldItemChange ¶
type HeldItemChange struct {
Slot int16
}
func (*HeldItemChange) ID ¶
func (c *HeldItemChange) ID() int32
type HurtAnimation ¶
func (HurtAnimation) ID ¶
func (l HurtAnimation) ID() int32
type InteractServer ¶
type InteractServer struct { EntityID int32 Type int32 TargetX float32 TargetY float32 TargetZ float32 Hand int32 Sneaking bool }
func (InteractServer) ID ¶
func (p InteractServer) ID() int32
type JoinGame ¶
type JoinGame struct { EntityID int32 IsHardcore bool GameMode uint8 PreviousGameMode int8 DimensionNames []string Registry []byte DimensionType string DimensionName string HashedSeed int64 MaxPlayers int32 ViewDistance int32 SimulationDistance int32 ReducedDebugInfo bool EnableRespawnScreen bool IsDebug bool IsFlat bool DeathDimensionName string DeathLocation uint64 PartialCooldown int32 }
type KeepAliveClient ¶
type KeepAliveClient struct {
PayloadID int64
}
func (*KeepAliveClient) ID ¶
func (a *KeepAliveClient) ID() int32
type KeepAliveServer ¶
type KeepAliveServer struct {
PayloadID int64
}
func (*KeepAliveServer) ID ¶
func (a *KeepAliveServer) ID() int32
type LoginStart ¶
func (LoginStart) ID ¶
func (s LoginStart) ID() int32
type LoginSuccess ¶
func (LoginSuccess) ID ¶
func (s LoginSuccess) ID() int32
type LoginSuccess121 ¶
type LoginSuccess121 struct { *LoginSuccess StrictErrorHandling bool }
type MessageAcknowledgment ¶
type MessageAcknowledgment struct {
MessageCount int32
}
func (*MessageAcknowledgment) Decode ¶
func (m *MessageAcknowledgment) Decode(r *encoding.Reader) error
func (MessageAcknowledgment) Encode ¶
func (m MessageAcknowledgment) Encode(w *encoding.Writer) error
func (MessageAcknowledgment) ID ¶
func (m MessageAcknowledgment) ID() int32
type PaddleBoat ¶
func (PaddleBoat) ID ¶
func (p PaddleBoat) ID() int32
type Particle ¶
type PlayClientboundPluginMessage ¶
func (PlayClientboundPluginMessage) Decode ¶
func (p PlayClientboundPluginMessage) Decode(r *encoding.Reader) error
func (PlayClientboundPluginMessage) Encode ¶
func (p PlayClientboundPluginMessage) Encode(w *encoding.Writer) error
func (PlayClientboundPluginMessage) ID ¶
func (p PlayClientboundPluginMessage) ID() int32
type PlayerAbilities ¶
func (PlayerAbilities) ID ¶
func (p PlayerAbilities) ID() int32
type PlayerAbilitiesServer ¶
type PlayerAbilitiesServer struct {
Flags byte
}
func (*PlayerAbilitiesServer) Decode ¶
func (p *PlayerAbilitiesServer) Decode(r *encoding.Reader) error
func (PlayerAbilitiesServer) Encode ¶
func (p PlayerAbilitiesServer) Encode(w *encoding.Writer) error
func (PlayerAbilitiesServer) ID ¶
func (p PlayerAbilitiesServer) ID() int32
type PlayerActionServer ¶
func (PlayerActionServer) ID ¶
func (m PlayerActionServer) ID() int32
type PlayerChatMessage ¶
type PlayerChatMessage struct { //Header Sender [16]byte Index int32 MessageSignature []byte //Body Message string Timestamp int64 Salt int64 //Previous Messages PreviousMessages []PreviousMessage //Other UnsignedContent *chat.Message FilterType int32 FilterTypeBits []int64 //Network Target ChatType int32 NetworkName chat.Message NetworkTargetName *chat.Message }
func (PlayerChatMessage) ID ¶
func (m PlayerChatMessage) ID() int32
type PlayerCommandServer ¶
func (PlayerCommandServer) ID ¶
func (m PlayerCommandServer) ID() int32
type PlayerInfoRemove ¶
type PlayerInfoRemove struct {
UUIDs [][16]byte
}
func (PlayerInfoRemove) ID ¶
func (p PlayerInfoRemove) ID() int32
type PlayerInfoUpdate ¶
type PlayerInfoUpdate struct { Actions byte Players []types.PlayerInfo }
func (*PlayerInfoUpdate) ID ¶
func (i *PlayerInfoUpdate) ID() int32
type PlayerMovement ¶
type PlayerMovement struct {
OnGround bool
}
func (PlayerMovement) ID ¶
func (m PlayerMovement) ID() int32
type PlayerPosition ¶
func (PlayerPosition) ID ¶
func (p PlayerPosition) ID() int32
type PlayerPositionRotation ¶
func (*PlayerPositionRotation) Decode ¶
func (r *PlayerPositionRotation) Decode(rd *encoding.Reader) error
func (PlayerPositionRotation) Encode ¶
func (r PlayerPositionRotation) Encode(w *encoding.Writer) error
func (PlayerPositionRotation) ID ¶
func (r PlayerPositionRotation) ID() int32
type PlayerRotation ¶
func (PlayerRotation) ID ¶
func (r PlayerRotation) ID() int32
type PlayerSessionServer ¶
type PlayerSessionServer struct { SessionID [16]byte ExpiresAt int64 PublicKey []byte KeySignature []byte }
func (PlayerSessionServer) ID ¶
func (m PlayerSessionServer) ID() int32
type PreviousMessage ¶
type ResourcePack ¶
func (ResourcePack) ID ¶
func (c ResourcePack) ID() int32
type ResourcePackResult ¶
type ResourcePackResult struct {
Result int32
}
func (ResourcePackResult) ID ¶
func (m ResourcePackResult) ID() int32
type Respawn ¶
type ServerData ¶
func (ServerData) ID ¶
func (m ServerData) ID() int32
type SetBlockDestroyStage ¶
func (*SetBlockDestroyStage) Decode ¶
func (c *SetBlockDestroyStage) Decode(r *encoding.Reader) error
func (SetBlockDestroyStage) ID ¶
func (c SetBlockDestroyStage) ID() int32
type SetCenterChunk ¶
func (SetCenterChunk) ID ¶
func (p SetCenterChunk) ID() int32
type SetCompression ¶
type SetCompression struct {
Threshold int32
}
func (SetCompression) ID ¶
func (s SetCompression) ID() int32
type SetContainerContent ¶
func (SetContainerContent) ID ¶
func (m SetContainerContent) ID() int32
type SetContainerSlot ¶
func (*SetContainerSlot) ID ¶
func (s *SetContainerSlot) ID() int32
type SetCreativeModeSlot ¶
func (SetCreativeModeSlot) ID ¶
func (c SetCreativeModeSlot) ID() int32
type SetDefaultSpawnPosition ¶
func (SetDefaultSpawnPosition) Decode ¶
func (s SetDefaultSpawnPosition) Decode(r *encoding.Reader) error
func (SetDefaultSpawnPosition) Encode ¶
func (s SetDefaultSpawnPosition) Encode(w *encoding.Writer) error
func (SetDefaultSpawnPosition) ID ¶
func (s SetDefaultSpawnPosition) ID() int32
type SetEntityMetadata ¶
func (*SetEntityMetadata) ID ¶
func (*SetEntityMetadata) ID() int32
type SetEntityVelocity ¶
func (SetEntityVelocity) ID ¶
func (p SetEntityVelocity) ID() int32
type SetEquipment ¶
func (SetEquipment) ID ¶
func (m SetEquipment) ID() int32
type SetHeldItem ¶
type SetHeldItem struct {
Slot int8
}
func (SetHeldItem) ID ¶
func (m SetHeldItem) ID() int32
type SetHeldItemServer ¶
type SetHeldItemServer struct {
Slot int16
}
func (SetHeldItemServer) ID ¶
func (m SetHeldItemServer) ID() int32
type SetTablistHeaderFooter ¶
type SetTablistHeaderFooter struct {}
func (*SetTablistHeaderFooter) Decode ¶
func (m *SetTablistHeaderFooter) Decode(r *encoding.Reader) error
func (SetTablistHeaderFooter) Encode ¶
func (m SetTablistHeaderFooter) Encode(w *encoding.Writer) error
func (SetTablistHeaderFooter) ID ¶
func (m SetTablistHeaderFooter) ID() int32
type SlotTag ¶
type SlotTag struct { Damage int32 `nbt:"Damage"` RepairCost int32 `nbt:"RepairCost"` Enchantments []Enchantment `nbt:"Enchantments"` }
type SoundEffect ¶
func (*SoundEffect) ID ¶
func (e *SoundEffect) ID() int32
type SpawnEntity ¶
type SpawnEntity struct { EntityID int32 UUID [16]byte Type int32 X, Y, Z float64 Pitch, Yaw, HeadYaw byte Data int32 VelocityX, VelocityY, VelocityZ int16 }
func (*SpawnEntity) ID ¶
func (e *SpawnEntity) ID() int32
type SpawnPlayer ¶
func (SpawnPlayer) ID ¶
func (p SpawnPlayer) ID() int32
type SuggestionMatch ¶
type SwingArmServer ¶
type SwingArmServer struct {
Hand int32
}
func (SwingArmServer) ID ¶
func (s SwingArmServer) ID() int32
type SyncPlayerPos ¶
SyncPlayerPos updates the player's position on the client's side.
func (*SyncPlayerPos) ID ¶
func (l *SyncPlayerPos) ID() int32
type SystemChatMessage ¶
func (SystemChatMessage) ID ¶
func (m SystemChatMessage) ID() int32
type TeleportConfirm ¶
type TeleportConfirm struct {
TeleportID int32
}
func (TeleportConfirm) ID ¶
func (t TeleportConfirm) ID() int32
type TeleportEntity ¶
func (TeleportEntity) ID ¶
func (r TeleportEntity) ID() int32
type TeleportToEntityServer ¶
type TeleportToEntityServer struct {
Player [16]byte
}
func (*TeleportToEntityServer) Decode ¶
func (s *TeleportToEntityServer) Decode(r *encoding.Reader) error
func (TeleportToEntityServer) Encode ¶
func (s TeleportToEntityServer) Encode(w *encoding.Writer) error
func (TeleportToEntityServer) ID ¶
func (s TeleportToEntityServer) ID() int32
type TestPacket ¶
type TestPacket struct { Boolean bool Byte int8 UnsignedByte uint8 Short int16 UnsignedShort uint16 Int int32 Long int64 Float float32 Double float64 String string VarInt int32 VarLong int64 UUID [16]byte ByteArray []uint8 }
TestPacket is a packet which holds every possible data type which can be received or sent to the client
func (*TestPacket) ID ¶
func (t *TestPacket) ID() int32
type UnloadChunk ¶
type UnloadChunk struct {
ChunkX, ChunkZ int32
}
func (UnloadChunk) ID ¶
func (c UnloadChunk) ID() int32
type UpdateTags ¶
type UpdateTags struct {
Tags []TagType
}
func (*UpdateTags) ID ¶
func (*UpdateTags) ID() int32
type UpdateTime ¶
func (UpdateTime) ID ¶
func (c UpdateTime) ID() int32
type UseItemOnServer ¶
type UseItemOnServer struct { Hand int32 Location types.Position Face int32 CursorPositionX, CursorPositionY, CursorPositionZ float32 InsideBlock bool Sequence int32 }
func (UseItemOnServer) ID ¶
func (m UseItemOnServer) ID() int32
Source Files
¶
- block_update.go
- bundle_delimiter.go
- change_difficulty.go
- chat_command.go
- chat_message.go
- chunk_data.go
- click_container.go
- client_command.go
- client_settings.go
- combat_death.go
- command_suggestions_request.go
- command_suggestions_response.go
- damage_event.go
- declare_commands.go
- delete_message.go
- destroy_entites.go
- disconnect.go
- disguised_chat_message.go
- encryption_request.go
- encryption_response.go
- entity_animation.go
- entity_event.go
- entity_head_rotation.go
- entity_metadata.go
- entity_position.go
- entity_position_rotation.go
- entity_rotation.go
- entity_sound_effect.go
- explosion.go
- game_event.go
- handshake.go
- held_item_change.go
- hurt_animation.go
- interact.go
- join_game.go
- keep_alive.go
- login_start.go
- login_success.go
- message_acknowledgement.go
- packet.go
- paddle_boat.go
- particle.go
- ping_pong.go
- player_abilities.go
- player_abilities_server.go
- player_action.go
- player_chat_message.go
- player_command.go
- player_info_remove.go
- player_info_update.go
- player_movement.go
- player_position.go
- player_position_look.go
- player_position_rotation.go
- player_rotation.go
- player_session.go
- plugin_message.go
- request.go
- resource_pack.go
- resource_pack_result.go
- respawn.go
- response.go
- server_data.go
- set_block_destroy_stage.go
- set_center_chunk.go
- set_compression.go
- set_container_content.go
- set_creative_mode_slot.go
- set_default_spawn_position.go
- set_entity_velocity.go
- set_equipment.go
- set_health.go
- set_held_item.go
- set_held_item_server.go
- set_slot.go
- set_tablist_header_footer.go
- sound_effect.go
- spawn_entity.go
- spawn_player.go
- swingarm.go
- system_chat_message.go
- teleport_confirm.go
- teleport_entity.go
- teleport_to_entity.go
- test_packet.go
- unload_chunk.go
- update_tags.go
- update_time.go
- use_item.go
- use_item_on.go
- world_event.go
Click to show internal directories.
Click to hide internal directories.