play

package
v1.0.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcknowledgeBlockChange

type AcknowledgeBlockChange struct {
	SequenceID primitive.VarInt
}

func (*AcknowledgeBlockChange) PacketType added in v1.0.36

func (*AcknowledgeBlockChange) PacketType() string

type AwardStatistics

type AwardStatistics struct {
	Count      primitive.VarInt
	Statistics common.AwardStatistics
}

func (*AwardStatistics) PacketType added in v1.0.36

func (*AwardStatistics) PacketType() string

type BlockAction

type BlockAction struct {
	Location    common.BlockPosition
	ActionID    uint8
	ActionParam uint8
	BlockType   primitive.VarInt
}

func (*BlockAction) PacketType added in v1.0.36

func (*BlockAction) PacketType() string

type BlockEntityData

type BlockEntityData struct {
	Location common.BlockPosition
	Type     primitive.VarInt
	NBTData  nbt.NBT
}

func (*BlockEntityData) PacketType added in v1.0.36

func (*BlockEntityData) PacketType() string

type BlockUpdate

type BlockUpdate struct {
	Location common.BlockPosition
	BlockID  primitive.VarInt
}

func (*BlockUpdate) PacketType added in v1.0.36

func (*BlockUpdate) PacketType() string

type BossBar

type BossBar struct {
	UUID         uuid.UUID
	Action       primitive.VarInt // TODO: Enum
	Add          *BossBarActionAdd
	Remove       *BossBarActionRemove
	UpdateHealth *BossBarActionUpdateHealth
	UpdateTitle  *BossBarActionUpdateTitle
	UpdateStyle  *BossBarActionUpdateStyle
	UpdateFlags  *BossBarActionUpdateFlags
}

func (*BossBar) PacketType added in v1.0.36

func (*BossBar) PacketType() string

type BossBarActionAdd

type BossBarActionAdd struct {
	Title    common.Chat
	Health   float32
	Color    primitive.VarInt // TODO: Enum
	Division primitive.VarInt // TODO: Enum
	Flags    uint8            // TODO: Enum
}

type BossBarActionRemove

type BossBarActionRemove struct{}

type BossBarActionUpdateFlags

type BossBarActionUpdateFlags struct {
	Flags uint8 // TODO: Enum
}

type BossBarActionUpdateHealth

type BossBarActionUpdateHealth struct {
	Health float32
}

type BossBarActionUpdateStyle

type BossBarActionUpdateStyle struct {
	Color    primitive.VarInt // TODO: Enum
	Division primitive.VarInt // TODO: Enum
}

type BossBarActionUpdateTitle

type BossBarActionUpdateTitle struct {
	Title common.Chat
}

type ChangeDifficulty

type ChangeDifficulty struct {
	Difficulty         uint8 // TODO: Enum
	IsDifficultyLocked bool
}

func (*ChangeDifficulty) PacketType added in v1.0.36

func (*ChangeDifficulty) PacketType() string

type ChatSuggestions

type ChatSuggestions struct {
	Action  primitive.VarInt // TODO: Enum
	Count   primitive.VarInt
	Entries []string
}

func (*ChatSuggestions) PacketType added in v1.0.36

func (*ChatSuggestions) PacketType() string

type ChunkBatchFinished added in v1.0.31

type ChunkBatchFinished struct {
	NumChunks int64
}

func (*ChunkBatchFinished) PacketType added in v1.0.36

func (*ChunkBatchFinished) PacketType() string

type ChunkBatchStart added in v1.0.31

type ChunkBatchStart struct{}

func (*ChunkBatchStart) PacketType added in v1.0.36

func (*ChunkBatchStart) PacketType() string

type ChunkDataAndUpdateLight

type ChunkDataAndUpdateLight struct {
	ChunkX              int32
	ChunkZ              int32
	Heightmaps          nbt.NBT
	Data                []common.ChunkSection
	BlockEntities       []common.BlockEntity
	TrustEdges          bool
	SkyLightMask        primitive.BitSet
	BlockLightMask      primitive.BitSet
	EmptySkyLightMask   primitive.BitSet
	EmptyBlockLightMask primitive.BitSet
	SkyLightArrays      []common.SkyLightArray
	BlockLightArrays    []common.BlockLightArray
}

func (*ChunkDataAndUpdateLight) PacketType added in v1.0.36

func (*ChunkDataAndUpdateLight) PacketType() string

type ClearTitles

type ClearTitles struct {
	Reset bool
}

func (*ClearTitles) PacketType added in v1.0.36

func (*ClearTitles) PacketType() string

type CloseContainer

type CloseContainer struct {
	WindowID uint8
}

func (*CloseContainer) PacketType added in v1.0.36

func (*CloseContainer) PacketType() string

type CombatDeath

type CombatDeath struct {
	PlayerID primitive.VarInt
	EntityID int32
	Message  common.Chat
}

func (*CombatDeath) PacketType added in v1.0.36

func (*CombatDeath) PacketType() string

type CommandSuggestionsMatch

type CommandSuggestionsMatch struct {
	Match      string
	HasToolTip bool
	Tooltip    *common.Chat
}

type CommandSuggestionsResponse

type CommandSuggestionsResponse struct {
	ID      primitive.VarInt
	Start   primitive.VarInt
	Length  primitive.VarInt
	Count   primitive.VarInt
	Matches []CommandSuggestionsMatch
}

func (*CommandSuggestionsResponse) PacketType added in v1.0.36

func (*CommandSuggestionsResponse) PacketType() string

type Commands

type Commands struct {
	Count     primitive.VarInt
	Nodes     []common.CommandNode
	RootIndex primitive.VarInt
}

func (*Commands) PacketType added in v1.0.36

func (*Commands) PacketType() string

type DeleteMessage

type DeleteMessage struct {
	SignatureLength primitive.VarInt
	Signature       []byte
}

func (*DeleteMessage) PacketType added in v1.0.36

func (*DeleteMessage) PacketType() string

type Disconnect

type Disconnect struct {
	Reason common.Chat
}

func (*Disconnect) PacketType added in v1.0.36

func (*Disconnect) PacketType() string

type DisguisedChatMessage

type DisguisedChatMessage struct {
	Message       common.Chat
	ChatType      primitive.VarInt // TODO: Enum
	ChatTypeName  common.Chat
	HasTargetName bool
	TargetName    common.Chat
}

func (*DisguisedChatMessage) PacketType added in v1.0.36

func (*DisguisedChatMessage) PacketType() string

type DisplayObjective

type DisplayObjective struct {
	Position common.BlockPosition
	Angle    float32
}

func (*DisplayObjective) PacketType added in v1.0.36

func (*DisplayObjective) PacketType() string

type EndCombat

type EndCombat struct {
	Duration primitive.VarInt
	EntityID int32
}

EndCombat "Unused by the Notchian client. This data was once used for twitch.tv metadata circa 1.8.f"

func (*EndCombat) PacketType added in v1.0.36

func (*EndCombat) PacketType() string

type EnterCombat

type EnterCombat struct{}

EnterCombat "Unused by the Notchian client. This data was once used for twitch.tv metadata circa 1.8.f"

func (*EnterCombat) PacketType added in v1.0.36

func (*EnterCombat) PacketType() string

type EntityAnimation

type EntityAnimation struct {
	EntityID  primitive.VarInt
	Animation uint8 // TODO: Enum
}

func (*EntityAnimation) PacketType added in v1.0.36

func (*EntityAnimation) PacketType() string

type EntityEffect

type EntityEffect struct {
	EntityID      primitive.VarInt
	EffectID      primitive.VarInt // TODO: Enum
	Amplifier     byte
	Duration      primitive.VarInt
	Flags         byte
	HasFactorData bool
	FactorCodec   nbt.NBT
}

func (*EntityEffect) PacketType added in v1.0.36

func (*EntityEffect) PacketType() string

type EntityEvent

type EntityEvent struct {
	EntityID     int32
	EntityStatus uint8 // TODO: Enum
}

func (*EntityEvent) PacketType added in v1.0.36

func (*EntityEvent) PacketType() string

type EntitySoundEffect

type EntitySoundEffect struct {
	SoundID       primitive.VarInt // TODO: Enum
	SoundName     *primitive.Identifier
	HasFixedRange *bool
	Range         *float32
	SoundCategory primitive.VarInt // TODO: Enum
	EntityID      primitive.VarInt
	Volume        float32
	Pitch         float32
	Seed          int64
}

func (*EntitySoundEffect) PacketType added in v1.0.36

func (*EntitySoundEffect) PacketType() string

type Explosion

type Explosion struct {
	X             float64
	Y             float64
	Z             float64
	Strength      float32
	RecordCount   primitive.VarInt
	Records       [][]byte
	PlayerMotionX float32
	PlayerMotionY float32
	PlayerMotionZ float32
}

func (*Explosion) PacketType added in v1.0.36

func (*Explosion) PacketType() string

type FeatureFlags

type FeatureFlags struct {
	TotalFeatures primitive.VarInt
	FeatureFlags  []primitive.Identifier
}

func (*FeatureFlags) PacketType added in v1.0.36

func (*FeatureFlags) PacketType() string

type GameEvent

type GameEvent struct {
	Event uint8 // TODO: Enum
	Value float32
}

func (*GameEvent) PacketType added in v1.0.36

func (*GameEvent) PacketType() string

type Icon

type Icon struct {
	Type           primitive.VarInt // TODO: Enum
	X              byte
	Z              byte
	Direction      byte
	HasDisplayName bool
	DisplayName    *common.Chat
}

type InitializeWorldBorder

type InitializeWorldBorder struct {
	X                      float64
	Z                      float64
	OldDiameter            float64
	NewDiameter            float64
	Speed                  primitive.VarLong
	PortalTeleportBoundary primitive.VarInt
	WarningBlocks          primitive.VarInt
	WarningTime            primitive.VarInt
}

func (*InitializeWorldBorder) PacketType added in v1.0.36

func (*InitializeWorldBorder) PacketType() string

type KeepAlive

type KeepAlive struct {
	ID int64
}

func (*KeepAlive) PacketType added in v1.0.36

func (*KeepAlive) PacketType() string

type LinkEntities

type LinkEntities struct {
	AttachedEntityID int32
	HoldingEntityID  int32
}

func (*LinkEntities) PacketType added in v1.0.36

func (*LinkEntities) PacketType() string

type Login

type Login struct {
	EntityID            int32
	IsHardcore          bool
	GameMode            uint8 // TODO: Enum GameMode
	PreviousGameMode    uint8 // TODO: Enum GameMode
	DimensionCount      primitive.VarInt
	DimensionNames      []primitive.Identifier
	RegistryCodec       *nbt.NBT // Moved to configuration in 1.20.2
	DimensionType       primitive.Identifier
	DimensionName       primitive.Identifier
	HashedSeed          int64
	MaxPlayers          primitive.VarInt
	ViewDistance        primitive.VarInt
	SimulationDistance  primitive.VarInt
	ReducedDebugInfo    bool
	EnableRespawnScreen bool
	IsDebug             bool
	IsFlat              bool
	HasDeathLocation    bool
	DoLimitCrafting     bool
	DeathDimension      *primitive.Identifier
	DeathLocation       *common.BlockPosition
	PortalCooldown      primitive.VarInt
}

func (*Login) PacketType added in v1.0.36

func (*Login) PacketType() string

type LookAt

type LookAt struct {
	FeetOrEyes       primitive.VarInt // TODO: Enum
	TargetX          float64
	TargetY          float64
	TargetZ          float64
	IsEntity         bool
	EntityID         *primitive.VarInt
	EntityFeetOrEyes *primitive.VarInt // TODO: Enum
}

func (*LookAt) PacketType added in v1.0.36

func (*LookAt) PacketType() string

type MapData

type MapData struct {
	MapID     primitive.VarInt
	Scale     uint8
	IsLocked  bool
	HasIcons  bool
	ItemCount *primitive.VarInt
	Icons     []Icon
	Columns   uint8
	Rows      *uint8
	X         *byte
	Z         *byte
	Length    *primitive.VarInt
	Data      []byte
}

func (*MapData) PacketType added in v1.0.36

func (*MapData) PacketType() string

type MerchantOffers

type MerchantOffers struct {
	WindowID          primitive.VarInt
	Size              primitive.VarInt
	Trades            []Trade
	VillagerLevel     primitive.VarInt
	Experience        primitive.VarInt
	IsRegularVillager bool
	CanRestock        bool
}

func (*MerchantOffers) PacketType added in v1.0.36

func (*MerchantOffers) PacketType() string

type MoveVehicle

type MoveVehicle struct {
	X     float64
	Y     float64
	Z     float64
	Yaw   float32
	Pitch float32
}

func (*MoveVehicle) PacketType added in v1.0.36

func (*MoveVehicle) PacketType() string

type OpenBook

type OpenBook struct {
	Hand common.Hand
}

func (*OpenBook) PacketType added in v1.0.36

func (*OpenBook) PacketType() string

type OpenHorseScreen

type OpenHorseScreen struct {
	WindowID  uint8
	SlotCount primitive.VarInt
	EntityID  int32
}

func (*OpenHorseScreen) PacketType added in v1.0.36

func (*OpenHorseScreen) PacketType() string

type OpenScreen added in v1.0.31

type OpenScreen struct {
	WindowID    primitive.VarInt
	WindowType  primitive.VarInt // TODO: Enum
	WindowTitle common.Chat
}

func (*OpenScreen) PacketType added in v1.0.36

func (*OpenScreen) PacketType() string

type OpenSignEditor

type OpenSignEditor struct {
	Location common.BlockPosition
}

func (*OpenSignEditor) PacketType added in v1.0.36

func (*OpenSignEditor) PacketType() string

type Particle

type Particle struct {
	ParticleID     primitive.VarInt
	IsLongDistance bool
	X              float64
	Y              float64
	Z              float64
	OffsetX        float32
	OffsetY        float32
	OffsetZ        float32
	MaxSpeed       float32
	ParticleCount  int32
	Data           interface{} // TODO: Complete data common
}

func (*Particle) PacketType added in v1.0.36

func (*Particle) PacketType() string

type PickupItem

type PickupItem struct {
	CollectedEntityID primitive.VarInt
	CollectorEntityID primitive.VarInt
	PickupItemCount   primitive.VarInt
}

func (*PickupItem) PacketType added in v1.0.36

func (*PickupItem) PacketType() string

type Ping

type Ping struct {
	ID int32
}

func (*Ping) PacketType added in v1.0.36

func (*Ping) PacketType() string

type PingResponse added in v1.0.31

type PingResponse struct {
	Payload int32
}

func (*PingResponse) PacketType added in v1.0.36

func (*PingResponse) PacketType() string

type PlaceGhostRecipe

type PlaceGhostRecipe struct {
	WindowID byte
	RecipeID primitive.Identifier
}

func (*PlaceGhostRecipe) PacketType added in v1.0.36

func (*PlaceGhostRecipe) PacketType() string

type PlayerAbilities

type PlayerAbilities struct {
	Flags               byte // TODO: Enum
	FlyingSpeed         float32
	FieldOfViewModifier float32
}

func (*PlayerAbilities) PacketType added in v1.0.36

func (*PlayerAbilities) PacketType() string

type PlayerChatMessage

type PlayerChatMessage struct {
	Sender                     uuid.UUID
	Index                      primitive.VarInt
	MessageSignaturePresent    bool
	MessageSignature           []byte
	Message                    string
	Timestamp                  int64
	Salt                       int64
	TotalPreviousMessages      primitive.VarInt
	PreviousMessages           []PreviousMessage
	UnsignedContentPresent     bool
	UnsignedContent            *common.Chat
	FilterType                 primitive.VarInt // TODO: Enum
	FilterTypeBits             *primitive.BitSet
	ChatType                   primitive.VarInt // TODO: Enum
	NetworkName                common.Chat
	IsNetworkTargetNamePresent bool
	NetworkTargetName          *common.Chat
}

func (*PlayerChatMessage) PacketType added in v1.0.36

func (*PlayerChatMessage) PacketType() string

type PlayerInfoMask added in v1.0.22

type PlayerInfoMask = uint8
const (
	PlayerInfoMaskAddPlayer         PlayerInfoMask = 0x01
	PlayerInfoMaskInitializeChannel PlayerInfoMask = 0x02
	PlayerInfoMaskUpdateGameMode    PlayerInfoMask = 0x04
	PlayerInfoMaskUpdateListed      PlayerInfoMask = 0x08
	PlayerInfoMaskUpdateLatency     PlayerInfoMask = 0x10
	PlayerInfoMaskUpdateDisplayName PlayerInfoMask = 0x20
)

type PlayerInfoRemove

type PlayerInfoRemove struct {
	NumOfPlayers primitive.VarInt
	Players      []uuid.UUID
}

func (*PlayerInfoRemove) PacketType added in v1.0.36

func (*PlayerInfoRemove) PacketType() string

type PlayerInfoUpdate

type PlayerInfoUpdate struct {
	Actions PlayerInfoMask
	Players PlayerInfoUpdatePlayersData
}

func (*PlayerInfoUpdate) PacketType added in v1.0.36

func (*PlayerInfoUpdate) PacketType() string

type PlayerInfoUpdatePlayersData added in v1.0.22

type PlayerInfoUpdatePlayersData struct {
	UUID          uuid.UUID
	PlayerActions []common.PlayerInfoAction
}

type PluginMessage

type PluginMessage struct {
	Channel primitive.Identifier
	Data    []byte
}

func (*PluginMessage) PacketType added in v1.0.36

func (*PluginMessage) PacketType() string

type PreviousMessage

type PreviousMessage struct {
	MessageID primitive.VarInt
	Signature []byte
}

type RemoveEntities

type RemoveEntities struct {
	NumOfEntities primitive.VarInt
	Entities      []primitive.VarInt
}

func (*RemoveEntities) PacketType added in v1.0.36

func (*RemoveEntities) PacketType() string

type RemoveEntityEffect

type RemoveEntityEffect struct {
	EntityID primitive.VarInt
	EffectID primitive.VarInt // TODO: Enum
}

func (*RemoveEntityEffect) PacketType added in v1.0.36

func (*RemoveEntityEffect) PacketType() string

type ResourcePack

type ResourcePack struct {
	URL              string
	Hash             string
	Forced           bool
	HasPromptMessage bool
	PromptMessage    *common.Chat
}

func (*ResourcePack) PacketType added in v1.0.36

func (*ResourcePack) PacketType() string

type Respawn

type Respawn struct {
	DimensionType      primitive.Identifier
	DimensionName      primitive.Identifier
	HashedSeed         int64
	GameMode           uint8 // TODO: Enum GameMode
	PreviousGameMode   byte
	IsDebug            bool
	IsFlat             bool
	CopyMetadata       bool
	HasDeathLocation   bool
	DeathDimensionName *primitive.Identifier
	DeathLocation      *common.BlockPosition
}

func (*Respawn) PacketType added in v1.0.36

func (*Respawn) PacketType() string

type SelectAdvancementTab

type SelectAdvancementTab struct {
	HasID bool
	ID    *primitive.Identifier
}

func (*SelectAdvancementTab) PacketType added in v1.0.36

func (*SelectAdvancementTab) PacketType() string

type ServerData

type ServerData struct {
	HasMOTD            bool
	MOTD               *common.Chat
	HasIcon            bool
	Icon               *string
	EnforcesSecureChat bool
}

func (*ServerData) PacketType added in v1.0.36

func (*ServerData) PacketType() string

type SetActionBarText

type SetActionBarText struct {
	Text common.Chat
}

func (*SetActionBarText) PacketType added in v1.0.36

func (*SetActionBarText) PacketType() string

type SetBlockDestroyStage

type SetBlockDestroyStage struct {
	EntityID primitive.VarInt
	Location common.BlockPosition
	Stage    byte // TODO: Enum
}

func (*SetBlockDestroyStage) PacketType added in v1.0.36

func (*SetBlockDestroyStage) PacketType() string

type SetBorderCenter

type SetBorderCenter struct {
	X float64
	Z float64
}

func (*SetBorderCenter) PacketType added in v1.0.36

func (*SetBorderCenter) PacketType() string

type SetBorderLerpSize

type SetBorderLerpSize struct {
	OldDiameter float64
	NewDiameter float64
	Speed       primitive.VarLong
}

func (*SetBorderLerpSize) PacketType added in v1.0.36

func (*SetBorderLerpSize) PacketType() string

type SetBorderSize

type SetBorderSize struct {
	Diameter float64
}

func (*SetBorderSize) PacketType added in v1.0.36

func (*SetBorderSize) PacketType() string

type SetBorderWarningDelay

type SetBorderWarningDelay struct {
	WarningTime primitive.VarInt
}

func (*SetBorderWarningDelay) PacketType added in v1.0.36

func (*SetBorderWarningDelay) PacketType() string

type SetBorderWarningDistance

type SetBorderWarningDistance struct {
	// WarningBlocks in meters
	WarningBlocks primitive.VarInt
}

func (*SetBorderWarningDistance) PacketType added in v1.0.36

func (*SetBorderWarningDistance) PacketType() string

type SetCamera

type SetCamera struct {
	CameraID primitive.VarInt
}

func (*SetCamera) PacketType added in v1.0.36

func (*SetCamera) PacketType() string

type SetCenterChunk

type SetCenterChunk struct {
	ChunkX int32
	ChunkZ int32
}

func (*SetCenterChunk) PacketType added in v1.0.36

func (*SetCenterChunk) PacketType() string

type SetContainerContent

type SetContainerContent struct {
	WindowID    uint8
	StateID     primitive.VarInt
	Count       primitive.VarInt
	SlotData    []common.Slot
	CarriedItem common.Slot
}

func (*SetContainerContent) PacketType added in v1.0.36

func (*SetContainerContent) PacketType() string

type SetContainerProperty

type SetContainerProperty struct {
	WindowID uint8
	Property int16
	Value    int16
}

func (*SetContainerProperty) PacketType added in v1.0.36

func (*SetContainerProperty) PacketType() string

type SetContainerSlot

type SetContainerSlot struct {
	WindowID uint8
	StateID  primitive.VarInt
	Slot     int16
	SlotData common.Slot
}

func (*SetContainerSlot) PacketType added in v1.0.36

func (*SetContainerSlot) PacketType() string

type SetCooldown

type SetCooldown struct {
	ItemID primitive.VarInt
	Ticks  primitive.VarInt
}

func (*SetCooldown) PacketType added in v1.0.36

func (*SetCooldown) PacketType() string

type SetDefaultSpawnPosition

type SetDefaultSpawnPosition struct {
	Location common.BlockPosition
	Angle    float32
}

func (*SetDefaultSpawnPosition) PacketType added in v1.0.36

func (*SetDefaultSpawnPosition) PacketType() string

type SetEntityMetadata

type SetEntityMetadata struct {
	EntityID primitive.VarInt
}

func (*SetEntityMetadata) PacketType added in v1.0.36

func (*SetEntityMetadata) PacketType() string

type SetEntityVelocity

type SetEntityVelocity struct {
	EntityID  primitive.VarInt
	VelocityX int16
	VelocityY int16
	VelocityZ int16
}

func (*SetEntityVelocity) PacketType added in v1.0.36

func (*SetEntityVelocity) PacketType() string

type SetEquipment

type SetEquipment struct {
	EntityID primitive.VarInt
}

func (*SetEquipment) PacketType added in v1.0.36

func (*SetEquipment) PacketType() string

type SetExperience

type SetExperience struct {
	ExperienceBar   float32
	TotalExperience primitive.VarInt
	Level           primitive.VarInt
}

func (*SetExperience) PacketType added in v1.0.36

func (*SetExperience) PacketType() string

type SetHeadRotation

type SetHeadRotation struct {
	EntityID primitive.VarInt
	HeadYaw  common.Angle
}

func (*SetHeadRotation) PacketType added in v1.0.36

func (*SetHeadRotation) PacketType() string

type SetHealth

type SetHealth struct {
	Health         float32
	Food           primitive.VarInt
	FoodSaturation float32
}

func (*SetHealth) PacketType added in v1.0.36

func (*SetHealth) PacketType() string

type SetHeldItem

type SetHeldItem struct {
	Slot byte
}

func (*SetHeldItem) PacketType added in v1.0.36

func (*SetHeldItem) PacketType() string

type SetPassengers

type SetPassengers struct {
	EntityID       primitive.VarInt
	PassengerCount primitive.VarInt
	Passengers     []primitive.VarInt
}

func (*SetPassengers) PacketType added in v1.0.36

func (*SetPassengers) PacketType() string

type SetRenderDistance

type SetRenderDistance struct {
	ViewDistance primitive.VarInt
}

func (*SetRenderDistance) PacketType added in v1.0.36

func (*SetRenderDistance) PacketType() string

type SetSimulationDistance

type SetSimulationDistance struct {
	SimulationDistance primitive.VarInt
}

func (*SetSimulationDistance) PacketType added in v1.0.36

func (*SetSimulationDistance) PacketType() string

type SetSubtitleText

type SetSubtitleText struct {
	SubtitleText common.Chat
}

func (*SetSubtitleText) PacketType added in v1.0.36

func (*SetSubtitleText) PacketType() string

type SetTabListHeaderAndFooter

type SetTabListHeaderAndFooter struct {
	Header common.Chat
	Footer common.Chat
}

func (*SetTabListHeaderAndFooter) PacketType added in v1.0.36

func (*SetTabListHeaderAndFooter) PacketType() string

type SetTitleAnimationTimes

type SetTitleAnimationTimes struct {
	FadeIn  int32
	Stay    int32
	FadeOut int32
}

func (*SetTitleAnimationTimes) PacketType added in v1.0.36

func (*SetTitleAnimationTimes) PacketType() string

type SetTitleText

type SetTitleText struct {
	TitleText common.Chat
}

func (*SetTitleText) PacketType added in v1.0.36

func (*SetTitleText) PacketType() string

type SoundEffect

type SoundEffect struct {
	SoundID         primitive.VarInt
	SoundName       *primitive.Identifier
	HasFixedRange   *bool
	Range           *float32
	SoundCategory   primitive.VarInt // TODO: Enum
	EntityPositionX int32
	EntityPositionY int32
	EntityPositionZ int32
	Volume          float32
	Pitch           float32
	Seed            int64
}

func (*SoundEffect) PacketType added in v1.0.36

func (*SoundEffect) PacketType() string

type SpawnEntity

type SpawnEntity struct {
	EntityID   primitive.VarInt
	ObjectUUID string
	Type       primitive.VarInt
	X          float64
	Y          float64
	Z          float64
	Pitch      common.Angle
	Yaw        common.Angle
	HeadYaw    common.Angle
	Data       primitive.VarInt
	VelocityX  int16
	VelocityY  int16
	VelocityZ  int16
}

func (*SpawnEntity) PacketType added in v1.0.36

func (*SpawnEntity) PacketType() string

type SpawnExperienceOrb

type SpawnExperienceOrb struct {
	EntityID primitive.VarInt
	X        float64
	Y        float64
	Z        float64
	Count    int16
}

func (*SpawnExperienceOrb) PacketType added in v1.0.36

func (*SpawnExperienceOrb) PacketType() string

type SpawnPlayer

type SpawnPlayer struct {
	EntityID   primitive.VarInt
	PlayerUUID uuid.UUID
	X          float64
	Y          float64
	Z          float64
	Yaw        common.Angle
	Pitch      common.Angle
}

func (*SpawnPlayer) PacketType added in v1.0.36

func (*SpawnPlayer) PacketType() string

type StopSound

type StopSound struct {
	Flags  byte
	Source *primitive.VarInt // TODO: Enum
	Sound  *primitive.Identifier
}

func (*StopSound) PacketType added in v1.0.36

func (*StopSound) PacketType() string

type SynchronizePlayerPosition

type SynchronizePlayerPosition struct {
	X               float64
	Y               float64
	Z               float64
	Yaw             float32
	Pitch           float32
	Flags           byte // TODO: Enum
	TeleportID      primitive.VarInt
	DismountVehicle bool
}

func (*SynchronizePlayerPosition) PacketType added in v1.0.36

func (*SynchronizePlayerPosition) PacketType() string

type SystemChatMessage

type SystemChatMessage struct {
	Content common.Chat
	Overlay bool
}

func (*SystemChatMessage) PacketType added in v1.0.36

func (*SystemChatMessage) PacketType() string

type TagQueryResponse

type TagQueryResponse struct {
	TransactionID primitive.VarInt
	NBT           nbt.NBT
}

func (*TagQueryResponse) PacketType added in v1.0.36

func (*TagQueryResponse) PacketType() string

type TeleportEntity

type TeleportEntity struct {
	EntityID primitive.VarInt
	X        float64
	Y        float64
	Z        float64
	Yaw      common.Angle
	Pitch    common.Angle
	OnGround bool
}

func (*TeleportEntity) PacketType added in v1.0.36

func (*TeleportEntity) PacketType() string

type Trade

type Trade struct {
	InputItem1      common.Slot
	OutputItem      common.Slot
	InputItem2      common.Slot
	IsDisabled      bool
	NumOfTradeUses  int32
	MaxTradeUses    int32
	Experience      int32
	SpecialPrice    int32
	PriceMultiplier float32
	Demand          int32
}

type UnloadChunk

type UnloadChunk struct {
	ChunkX int32
	ChunkZ int32
}

func (*UnloadChunk) PacketType added in v1.0.36

func (*UnloadChunk) PacketType() string

type UpdateAdvancements

type UpdateAdvancements struct {
	ResetOrClear bool
	MappingSize  primitive.VarInt
	//AdvancementMapping map[common.Identifier]Advancement // TODO: Advancement
	ListSize     primitive.VarInt
	Identifiers  []primitive.Identifier
	ProgressSize primitive.VarInt
}

func (*UpdateAdvancements) PacketType added in v1.0.36

func (*UpdateAdvancements) PacketType() string

type UpdateAttributes

type UpdateAttributes struct {
	EntityID        primitive.VarInt
	NumOfProperties primitive.VarInt
}

func (*UpdateAttributes) PacketType added in v1.0.36

func (*UpdateAttributes) PacketType() string

type UpdateEntityPosition

type UpdateEntityPosition struct {
	EntityID primitive.VarInt
	DeltaX   int16
	DeltaY   int16
	DeltaZ   int16
	OnGround bool
}

func (*UpdateEntityPosition) PacketType added in v1.0.36

func (*UpdateEntityPosition) PacketType() string

type UpdateEntityPositionAndRotation

type UpdateEntityPositionAndRotation struct {
	EntityID primitive.VarInt
	DeltaX   int16
	DeltaY   int16
	DeltaZ   int16
	Yaw      common.Angle
	Pitch    common.Angle
	OnGround bool
}

func (*UpdateEntityPositionAndRotation) PacketType added in v1.0.36

type UpdateEntityRotation

type UpdateEntityRotation struct {
	EntityID primitive.VarInt
	Yaw      common.Angle
	Pitch    common.Angle
	OnGround bool
}

func (*UpdateEntityRotation) PacketType added in v1.0.36

func (*UpdateEntityRotation) PacketType() string

type UpdateLight

type UpdateLight struct {
	ChunkX               primitive.VarInt
	ChunkZ               primitive.VarInt
	TrustEdges           bool
	SkyLightMask         primitive.BitSet
	BlockLightMask       primitive.BitSet
	EmptySkyLightMask    primitive.BitSet
	EmptyBlockLightMask  primitive.BitSet
	SkyLightArrayCount   primitive.VarInt
	SkyLightArrays       []common.SkyLightArray
	BlockLightArrayCount primitive.VarInt
	BlockLightArrays     []common.BlockLightArray
}

func (*UpdateLight) PacketType added in v1.0.36

func (*UpdateLight) PacketType() string

type UpdateObjectives

type UpdateObjectives struct {
	ObjectiveName  string
	Mode           byte
	ObjectiveValue *common.Chat
	Type           *primitive.VarInt // TODO: Enum
}

func (*UpdateObjectives) PacketType added in v1.0.36

func (*UpdateObjectives) PacketType() string

type UpdateRecipeBook

type UpdateRecipeBook struct {
	Action                       primitive.VarInt // TODO: Enum
	CraftingBookOpen             bool
	CraftingBookFilterActive     bool
	SmeltingBookOpen             bool
	SmeltingBookFilterActive     bool
	BlastFurnaceBookOpen         bool
	BlastFurnaceBookFilterActive bool
	SmokerBookOpen               bool
	SmokerBookFilterActive       bool
	RecipeIDSize1                primitive.VarInt
	RecipeIDs1                   []primitive.Identifier
	RecipeIDSize2                primitive.VarInt
	RecipeIDs2                   []primitive.Identifier
}

func (*UpdateRecipeBook) PacketType added in v1.0.36

func (*UpdateRecipeBook) PacketType() string

type UpdateRecipes

type UpdateRecipes struct {
	RecipeCount primitive.VarInt
}

func (*UpdateRecipes) PacketType added in v1.0.36

func (*UpdateRecipes) PacketType() string

type UpdateScore

type UpdateScore struct {
	EntityName    string
	Action        primitive.VarInt // TODO: Enum
	ObjectiveName string
	Value         *primitive.VarInt
}

func (*UpdateScore) PacketType added in v1.0.36

func (*UpdateScore) PacketType() string

type UpdateSectionBlocks

type UpdateSectionBlocks struct {
	ChunkSectionPosition int64
	SuppressLightUpdates bool
	BlockArraySize       primitive.VarInt
	Blocks               []primitive.VarLong
}

func (*UpdateSectionBlocks) PacketType added in v1.0.36

func (*UpdateSectionBlocks) PacketType() string

type UpdateTags

type UpdateTags struct {
	TagCount primitive.VarInt
}

func (*UpdateTags) PacketType added in v1.0.36

func (*UpdateTags) PacketType() string

type UpdateTeams

type UpdateTeams struct {
	TeamName string
	Mode     byte
}

func (*UpdateTeams) PacketType added in v1.0.36

func (*UpdateTeams) PacketType() string

type UpdateTime

type UpdateTime struct {
	WorldAge  int64
	TimeOfDay int64
}

func (*UpdateTime) PacketType added in v1.0.36

func (*UpdateTime) PacketType() string

type WorldEvent

type WorldEvent struct {
	Event                 int32
	Location              common.BlockPosition
	Data                  int32 // TODO: Enum
	DisableRelativeVolume bool
}

func (*WorldEvent) PacketType added in v1.0.36

func (*WorldEvent) PacketType() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL