Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeMCString(input *bytes.Buffer) (*string, error)
- type Angle
- type AwardStatistic
- type AwardStatistics
- type BitSet
- type BlockEntity
- type BlockLightArray
- type BlockPosition
- type Chat
- type ChatClickEvent
- type ChatCommandSignature
- type ChatComponent
- type ChatHoverEvent
- type ChunkSection
- type CommandNode
- type DirectPalette
- type Hand
- type Identifier
- type IndirectPalette
- type MCString
- type Palette
- type PalettedContainerStructure
- type PlayerInfoAction
- type PlayerInfoActionAddPlayer
- type PlayerInfoActionAddPlayerProperty
- type PlayerInfoActionUpdateDisplayName
- type PlayerInfoActionUpdateGameMode
- type PlayerInfoActionUpdateInitializeChat
- type PlayerInfoActionUpdateLatency
- type PlayerInfoActionUpdateListed
- type PublicKey
- type SingleValuedPalette
- type SkyLightArray
- type Slot
- type SuccessProperty
- type VarInt
- type VarLong
Constants ¶
View Source
const VarContinueBit = 0x80
View Source
const VarSegmentBits = 0x7F
Variables ¶
View Source
var IdentifierNameSpaceRegex = regexp.MustCompile(`^[a-z0-9._-]+$`)
View Source
var IdentifierValueRegex = regexp.MustCompile(`^[a-z0-9/._-]+$`)
Functions ¶
Types ¶
type AwardStatistic ¶
type AwardStatistics ¶
type AwardStatistics []AwardStatistic
type BlockLightArray ¶
type BlockPosition ¶
type BlockPosition uint64
func NewBlockPosition ¶
func NewBlockPosition(x, y, z int32) BlockPosition
func (BlockPosition) X ¶
func (p BlockPosition) X() int32
func (BlockPosition) Y ¶
func (p BlockPosition) Y() int32
func (BlockPosition) Z ¶
func (p BlockPosition) Z() int32
type Chat ¶
type Chat struct {
*ChatComponent
Extra []ChatComponent `json:"extra"`
}
type ChatClickEvent ¶
type ChatClickEvent struct {
OpenURL string `json:"open_url"`
OpenFile string `json:"open_file"`
RunCommand string `json:"run_command"`
TwitchUserInfo string `json:"twitch_user_info"`
SuggestCommand string `json:"suggest_command"`
ChangePage string `json:"change_page"`
CopyToClipboard string `json:"copy_to_clipboard"`
}
type ChatCommandSignature ¶
type ChatComponent ¶
type ChatComponent struct {
Text string `json:"text"`
Bold bool `json:"bold"`
Italic bool `json:"italic"`
Underlined bool `json:"underlined"`
Strikethrough bool `json:"strikethrough"`
Obfuscated bool `json:"obfuscated"`
Font string `json:"font"`
Color string `json:"color"`
Insertion string `json:"insertion"`
ClickEvent ChatClickEvent `json:"clickEvent"`
HoverEvent ChatHoverEvent `json:"hoverEvent"`
}
type ChatHoverEvent ¶
type ChunkSection ¶
type ChunkSection struct {
BlockCount int16
BlockStates PalettedContainerStructure
Biomes PalettedContainerStructure
}
type CommandNode ¶
type CommandNode struct {
Flags byte // TODO: Enum
ChildrenCount VarInt
Children []VarInt
RedirectNode *VarInt
Name *string
ParserID *VarInt
//Properties *CommandNodeProperties // TODO: Figure out
SuggestionsType *Identifier
}
CommandNode is a node in a command tree. Refer to https://wiki.vg/Command_Data
type DirectPalette ¶
type DirectPalette struct{}
type Identifier ¶
type Identifier string
func (Identifier) ValidateNameSpace ¶
func (i Identifier) ValidateNameSpace() error
func (Identifier) ValidateValue ¶
func (i Identifier) ValidateValue() error
type IndirectPalette ¶
type Palette ¶
type Palette struct {
*SingleValuedPalette
*IndirectPalette
*DirectPalette
}
type PlayerInfoAction ¶
type PlayerInfoAction struct {
*PlayerInfoActionAddPlayer
*PlayerInfoActionUpdateInitializeChat
*PlayerInfoActionUpdateGameMode
*PlayerInfoActionUpdateListed
*PlayerInfoActionUpdateLatency
*PlayerInfoActionUpdateDisplayName
}
PlayerInfoAction is a player action. Refer to https://wiki.vg/Protocol#Player_Info_Update
type PlayerInfoActionAddPlayer ¶
type PlayerInfoActionAddPlayer struct {
Name string
PropertiesCount VarInt
Properties []PlayerInfoActionAddPlayerProperty
}
type PlayerInfoActionUpdateGameMode ¶
type PlayerInfoActionUpdateGameMode struct {
GameMode VarInt
}
type PlayerInfoActionUpdateLatency ¶
type PlayerInfoActionUpdateLatency struct {
Ping VarInt
}
type PlayerInfoActionUpdateListed ¶
type PlayerInfoActionUpdateListed struct {
IsListed bool
}
type PublicKey ¶
type PublicKey struct {
ExpiresAt int64
PublicKeyLength VarInt
PublicKey []byte
KeySignatureLength VarInt
KeySignature []byte
}
PublicKey is a struct that represents a public key. Refer to https://wiki.vg/Protocol#Player_Session
type SingleValuedPalette ¶
type SingleValuedPalette struct {
Value VarInt
}
type SkyLightArray ¶
type SuccessProperty ¶
Click to show internal directories.
Click to hide internal directories.