Documentation ¶
Index ¶
- Constants
- type BlockBreakAnimation
- type BlockChange
- type BlockRecord
- type ChatMessage
- type DestroyEntities
- type Disconnect
- type Effect
- type EntityAnimation
- type EntityEquipment
- type EntityHeadLook
- type EntityMetadata
- type EntityMovement
- type EntityPosition
- type EntityPositionAndRotation
- type EntityRotation
- type EntityTeleport
- type IMetadata
- type JoinGame
- type KeepAlive
- type MultiBlockChange
- type PIAddPlayer
- type PIDisplayName
- type PIRemovePlayer
- type PIUpdateGamemode
- type PIUpdateLatency
- type PlayerInfo
- type PlayerPositionAndLook
- type SetSlot
- type Slot
- type SpawnPlayer
- type TimeUpdate
- type UnloadChunk
- type UpdateViewPosition
Constants ¶
View Source
const ( AnimationSwingMainHand = byte(iota) AnimationTakeDamage AnimationLeaveBed AnimationSwingOffhand AnimationCriticalEffect AnimationMagicCriticalEffect AnimationNone )
View Source
const ( EquipmentMainHand = int32(iota) EquipmentOffHand EquipmentBoots EquipmentLeggings EquipmentChestplate EquipmentHelmet )
View Source
const ( ChatBox = 0 SystemMessage = 1 GameInfo = 2 )
View Source
const ( PlayerPositionXRelative = 0x01 PlayerPositionYRelative = 0x02 PlayerPositionZRelative = 0x04 PlayerPositionYawRelative = 0x08 PlayerPositionPitchRelative = 0x10 )
View Source
const ( // TODO: add from https://wiki.vg/Protocol#Effect EffectBlockBreak = int32(2001) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockBreakAnimation ¶
func (BlockBreakAnimation) Encode ¶
func (r BlockBreakAnimation) Encode(writer *minecraft.Writer)
type BlockChange ¶
func (BlockChange) Encode ¶
func (r BlockChange) Encode(writer *minecraft.Writer)
type BlockRecord ¶
type ChatMessage ¶
func (ChatMessage) Encode ¶
func (r ChatMessage) Encode(writer *minecraft.Writer)
type DestroyEntities ¶
type DestroyEntities struct {
EntityIDs []int32
}
func (DestroyEntities) Encode ¶
func (r DestroyEntities) Encode(writer *minecraft.Writer)
type Disconnect ¶
func (Disconnect) Encode ¶
func (r Disconnect) Encode(writer *minecraft.Writer)
type Effect ¶
type EntityAnimation ¶
func (EntityAnimation) Encode ¶
func (r EntityAnimation) Encode(writer *minecraft.Writer)
type EntityEquipment ¶
func (EntityEquipment) Encode ¶
func (r EntityEquipment) Encode(writer *minecraft.Writer)
type EntityHeadLook ¶
func (EntityHeadLook) Encode ¶
func (r EntityHeadLook) Encode(writer *minecraft.Writer)
type EntityMetadata ¶
func (EntityMetadata) Encode ¶
func (r EntityMetadata) Encode(writer *minecraft.Writer)
type EntityMovement ¶
type EntityMovement struct {
EntityID int32
}
func (EntityMovement) Encode ¶
func (r EntityMovement) Encode(writer *minecraft.Writer)
type EntityPosition ¶
func (EntityPosition) Encode ¶
func (r EntityPosition) Encode(writer *minecraft.Writer)
type EntityPositionAndRotation ¶
type EntityPositionAndRotation struct { EntityId int32 DeltaX int16 DeltaY int16 DeltaZ int16 Yaw minecraft.Angle Pitch minecraft.Angle OnGround bool }
func (EntityPositionAndRotation) Encode ¶
func (r EntityPositionAndRotation) Encode(writer *minecraft.Writer)
type EntityRotation ¶
type EntityRotation struct { EntityID int32 Yaw minecraft.Angle Pitch minecraft.Angle OnGround bool }
func (EntityRotation) Encode ¶
func (r EntityRotation) Encode(writer *minecraft.Writer)
type EntityTeleport ¶
type EntityTeleport struct { EntityID int32 X float64 Y float64 Z float64 Yaw minecraft.Angle Pitch minecraft.Angle OnGround bool }
func (EntityTeleport) Encode ¶
func (r EntityTeleport) Encode(writer *minecraft.Writer)
type IMetadata ¶
type IMetadata interface {
WriteMetadata(writer *minecraft.EntityMetadataWriter)
}
type JoinGame ¶
type MultiBlockChange ¶
type MultiBlockChange struct { ChunkX int32 ChunkZ int32 Records []BlockRecord }
func (MultiBlockChange) Encode ¶
func (r MultiBlockChange) Encode(writer *minecraft.Writer)
type PIAddPlayer ¶
type PIAddPlayer struct { UUID uuid.UUID Name string //Props []mojang.PlayerProperty Gamemode int32 Ping int32 DisplayName *minecraft.Chat }
func (PIAddPlayer) Encode ¶
func (p PIAddPlayer) Encode(writer *minecraft.Writer)
type PIDisplayName ¶
func (PIDisplayName) Encode ¶
func (p PIDisplayName) Encode(writer *minecraft.Writer)
type PIRemovePlayer ¶
func (PIRemovePlayer) Encode ¶
func (p PIRemovePlayer) Encode(writer *minecraft.Writer)
type PIUpdateGamemode ¶
func (PIUpdateGamemode) Encode ¶
func (p PIUpdateGamemode) Encode(writer *minecraft.Writer)
type PIUpdateLatency ¶
func (PIUpdateLatency) Encode ¶
func (p PIUpdateLatency) Encode(writer *minecraft.Writer)
type PlayerInfo ¶
type PlayerInfo struct { AddPlayer []PIAddPlayer UpdateGamemode []PIUpdateGamemode UpdateLatency []PIUpdateLatency UpdateDisplayName []PIDisplayName RemovePlayer []PIRemovePlayer }
func (PlayerInfo) Encode ¶
func (p PlayerInfo) Encode(writer *minecraft.Writer)
type PlayerPositionAndLook ¶
type PlayerPositionAndLook struct {
X, Y, Z float64
Yaw, Pitch float32
Flags byte
TeleportId int32
}
func (PlayerPositionAndLook) Encode ¶
func (r PlayerPositionAndLook) Encode(writer *minecraft.Writer)
type Slot ¶
func (*Slot) CreateFake ¶
type SpawnPlayer ¶
type SpawnPlayer struct { EntityID int32 UUID uuid.UUID X float64 Y float64 Z float64 Yaw minecraft.Angle Pitch minecraft.Angle }
func (SpawnPlayer) Encode ¶
func (r SpawnPlayer) Encode(writer *minecraft.Writer)
type TimeUpdate ¶
func (TimeUpdate) Encode ¶
func (p TimeUpdate) Encode(writer *minecraft.Writer)
type UnloadChunk ¶
func (UnloadChunk) Encode ¶
func (p UnloadChunk) Encode(writer *minecraft.Writer)
type UpdateViewPosition ¶
func (UpdateViewPosition) Encode ¶
func (p UpdateViewPosition) Encode(writer *minecraft.Writer)
Click to show internal directories.
Click to hide internal directories.