Documentation ¶
Index ¶
- Constants
- type AddEntityPacket
- type AddPlayerPacket
- type AnimatePacket
- type ChunkRadiusUpdatedPacket
- type ClientHandshakePacket
- type CommandRequestPacket
- type CraftingDataPacket
- type DisconnectPacket
- type FullChunkDataPacket
- type InteractPacket
- type InventoryTransactionPacket
- type LoginPacket
- type MoveEntityPacket
- type MovePlayerPacket
- type NetworkChunkPublisherUpdatePacket
- type PlayStatusPacket
- type PlayerActionPacket
- type PlayerListPacket
- type PlayerSkinPacket
- type RemoveEntityPacket
- type RequestChunkRadiusPacket
- type ResourcePackChunkDataPacket
- type ResourcePackChunkRequestPacket
- type ResourcePackClientResponsePacket
- type ResourcePackDataInfoPacket
- type ResourcePackInfoPacket
- type ResourcePackStackPacket
- type ServerHandshakePacket
- type SetEntityDataPacket
- type StartGamePacket
- type TextPacket
- type TransferPacket
- type UpdateAttributesPacket
- type UpdateBlockPacket
Constants ¶
View Source
const ( SwingArm = 1 StopSleeping = 3 CriticalHit = 4 )
View Source
const ( RightClick = 1 LeftClick = 2 LeaveCehicle = 3 MouseOver = 4 )
View Source
const ( Normal = iota + 0 Mismatch UseItem UseItemOnEntity ReleaseItem )
Transaction Types
View Source
const ( ItemClickBlock = iota + 0 ItemClickAir ItemBreakBlock //CONSUMABLE ITEMS ItemRelease = iota + 0 ItemConsume )
Action Types
View Source
const ( ItemOnEntityInteract = iota + 0 ItemOnEntityAttack )
Entity Action types
View Source
const ( PlayerStartBreak = iota PlayerAbortBreak PlayerStopBreak PlayerGetUpdatedBlock PlayerDropItem PlayerStopSleeping PlayerRespawn PlayerJump PlayerStartSprint PlayerStopSprint PlayerStartSneak PlayerStopSneak PlayerDimensionChangeRequest PlayerDimensionChangeAck PlayerStartGlide PlayerStopGlide PlayerBuildDenied PlayerContinueBreak )
View Source
const ( GameBroadcastSettingNone = iota GameBroadcastSettingInviteOnly GameBroadcastSettingFriendsOnly GameBroadcastSettingFriendsOfFriends GameBroadcastSettingPublic )
View Source
const ( DataLayerNormal = iota DataLayerLiquid )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddEntityPacket ¶
type AddEntityPacket struct { *packets.Packet UniqueId int64 RuntimeId uint64 EntityType uint32 Position r3.Vector Motion r3.Vector Rotation data.Rotation Attributes data.AttributeMap EntityData map[uint32][]interface{} }
func NewAddEntityPacket ¶
func NewAddEntityPacket() *AddEntityPacket
func (*AddEntityPacket) Decode ¶
func (pk *AddEntityPacket) Decode()
func (*AddEntityPacket) Encode ¶
func (pk *AddEntityPacket) Encode()
type AddPlayerPacket ¶
type AddPlayerPacket struct { *packets.Packet UUID uuid.UUID Username string PlatformChatId string EntityUniqueId int64 EntityRuntimeId uint64 Position r3.Vector Motion r3.Vector Rotation data.Rotation // HandItem TODO: Items. Metadata map[uint32][]interface{} Flags uint32 CommandPermission uint32 Flags2 uint32 PlayerPermission uint32 CustomFlags uint32 Long1 int64 // EntityLinks TODO DeviceID string }
func NewAddPlayerPacket ¶
func NewAddPlayerPacket() *AddPlayerPacket
func (*AddPlayerPacket) Decode ¶
func (pk *AddPlayerPacket) Decode()
func (*AddPlayerPacket) Encode ¶
func (pk *AddPlayerPacket) Encode()
type AnimatePacket ¶
func NewAnimatePacket ¶
func NewAnimatePacket() *AnimatePacket
func (*AnimatePacket) Decode ¶
func (pk *AnimatePacket) Decode()
func (*AnimatePacket) Encode ¶
func (pk *AnimatePacket) Encode()
type ChunkRadiusUpdatedPacket ¶
func NewChunkRadiusUpdatedPacket ¶
func NewChunkRadiusUpdatedPacket() *ChunkRadiusUpdatedPacket
func (*ChunkRadiusUpdatedPacket) Decode ¶
func (pk *ChunkRadiusUpdatedPacket) Decode()
func (*ChunkRadiusUpdatedPacket) Encode ¶
func (pk *ChunkRadiusUpdatedPacket) Encode()
type ClientHandshakePacket ¶
func NewClientHandshakePacket ¶
func NewClientHandshakePacket() *ClientHandshakePacket
func (*ClientHandshakePacket) Decode ¶
func (pk *ClientHandshakePacket) Decode()
func (*ClientHandshakePacket) Encode ¶
func (pk *ClientHandshakePacket) Encode()
type CommandRequestPacket ¶
type CommandRequestPacket struct { *packets.Packet CommandText string Type uint32 UUID uuid.UUID RequestId string Internal bool }
func NewCommandRequestPacket ¶
func NewCommandRequestPacket() *CommandRequestPacket
func (*CommandRequestPacket) Decode ¶
func (pk *CommandRequestPacket) Decode()
func (*CommandRequestPacket) Encode ¶
func (pk *CommandRequestPacket) Encode()
type CraftingDataPacket ¶
func NewCraftingDataPacket ¶
func NewCraftingDataPacket() *CraftingDataPacket
func (*CraftingDataPacket) Decode ¶
func (pk *CraftingDataPacket) Decode()
func (*CraftingDataPacket) Encode ¶
func (pk *CraftingDataPacket) Encode()
type DisconnectPacket ¶
func NewDisconnectPacket ¶
func NewDisconnectPacket() *DisconnectPacket
func (*DisconnectPacket) Decode ¶
func (pk *DisconnectPacket) Decode()
func (*DisconnectPacket) Encode ¶
func (pk *DisconnectPacket) Encode()
type FullChunkDataPacket ¶
func NewFullChunkDataPacket ¶
func NewFullChunkDataPacket() *FullChunkDataPacket
func (*FullChunkDataPacket) Decode ¶
func (pk *FullChunkDataPacket) Decode()
func (*FullChunkDataPacket) Encode ¶
func (pk *FullChunkDataPacket) Encode()
type InteractPacket ¶
func NewInteractPacket ¶
func NewInteractPacket() *InteractPacket
func (*InteractPacket) Decode ¶
func (pk *InteractPacket) Decode()
func (*InteractPacket) Encode ¶
func (pk *InteractPacket) Encode()
type InventoryTransactionPacket ¶
type InventoryTransactionPacket struct { *packets.Packet ActionList *io.InventoryActionIOList TransactionType, ActionType uint32 Face, HotbarSlot int32 ItemSlot *items.Stack BlockPosition blocks.Position PlayerPosition, ClickPosition, HeadPosition r3.Vector RuntimeId uint64 }
func NewInventoryTransactionPacket ¶
func NewInventoryTransactionPacket() *InventoryTransactionPacket
func (*InventoryTransactionPacket) Decode ¶
func (pk *InventoryTransactionPacket) Decode()
func (*InventoryTransactionPacket) Encode ¶
func (pk *InventoryTransactionPacket) Encode()
type LoginPacket ¶
type LoginPacket struct { *packets.Packet Username string Protocol int32 ClientUUID uuid.UUID ClientId int ClientXUID string IdentityPublicKey string ServerAddress string Language string SkinId string SkinData []byte CapeData []byte GeometryName string GeometryData string ClientData types.ClientDataKeys Chains []types.Chain }
func NewLoginPacket ¶
func NewLoginPacket() *LoginPacket
func (*LoginPacket) BuildChain ¶
func (pk *LoginPacket) BuildChain(raw string) types.Chain
func (*LoginPacket) Decode ¶
func (pk *LoginPacket) Decode()
func (*LoginPacket) Encode ¶
func (pk *LoginPacket) Encode()
type MoveEntityPacket ¶
type MoveEntityPacket struct { *packets.Packet RuntimeId uint64 Position r3.Vector Rotation data2.Rotation Flags byte }
func NewMoveEntityPacket ¶
func NewMoveEntityPacket() *MoveEntityPacket
func (*MoveEntityPacket) Decode ¶
func (pk *MoveEntityPacket) Decode()
func (*MoveEntityPacket) Encode ¶
func (pk *MoveEntityPacket) Encode()
type MovePlayerPacket ¶
type MovePlayerPacket struct { *packets.Packet RuntimeId uint64 Position r3.Vector Rotation data2.Rotation Mode byte OnGround bool RidingRuntimeId uint64 TeleportCause, TeleportItem int32 }
func NewMovePlayerPacket ¶
func NewMovePlayerPacket() *MovePlayerPacket
func (*MovePlayerPacket) Decode ¶
func (pk *MovePlayerPacket) Decode()
func (*MovePlayerPacket) Encode ¶
func (pk *MovePlayerPacket) Encode()
type NetworkChunkPublisherUpdatePacket ¶
type NetworkChunkPublisherUpdatePacket struct { *packets.Packet Position blocks.Position Radius uint32 }
func NewNetworkChunkPublisherUpdatePacket ¶
func NewNetworkChunkPublisherUpdatePacket() *NetworkChunkPublisherUpdatePacket
func (*NetworkChunkPublisherUpdatePacket) Decode ¶
func (pk *NetworkChunkPublisherUpdatePacket) Decode()
func (*NetworkChunkPublisherUpdatePacket) Encode ¶
func (pk *NetworkChunkPublisherUpdatePacket) Encode()
type PlayStatusPacket ¶
func NewPlayStatusPacket ¶
func NewPlayStatusPacket() *PlayStatusPacket
func (*PlayStatusPacket) Decode ¶
func (pk *PlayStatusPacket) Decode()
func (*PlayStatusPacket) Encode ¶
func (pk *PlayStatusPacket) Encode()
type PlayerActionPacket ¶
type PlayerActionPacket struct { *packets.Packet RuntimeId uint64 Action int32 Position blocks.Position Face int32 }
func NewPlayerActionPacket ¶
func NewPlayerActionPacket() *PlayerActionPacket
func (*PlayerActionPacket) Decode ¶
func (pk *PlayerActionPacket) Decode()
func (*PlayerActionPacket) Encode ¶
func (pk *PlayerActionPacket) Encode()
type PlayerListPacket ¶
type PlayerListPacket struct { *packets.Packet ListType byte Entries map[string]types.PlayerListEntry }
func NewPlayerListPacket ¶
func NewPlayerListPacket() *PlayerListPacket
func (*PlayerListPacket) Decode ¶
func (pk *PlayerListPacket) Decode()
func (*PlayerListPacket) Encode ¶
func (pk *PlayerListPacket) Encode()
type PlayerSkinPacket ¶
type PlayerSkinPacket struct { *packets.Packet UUID uuid.UUID SkinId string NewSkinName string OldSkinName string SkinData []byte CapeData []byte GeometryName string GeometryData string PremiumSkin bool }
func NewPlayerSkinPacket ¶
func NewPlayerSkinPacket() *PlayerSkinPacket
func (*PlayerSkinPacket) Decode ¶
func (pk *PlayerSkinPacket) Decode()
func (*PlayerSkinPacket) Encode ¶
func (pk *PlayerSkinPacket) Encode()
type RemoveEntityPacket ¶
func NewRemoveEntityPacket ¶
func NewRemoveEntityPacket() *RemoveEntityPacket
func (*RemoveEntityPacket) Decode ¶
func (pk *RemoveEntityPacket) Decode()
func (*RemoveEntityPacket) Encode ¶
func (pk *RemoveEntityPacket) Encode()
type RequestChunkRadiusPacket ¶
func NewRequestChunkRadiusPacket ¶
func NewRequestChunkRadiusPacket() *RequestChunkRadiusPacket
func (*RequestChunkRadiusPacket) Decode ¶
func (pk *RequestChunkRadiusPacket) Decode()
func (*RequestChunkRadiusPacket) Encode ¶
func (pk *RequestChunkRadiusPacket) Encode()
type ResourcePackChunkDataPacket ¶
type ResourcePackChunkDataPacket struct { *packets.Packet PackUUID string ChunkIndex int32 Progress int64 ChunkData []byte }
func NewResourcePackChunkDataPacket ¶
func NewResourcePackChunkDataPacket() *ResourcePackChunkDataPacket
func (*ResourcePackChunkDataPacket) Decode ¶
func (pk *ResourcePackChunkDataPacket) Decode()
func (*ResourcePackChunkDataPacket) Encode ¶
func (pk *ResourcePackChunkDataPacket) Encode()
type ResourcePackChunkRequestPacket ¶
func NewResourcePackChunkRequestPacket ¶
func NewResourcePackChunkRequestPacket() *ResourcePackChunkRequestPacket
func (*ResourcePackChunkRequestPacket) Decode ¶
func (pk *ResourcePackChunkRequestPacket) Decode()
func (*ResourcePackChunkRequestPacket) Encode ¶
func (pk *ResourcePackChunkRequestPacket) Encode()
type ResourcePackClientResponsePacket ¶
func NewResourcePackClientResponsePacket ¶
func NewResourcePackClientResponsePacket() *ResourcePackClientResponsePacket
func (*ResourcePackClientResponsePacket) Decode ¶
func (pk *ResourcePackClientResponsePacket) Decode()
func (*ResourcePackClientResponsePacket) Encode ¶
func (pk *ResourcePackClientResponsePacket) Encode()
type ResourcePackDataInfoPacket ¶
type ResourcePackDataInfoPacket struct { *packets.Packet PackUUID string MaxChunkSize int32 ChunkCount int32 CompressedPackSize int64 Sha256 string }
func NewResourcePackDataInfoPacket ¶
func NewResourcePackDataInfoPacket() *ResourcePackDataInfoPacket
func (*ResourcePackDataInfoPacket) Decode ¶
func (pk *ResourcePackDataInfoPacket) Decode()
func (*ResourcePackDataInfoPacket) Encode ¶
func (pk *ResourcePackDataInfoPacket) Encode()
type ResourcePackInfoPacket ¶
type ResourcePackInfoPacket struct { *packets.Packet MustAccept bool BehaviorPacks []types.ResourcePackInfoEntry ResourcePacks []types.ResourcePackInfoEntry Bool1 bool }
func NewResourcePackInfoPacket ¶
func NewResourcePackInfoPacket() *ResourcePackInfoPacket
func (*ResourcePackInfoPacket) Decode ¶
func (pk *ResourcePackInfoPacket) Decode()
func (*ResourcePackInfoPacket) Encode ¶
func (pk *ResourcePackInfoPacket) Encode()
type ResourcePackStackPacket ¶
type ResourcePackStackPacket struct { *packets.Packet MustAccept bool BehaviorPacks []types.ResourcePackStackEntry ResourcePacks []types.ResourcePackStackEntry Experimental bool }
func NewResourcePackStackPacket ¶
func NewResourcePackStackPacket() *ResourcePackStackPacket
func (*ResourcePackStackPacket) Decode ¶
func (pk *ResourcePackStackPacket) Decode()
func (*ResourcePackStackPacket) Encode ¶
func (pk *ResourcePackStackPacket) Encode()
type ServerHandshakePacket ¶
func NewServerHandshakePacket ¶
func NewServerHandshakePacket() *ServerHandshakePacket
func (*ServerHandshakePacket) Decode ¶
func (pk *ServerHandshakePacket) Decode()
func (*ServerHandshakePacket) Encode ¶
func (pk *ServerHandshakePacket) Encode()
type SetEntityDataPacket ¶
type SetEntityDataPacket struct { *packets.Packet RuntimeId uint64 EntityData map[uint32][]interface{} }
func NewSetEntityDataPacket ¶
func NewSetEntityDataPacket() *SetEntityDataPacket
func (*SetEntityDataPacket) Decode ¶
func (pk *SetEntityDataPacket) Decode()
func (*SetEntityDataPacket) Encode ¶
func (pk *SetEntityDataPacket) Encode()
type StartGamePacket ¶
type StartGamePacket struct { *packets.Packet EntityUniqueId int64 EntityRuntimeId uint64 PlayerGameMode int32 PlayerPosition r3.Vector Yaw float32 Pitch float32 LevelSeed int32 Dimension int32 Generator int32 LevelGameMode int32 Difficulty int32 LevelSpawnPosition blocks.Position AchievementsDisabled bool Time int32 EduMode bool EduFeaturesEnabled bool RainLevel float32 LightningLevel float32 Bool1 bool MultiPlayerGame bool BroadcastToLan bool CommandsEnabled bool ForcedResourcePacks bool GameRules map[string]types.GameRuleEntry BonusChest bool StartMap bool DefaultPermissionLevel int32 LevelName string IsTrial bool CurrentTick int64 EnchantmentSeed int32 ServerChunkTickRange int32 PlatformBroadcast bool XBOXBroadcastIntent int32 PlatformBroadcastIntent int32 LockedBehaviorPack bool LockedResourcePack bool FromLockedWorldTemplate bool FromWorldTemplate bool WorldTemplateOptionLocked bool RuntimeIdsTable []byte MultiplayerCorrelationID string }
func NewStartGamePacket ¶
func NewStartGamePacket() *StartGamePacket
func (*StartGamePacket) Decode ¶
func (pk *StartGamePacket) Decode()
func (*StartGamePacket) Encode ¶
func (pk *StartGamePacket) Encode()
type TextPacket ¶
type TextPacket struct { *packets.Packet TextType byte Translation bool SourceName string Message string XUID string PlatformChatId string Params []string }
func NewTextPacket ¶
func NewTextPacket() *TextPacket
func (*TextPacket) Decode ¶
func (pk *TextPacket) Decode()
func (*TextPacket) Encode ¶
func (pk *TextPacket) Encode()
type TransferPacket ¶
func NewTransferPacket ¶
func NewTransferPacket() *TransferPacket
func (*TransferPacket) Decode ¶
func (pk *TransferPacket) Decode()
func (*TransferPacket) Encode ¶
func (pk *TransferPacket) Encode()
type UpdateAttributesPacket ¶
type UpdateAttributesPacket struct { *packets.Packet RuntimeId uint64 Attributes data.AttributeMap }
func NewUpdateAttributesPacket ¶
func NewUpdateAttributesPacket() *UpdateAttributesPacket
func (*UpdateAttributesPacket) Decode ¶
func (pk *UpdateAttributesPacket) Decode()
func (*UpdateAttributesPacket) Encode ¶
func (pk *UpdateAttributesPacket) Encode()
type UpdateBlockPacket ¶
type UpdateBlockPacket struct { *packets.Packet Position blocks.Position BlockRuntimeId uint32 Flags uint32 DataLayerId uint32 }
func NewUpdateBlockPacket ¶
func NewUpdateBlockPacket() *UpdateBlockPacket
func (*UpdateBlockPacket) Decode ¶
func (pk *UpdateBlockPacket) Decode()
func (*UpdateBlockPacket) Encode ¶
func (pk *UpdateBlockPacket) Encode()
Source Files ¶
- add_entity.go
- add_player.go
- animate.go
- chunk_radius_updated.go
- client_handshake.go
- command_request.go
- crafting_data.go
- disconnect.go
- full_chunk_data.go
- interact_packet.go
- inventory_transaction.go
- login.go
- move_entity.go
- move_player.go
- network_chunk_publisher_update.go
- play_status.go
- player_action.go
- player_list.go
- player_skin.go
- remove_entity.go
- request_chunk_radius.go
- resource_pack_chunk_data.go
- resource_pack_chunk_request.go
- resource_pack_client_response.go
- resource_pack_data_info.go
- resource_pack_info.go
- resource_pack_stack.go
- server_handshake.go
- set_entity_data.go
- start_game.go
- text.go
- transfer.go
- update_attributes.go
- update_block.go
Click to show internal directories.
Click to hide internal directories.