Move Yggdrasil methods to this repo

This commit is contained in:
Jacob Gunther
2023-02-24 12:51:29 -06:00
parent 4d926e5976
commit 2d1648f119
4 changed files with 142 additions and 7 deletions

View File

@@ -14,7 +14,6 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/mineatar-io/skin-render"
"github.com/mineatar-io/yggdrasil"
)
type QueryParams struct {
@@ -47,7 +46,7 @@ func LookupUUID(value string) (string, bool, error) {
return cache, true, nil
}
profile, err := yggdrasil.UsernameToUUID(value)
profile, err := UsernameToUUID(value)
if err != nil {
return "", false, err
@@ -113,7 +112,7 @@ func GetPlayerSkin(uuid string) (*image.NRGBA, bool, error) {
return cache, slim, nil
}
textures, err := yggdrasil.GetProfileTextures(uuid)
textures, err := GetProfileTextures(uuid)
if err != nil {
return nil, false, err
@@ -141,7 +140,7 @@ func GetPlayerSkin(uuid string) (*image.NRGBA, bool, error) {
return skin.GetDefaultSkin(slim), slim, nil
}
texturesResult, err := yggdrasil.GetDecodedTexturesValue(value)
texturesResult, err := GetDecodedTexturesValue(value)
if err != nil {
return nil, false, err