Documentation
¶
Index ¶
- Constants
- Variables
- type McUser
- type McUserProto
- func (*McUserProto) Descriptor() ([]byte, []int)deprecated
- func (x *McUserProto) GetBaseURL() McUserProto_URLType
- func (x *McUserProto) GetSkinPath() string
- func (x *McUserProto) GetStatus() McUserProto_UserStatus
- func (x *McUserProto) GetTime() uint32
- func (x *McUserProto) GetUUID() string
- func (x *McUserProto) GetUsername() string
- func (*McUserProto) ProtoMessage()
- func (x *McUserProto) ProtoReflect() protoreflect.Message
- func (x *McUserProto) Reset()
- func (x *McUserProto) String() string
- type McUserProto_URLType
- func (McUserProto_URLType) Descriptor() protoreflect.EnumDescriptor
- func (x McUserProto_URLType) Enum() *McUserProto_URLType
- func (McUserProto_URLType) EnumDescriptor() ([]byte, []int)deprecated
- func (x McUserProto_URLType) Number() protoreflect.EnumNumber
- func (x McUserProto_URLType) String() string
- func (McUserProto_URLType) Type() protoreflect.EnumType
- type McUserProto_UserStatus
- func (McUserProto_UserStatus) Descriptor() protoreflect.EnumDescriptor
- func (x McUserProto_UserStatus) Enum() *McUserProto_UserStatus
- func (McUserProto_UserStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x McUserProto_UserStatus) Number() protoreflect.EnumNumber
- func (x McUserProto_UserStatus) String() string
- func (McUserProto_UserStatus) Type() protoreflect.EnumType
- type TextureIO
- type Textures
Constants ¶
View Source
const TexturesBaseURL = "http://textures.minecraft.net/texture/"
Variables ¶
View Source
var ( McUserProto_UserStatus_name = map[int32]string{ 0: "UNSET", 1: "OK", 2: "ERROR_GENERIC", 3: "ERROR_UNKNOWN_USER", 4: "ERROR_RATE_LIMIT", } McUserProto_UserStatus_value = map[string]int32{ "UNSET": 0, "OK": 1, "ERROR_GENERIC": 2, "ERROR_UNKNOWN_USER": 3, "ERROR_RATE_LIMIT": 4, } )
Enum value maps for McUserProto_UserStatus.
View Source
var ( McUserProto_URLType_name = map[int32]string{ 0: "UNKNOWN", 1: "TEXTURES_MC_NET", } McUserProto_URLType_value = map[string]int32{ "UNKNOWN": 0, "TEXTURES_MC_NET": 1, } )
Enum value maps for McUserProto_URLType.
View Source
var File_pkg_mcclient_mcuser_mcuser_proto_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type McUser ¶
type McUser struct { minecraft.User Textures Textures Timestamp tinytime.TinyTime Status status.Status }
func DecompressMcUser ¶
Decompress a Protobuf McUser
func (McUser) EncodeProtobuf ¶
type McUserProto ¶
type McUserProto struct { Time uint32 `protobuf:"varint,1,opt,name=Time,proto3" json:"Time,omitempty"` Status McUserProto_UserStatus `protobuf:"varint,2,opt,name=Status,proto3,enum=mcuser.McUserProto_UserStatus" json:"Status,omitempty"` Username string `protobuf:"bytes,4,opt,name=Username,proto3" json:"Username,omitempty"` UUID string `protobuf:"bytes,5,opt,name=UUID,proto3" json:"UUID,omitempty"` BaseURL McUserProto_URLType `protobuf:"varint,7,opt,name=BaseURL,proto3,enum=mcuser.McUserProto_URLType" json:"BaseURL,omitempty"` //bool SkinSlim = 8 SkinPath string `protobuf:"bytes,9,opt,name=SkinPath,proto3" json:"SkinPath,omitempty"` //string CapePath = 10; // contains filtered or unexported fields }
func (*McUserProto) Descriptor
deprecated
func (*McUserProto) Descriptor() ([]byte, []int)
Deprecated: Use McUserProto.ProtoReflect.Descriptor instead.
func (*McUserProto) GetBaseURL ¶
func (x *McUserProto) GetBaseURL() McUserProto_URLType
func (*McUserProto) GetSkinPath ¶
func (x *McUserProto) GetSkinPath() string
func (*McUserProto) GetStatus ¶
func (x *McUserProto) GetStatus() McUserProto_UserStatus
func (*McUserProto) GetTime ¶
func (x *McUserProto) GetTime() uint32
func (*McUserProto) GetUUID ¶
func (x *McUserProto) GetUUID() string
func (*McUserProto) GetUsername ¶
func (x *McUserProto) GetUsername() string
func (*McUserProto) ProtoMessage ¶
func (*McUserProto) ProtoMessage()
func (*McUserProto) ProtoReflect ¶
func (x *McUserProto) ProtoReflect() protoreflect.Message
func (*McUserProto) Reset ¶
func (x *McUserProto) Reset()
func (*McUserProto) String ¶
func (x *McUserProto) String() string
type McUserProto_URLType ¶
type McUserProto_URLType int32
Supports other value incase another Texture host is ever used
const ( McUserProto_UNKNOWN McUserProto_URLType = 0 McUserProto_TEXTURES_MC_NET McUserProto_URLType = 1 )
func (McUserProto_URLType) Descriptor ¶
func (McUserProto_URLType) Descriptor() protoreflect.EnumDescriptor
func (McUserProto_URLType) Enum ¶
func (x McUserProto_URLType) Enum() *McUserProto_URLType
func (McUserProto_URLType) EnumDescriptor
deprecated
func (McUserProto_URLType) EnumDescriptor() ([]byte, []int)
Deprecated: Use McUserProto_URLType.Descriptor instead.
func (McUserProto_URLType) Number ¶
func (x McUserProto_URLType) Number() protoreflect.EnumNumber
func (McUserProto_URLType) String ¶
func (x McUserProto_URLType) String() string
func (McUserProto_URLType) Type ¶
func (McUserProto_URLType) Type() protoreflect.EnumType
type McUserProto_UserStatus ¶
type McUserProto_UserStatus int32
const ( McUserProto_UNSET McUserProto_UserStatus = 0 McUserProto_OK McUserProto_UserStatus = 1 McUserProto_ERROR_GENERIC McUserProto_UserStatus = 2 McUserProto_ERROR_UNKNOWN_USER McUserProto_UserStatus = 3 McUserProto_ERROR_RATE_LIMIT McUserProto_UserStatus = 4 )
func (McUserProto_UserStatus) Descriptor ¶
func (McUserProto_UserStatus) Descriptor() protoreflect.EnumDescriptor
func (McUserProto_UserStatus) Enum ¶
func (x McUserProto_UserStatus) Enum() *McUserProto_UserStatus
func (McUserProto_UserStatus) EnumDescriptor
deprecated
func (McUserProto_UserStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use McUserProto_UserStatus.Descriptor instead.
func (McUserProto_UserStatus) Number ¶
func (x McUserProto_UserStatus) Number() protoreflect.EnumNumber
func (McUserProto_UserStatus) String ¶
func (x McUserProto_UserStatus) String() string
func (McUserProto_UserStatus) Type ¶
func (McUserProto_UserStatus) Type() protoreflect.EnumType
type TextureIO ¶
type TextureIO struct { io.ReadCloser TextureID string }
func GetSteveTextureIO ¶
func GetSteveTextureIO() TextureIO
func (TextureIO) DecodeTexture ¶
DecodeTexture reads and closes the ReadCloser, returning a minecraft.Texture (and optional error)
type Textures ¶
type Textures struct { // SkinPath changes based on whether the Texture's URL was prefixed by the TexturesBaseURL. // It will either be just the "hash" (part after the TexturesBaseURL) or a full URL SkinPath string // TexturesMcNet is true when the SkinPath is just the part after the TexturesBaseURL // the Protobuf expresses this as an enum to support other values // This code does not need to support multiple values - unless new hosts are used TexturesMcNet bool }
func NewTexturesFromSessionProfile ¶
func NewTexturesFromSessionProfile(sessionProfile minecraft.SessionProfileResponse) (t Textures, err error)
After having made an API call, this can be used to create a textures object
func (Textures) CustomSkinURL ¶
Used to get a fully qualified URL for the Skin with a custom Textures server
Click to show internal directories.
Click to hide internal directories.