play

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: MIT Imports: 3 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 common.VarInt
}

type AwardStatistics

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

type BlockAction

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

type BlockEntityData

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

type BlockUpdate

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

type BossBar

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

type BossBarActionAdd

type BossBarActionAdd struct {
	Title    common.Chat
	Health   float32
	Color    common.VarInt // TODO: Enum
	Division common.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    common.VarInt // TODO: Enum
	Division common.VarInt // TODO: Enum
}

type BossBarActionUpdateTitle

type BossBarActionUpdateTitle struct {
	Title common.Chat
}

type ChangeDifficulty

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

type ChatSuggestions

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

type ChunkDataAndUpdateLight

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

type ClearTitles

type ClearTitles struct {
	Reset bool
}

type CloseContainer

type CloseContainer struct {
	WindowID uint8
}

type CombatDeath

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

type CommandSuggestionsMatch

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

type CommandSuggestionsResponse

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

type Commands

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

type DeleteMessage

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

type Disconnect

type Disconnect struct {
	Reason common.Chat
}

type DisguisedChatMessage

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

type DisplayObjective

type DisplayObjective struct {
	Position common.BlockPosition
	Angle    float32
}

type EndCombat

type EndCombat struct {
	Duration common.VarInt
	EntityID int32
}

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

type EnterCombat

type EnterCombat struct{}

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

type EntityAnimation

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

type EntityEffect

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

type EntityEvent

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

type EntitySoundEffect

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

type Explosion

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

type FeatureFlags

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

type GameEvent

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

type Icon

type Icon struct {
	Type           common.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                  common.VarLong
	PortalTeleportBoundary common.VarInt
	WarningBlocks          common.VarInt
	WarningTime            common.VarInt
}

type KeepAlive

type KeepAlive struct {
	ID int64
}

type LinkEntities

type LinkEntities struct {
	AttachedEntityID int32
	HoldingEntityID  int32
}

type Login

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

type LookAt

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

type MapData

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

type MerchantOffers

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

type MoveVehicle

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

type OpenBook

type OpenBook struct {
	Hand common.Hand
}

type OpenHorseScreen

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

type OpenSignEditor

type OpenSignEditor struct {
	Location common.BlockPosition
}

type OpenWindow

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

type Particle

type Particle struct {
	ParticleID     common.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
}

type PickupItem

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

type Ping

type Ping struct {
	ID int32
}

type PlaceGhostRecipe

type PlaceGhostRecipe struct {
	WindowID byte
	RecipeID common.Identifier
}

type PlayerAbilities

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

type PlayerChatMessage

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

type PlayerInfoRemove

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

type PlayerInfoUpdate

type PlayerInfoUpdate struct {
	Action       byte // TODO: Enum
	NumOfActions common.VarInt
	Actions      []common.PlayerInfoAction
}

type PluginMessage

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

type PreviousMessage

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

type RemoveEntities

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

type RemoveEntityEffect

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

type ResourcePack

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

type Respawn

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

type SelectAdvancementTab

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

type ServerData

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

type SetActionBarText

type SetActionBarText struct {
	Text common.Chat
}

type SetBlockDestroyStage

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

type SetBorderCenter

type SetBorderCenter struct {
	X float64
	Z float64
}

type SetBorderLerpSize

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

type SetBorderSize

type SetBorderSize struct {
	Diameter float64
}

type SetBorderWarningDelay

type SetBorderWarningDelay struct {
	WarningTime common.VarInt
}

type SetBorderWarningDistance

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

type SetCamera

type SetCamera struct {
	CameraID common.VarInt
}

type SetCenterChunk

type SetCenterChunk struct {
	ChunkX int32
	ChunkZ int32
}

type SetContainerContent

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

type SetContainerProperty

type SetContainerProperty struct {
	WindowID uint8
	Property int16
	Value    int16
}

type SetContainerSlot

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

type SetCooldown

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

type SetDefaultSpawnPosition

type SetDefaultSpawnPosition struct {
	Location common.BlockPosition
	Angle    float32
}

type SetEntityMetadata

type SetEntityMetadata struct {
	EntityID common.VarInt
}

type SetEntityVelocity

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

type SetEquipment

type SetEquipment struct {
	EntityID common.VarInt
}

type SetExperience

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

type SetHeadRotation

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

type SetHealth

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

type SetHeldItem

type SetHeldItem struct {
	Slot byte
}

type SetPassengers

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

type SetRenderDistance

type SetRenderDistance struct {
	ViewDistance common.VarInt
}

type SetSimulationDistance

type SetSimulationDistance struct {
	SimulationDistance common.VarInt
}

type SetSubtitleText

type SetSubtitleText struct {
	SubtitleText common.Chat
}

type SetTabListHeaderAndFooter

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

type SetTitleAnimationTimes

type SetTitleAnimationTimes struct {
	FadeIn  int32
	Stay    int32
	FadeOut int32
}

type SetTitleText

type SetTitleText struct {
	TitleText common.Chat
}

type SoundEffect

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

type SpawnEntity

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

type SpawnExperienceOrb

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

type SpawnPlayer

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

type StopSound

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

type SynchronizePlayerPosition

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

type SystemChatMessage

type SystemChatMessage struct {
	Content common.Chat
	Overlay bool
}

type TagQueryResponse

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

type TeleportEntity

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

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
}

type UpdateAdvancements

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

type UpdateAttributes

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

type UpdateEntityPosition

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

type UpdateEntityPositionAndRotation

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

type UpdateEntityRotation

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

type UpdateLight

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

type UpdateObjectives

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

type UpdateRecipeBook

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

type UpdateRecipes

type UpdateRecipes struct {
	RecipeCount common.VarInt
}

type UpdateScore

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

type UpdateSectionBlocks

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

type UpdateTags

type UpdateTags struct {
	TagCount common.VarInt
}

type UpdateTeams

type UpdateTeams struct {
	TeamName string
	Mode     byte
}

type UpdateTime

type UpdateTime struct {
	WorldAge  int64
	TimeOfDay int64
}

type WorldEvent

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

Jump to

Keyboard shortcuts

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