play

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 4 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
}

type AwardStatistics

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

type BlockAction

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

type BlockEntityData

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

type BlockUpdate

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

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
}

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
}

type ChatSuggestions

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

type ChunkDataAndUpdateLight

type ChunkDataAndUpdateLight struct {
	ChunkX               int32
	ChunkZ               int32
	Heightmaps           nbt.NBT
	Size                 primitive.VarInt
	Data                 []common.ChunkSection
	NumOfBlockEntities   primitive.VarInt
	BlockEntities        []common.BlockEntity
	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
}

type ClearTitles

type ClearTitles struct {
	Reset bool
}

type CloseContainer

type CloseContainer struct {
	WindowID uint8
}

type CombatDeath

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

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
}

type Commands

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

type DeleteMessage

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

type Disconnect

type Disconnect struct {
	Reason common.Chat
}

type DisguisedChatMessage

type DisguisedChatMessage struct {
	Message       common.Chat
	ChatType      primitive.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 primitive.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  primitive.VarInt
	Animation uint8 // TODO: Enum
}

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
}

type EntityEvent

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

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
}

type Explosion

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

type FeatureFlags

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

type GameEvent

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

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
}

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      primitive.VarInt
	DimensionNames      []primitive.Identifier
	RegistryCodec       nbt.NBT
	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
	DeathDimension      *primitive.Identifier
	DeathLocation       *common.BlockPosition
	PortalCooldown      primitive.VarInt
}

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
}

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
}

type MerchantOffers

type MerchantOffers struct {
	WindowID          primitive.VarInt
	Size              primitive.VarInt
	Trades            []Trade
	VillagerLevel     primitive.VarInt
	Experience        primitive.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 primitive.VarInt
	EntityID  int32
}

type OpenSignEditor

type OpenSignEditor struct {
	Location common.BlockPosition
}

type OpenWindow

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

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
}

type PickupItem

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

type Ping

type Ping struct {
	ID int32
}

type PlaceGhostRecipe

type PlaceGhostRecipe struct {
	WindowID byte
	RecipeID primitive.Identifier
}

type PlayerAbilities

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

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
}

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
}

type PlayerInfoUpdate

type PlayerInfoUpdate struct {
	Actions      PlayerInfoMask
	NumOfPlayers primitive.VarInt
	Players      PlayerInfoUpdatePlayersData
}

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
}

type PreviousMessage

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

type RemoveEntities

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

type RemoveEntityEffect

type RemoveEntityEffect struct {
	EntityID primitive.VarInt
	EffectID primitive.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      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
}

type SelectAdvancementTab

type SelectAdvancementTab struct {
	HasID bool
	ID    *primitive.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 primitive.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       primitive.VarLong
}

type SetBorderSize

type SetBorderSize struct {
	Diameter float64
}

type SetBorderWarningDelay

type SetBorderWarningDelay struct {
	WarningTime primitive.VarInt
}

type SetBorderWarningDistance

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

type SetCamera

type SetCamera struct {
	CameraID primitive.VarInt
}

type SetCenterChunk

type SetCenterChunk struct {
	ChunkX int32
	ChunkZ int32
}

type SetContainerContent

type SetContainerContent struct {
	WindowID    uint8
	StateID     primitive.VarInt
	Count       primitive.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  primitive.VarInt
	Slot     int16
	SlotData common.Slot
}

type SetCooldown

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

type SetDefaultSpawnPosition

type SetDefaultSpawnPosition struct {
	Location common.BlockPosition
	Angle    float32
}

type SetEntityMetadata

type SetEntityMetadata struct {
	EntityID primitive.VarInt
}

type SetEntityVelocity

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

type SetEquipment

type SetEquipment struct {
	EntityID primitive.VarInt
}

type SetExperience

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

type SetHeadRotation

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

type SetHealth

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

type SetHeldItem

type SetHeldItem struct {
	Slot byte
}

type SetPassengers

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

type SetRenderDistance

type SetRenderDistance struct {
	ViewDistance primitive.VarInt
}

type SetSimulationDistance

type SetSimulationDistance struct {
	SimulationDistance primitive.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         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
}

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
}

type SpawnExperienceOrb

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

type SpawnPlayer

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

type StopSound

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

type SynchronizePlayerPosition

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

type SystemChatMessage

type SystemChatMessage struct {
	Content common.Chat
	Overlay bool
}

type TagQueryResponse

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

type TeleportEntity

type TeleportEntity struct {
	EntityID primitive.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  primitive.VarInt
	//AdvancementMapping map[common.Identifier]Advancement // TODO: Advancement
	ListSize     primitive.VarInt
	Identifiers  []primitive.Identifier
	ProgressSize primitive.VarInt
}

type UpdateAttributes

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

type UpdateEntityPosition

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

type UpdateEntityPositionAndRotation

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

type UpdateEntityRotation

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

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
}

type UpdateObjectives

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

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
}

type UpdateRecipes

type UpdateRecipes struct {
	RecipeCount primitive.VarInt
}

type UpdateScore

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

type UpdateSectionBlocks

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

type UpdateTags

type UpdateTags struct {
	TagCount primitive.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