Documentation ¶
Index ¶
- Constants
- Variables
- func CleanupName(name string) string
- func ConnectServer(ctx context.Context, address, clientName string, packetFunc PacketFunc) (serverConn *minecraft.Conn, err error)
- func FindAllIps(Address string) (ret []string, err error)
- func GetChain(name string) (key *ecdsa.PrivateKey, chainData string, err error)
- func GetTokenSource(name string) oauth2.TokenSource
- func InitAPIClient(APIServer, APIKey string, metrics Metrics) error
- func PacketLogger(header packet.Header, payload []byte, src, dst, local_addr net.Addr)
- type APIRoutes
- type DBNameListItem
- type DBPlayerInfo
- type DBSkinListItem
- type JsonSkinData
- type MCChain
- type MQ
- type Metrics
- type PacketFunc
- type Queue
- type QueuedSkin
- type Skin
- type Skin_anim
Constants ¶
View Source
const TOKEN_FILE = "token.json"
Variables ¶
View Source
var APIClient *apiClient
View Source
var ExtraVerbose []string
View Source
var G_debug bool
View Source
var MutedPackets = []string{
"packet.UpdateBlock",
"packet.MoveActorAbsolute",
"packet.SetActorMotion",
"packet.SetTime",
"packet.RemoveActor",
"packet.AddActor",
"packet.UpdateAttributes",
"packet.Interact",
"packet.LevelEvent",
"packet.SetActorData",
"packet.MoveActorDelta",
"packet.MovePlayer",
"packet.BlockActorData",
"packet.PlayerAuthInput",
"packet.LevelChunk",
"packet.LevelSoundEvent",
"packet.ActorEvent",
"packet.NetworkChunkPublisherUpdate",
"packet.UpdateSubChunkBlocks",
"packet.SubChunk",
"packet.SubChunkRequest",
"packet.Animate",
"packet.NetworkStackLatency",
"packet.InventoryTransaction",
"packet.PlaySound",
}
View Source
var Pool = packet.NewPool()
Functions ¶
func ConnectServer ¶
func FindAllIps ¶
func GetChain ¶
func GetChain(name string) (key *ecdsa.PrivateKey, chainData string, err error)
GetChain gets a chain for this user
func GetTokenSource ¶
func GetTokenSource(name string) oauth2.TokenSource
GetTokenSource returns the token source for this username
func InitAPIClient ¶
InitAPIClient creates the api client
Types ¶
type DBNameListItem ¶ added in v0.1.3
type DBPlayerInfo ¶ added in v0.1.3
type DBPlayerInfo struct { Id primitive.ObjectID `bson:"_id,omitempty"` Xuid string `bson:"xuid"` ObservedNamesIngame []DBNameListItem `bson:"observed_names_ingame"` ObservedNamesXbox []DBNameListItem `bson:"observed_names_xbox"` ObservedSkins []DBSkinListItem `bson:"observed_skins"` }
type DBSkinListItem ¶ added in v0.1.3
type DBSkinListItem struct { Time primitive.Timestamp `bson:"time"` SkinDataHash string `bson:"skin_data_hash"` SkinId string `bson:"skin_id"` CapeDataHash string `bson:"cape_data_hash"` CapeId string `bson:"cape_id"` SkinResourceHash string `bson:"skin_resource_hash"` GeometryHash string `bson:"geometry_hash"` GeometryDataEngineVersion string `bson:"geometry_data_version"` FullId string `bson:"full_id"` PlayFabId string `bson:"playfab_id"` PremiumSkin bool `bson:"is_premium_skin"` PersonaSkin bool `bson:"is_persona_skin"` SkinColour string `bson:"skin_colour"` ArmSize string `bson:"arm_size"` }
type JsonSkinData ¶ added in v0.1.2
type JsonSkinData struct { SkinID string PlayFabID string SkinResourcePatch string SkinImageWidth, SkinImageHeight uint32 SkinData string Animations []Skin_anim CapeImageWidth, CapeImageHeight uint32 CapeData string SkinGeometry string AnimationData string GeometryDataEngineVersion string PremiumSkin bool PersonaSkin bool PersonaCapeOnClassicSkin bool PrimaryUser bool CapeID string FullID string SkinColour string ArmSize string PersonaPieces []protocol.PersonaPiece PieceTintColours []protocol.PersonaPieceTintColour Trusted bool }
func (*JsonSkinData) ToSkin ¶ added in v0.1.2
func (j *JsonSkinData) ToSkin() *Skin
type MQ ¶ added in v0.1.2
type MQ struct {
// contains filtered or unexported fields
}
func (*MQ) PubSubSkin ¶ added in v0.1.2
func (q *MQ) PubSubSkin(ctx context.Context, username, xuid, skin *DBSkinListItem) error
PubSubSkin puts skin to the pubsub
func (*MQ) PublishSkin ¶ added in v0.1.2
func (q *MQ) PublishSkin(ctx context.Context, skin *QueuedSkin) error
PublishSkin publishes a skin to the skin queue
func (*MQ) ReceiveSkins ¶ added in v0.1.2
func (q *MQ) ReceiveSkins() chan *QueuedSkin
ReceiveSkins receives skins to a channel
type QueuedSkin ¶ added in v0.1.2
type QueuedSkin struct { Username string Xuid string Skin *JsonSkinData ServerAddress string Time int64 }
Click to show internal directories.
Click to hide internal directories.