InventivetalentDev / MineskinClient

Java client for the MineSkin API
https://mineskin.org
MIT License
33 stars 15 forks source link

Using Model.SLIM doesn't work #2

Closed MrPowerGamerBR closed 7 years ago

MrPowerGamerBR commented 7 years ago

(Maybe I'm doing something wrong but...)

I tried generating a skin with Model.SLIM but it doesn't work, it always generates it using Model.DEFAULT.

    public static void main(String[] args) {
        MineskinClient mineskinClient = new MineskinClient(); // Criar Mineskin Client
        mineskinClient.generateUpload(new File("D://Pictures/skin.png"), SkinOptions.create("test", Model.SLIM, Visibility.PRIVATE), new SkinCallback() {

            @Override
            public void done(Skin arg0) {
                System.out.println("Signature: " + arg0.data.texture.signature);
                System.out.println("Value: " + arg0.data.texture.value);
            }

        });
    }

Output:

Signature: Y2R0sY26NmJIA8rWbcXIj34l3bI1YHUtnihgsNWmdCPBjd8HEY54g6oZGjBGel8t86v3j23Awu5kq6zLwNJwgJsfOOPcKoKnPvrPdf+W/gLz72XdQuVny3iMJbUgowHQMTPjr8GZpTgoI9qoFvIioqJv1Kp4eSKEY3opplfMIYqLixT+hLv4WaXglmyxpyjHVDndc4v2hQg7/2oSg1AT3YD9jEJut3E7Z4wqkfUOLoWVsAKkXXkuzEz9DOtUW9vJh2uZ1/X2qnnhJiLwaGZLdSwzLQpol2/NMgaSZk8ogwkOFrkNLNKsM6gx8c5QnRrAbzNdFsFCaPGcrutf/kuxJ5+dMDgNgL2Uv4Zg0QvMYF6Z/dGQ1K99dKEcYLgi+Y7QgN+39NuGXMjAGSxTBEHvEvZ4AFN6JSEnCH5LeXky6MXhzseMP0L2GKnBp/WSgJoP5Dp1JBGEOhL90VPfch2YUsBmgM8VqSD1CBLp6sp6F0oka7y4GsMXhlg8yzP0ukb6fDWthLFOcaQCNdFPQnCQnZMse2z9Y2vKGMtpaav2uOJoK1GIQH4TIDe+ohjiXnGzhR1F13Gr6lm8n4sQIokt3yR9uVvaONZPrEyHRXEwhXgNKqFiOVoEtTHYjZ6EDbJCfue/BRqASr3CrCbcb/zubEIbmwN6K9xHMimAU+w561k=
Value: eyJ0aW1lc3RhbXAiOjE0OTE4NDYyMzY1OTksInByb2ZpbGVJZCI6IjQzYTgzNzNkNjQyOTQ1MTBhOWFhYjMwZjViM2NlYmIzIiwicHJvZmlsZU5hbWUiOiJTa3VsbENsaWVudFNraW42Iiwic2lnbmF0dXJlUmVxdWlyZWQiOnRydWUsInRleHR1cmVzIjp7IlNLSU4iOnsidXJsIjoiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS8yYmU2ZWUxZDkxOTUyYzk5N2FmNTlkNmNlYjQ0M2RkMjUzMzMxYmUyNTAzN2M3YmViMjg1MWQ1N2RmNzljYiJ9fX0=

Base64 decoded

{"timestamp":1491846236599,"profileId":"43a8373d64294510a9aab30f5b3cebb3","profileName":"SkullClientSkin6","signatureRequired":true,"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/2be6ee1d91952c997af59d6ceb443dd253331be25037c7beb2851d57df79cb"}}}

As you can see there isn't {"model":"slim"} in the decoded JSON.

MrPowerGamerBR commented 7 years ago

However I didn't check if this issue also happens in the mineskin.org website, so maybe that's an MineSkin website issue or if it is an issue in the Java API.

InventivetalentDev commented 7 years ago

I wasn't even aware that there's supposed to be a model: slim part in the JSON(?) I'll look into it though.

InventivetalentDev commented 7 years ago

Okay, just checked it via mineskin.org and there is a model metadata when generated on the website.

MrPowerGamerBR commented 7 years ago

@InventivetalentDev I don't know if you changed something on your end (or maybe it was something that I changed) but it seems the issue was fixed.

InventivetalentDev commented 7 years ago

I didn't change anything directly related to that, but I think it was fixed due to a change I made to the duplicate checking. You probably just happened to generate a skin that already existed with a different model.

MrPowerGamerBR commented 7 years ago

@InventivetalentDev then I guess that change fixed it, I tried generating the skin again and it worked, I will test more about this, if it is really fixed, then I close this issue.

MrPowerGamerBR commented 7 years ago

@InventivetalentDev yeah, after a few days testing this, it seems it was fixed, thanks!