Giter Site home page Giter Site logo

mineskinclient's Introduction

MineskinClient

Client for api.mineskin.org

Can be used to generate valid texture data from skin image files.
You can also use mineskin.org to directly generate skin data from images.

The API requires official Minecraft accounts to upload the skin textures.
If you own a Minecraft account you don't actively use and want to contibute to the API's speed, please add your account here!

MineSkinClient client = new MineSkinClient("MyUserAgent");
client.generateUrl("https://image.url", SkinOptions.name("some cool skin")).thenAccept(skin -> {
    ...
})
<dependency>
    <groupId>org.mineskin</groupId>
    <artifactId>java-client</artifactId>
    <version>1.2.3-SNAPSHOT</version>
</dependency>
<repositories>
    <repository>
        <id>inventive-repo</id>
        <url>https://repo.inventivetalent.org/repository/public/</url>
    </repository>
</repositories>

mineskinclient's People

Contributors

inventivetalentdev avatar technicallycoded avatar yhdiamond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mineskinclient's Issues

mineskin API doesnt work often

Hi,

im getting often errors like this: { "error": "Failed to log into the account (#20). Please try again later", "details": "Login Failed. (403, jona): {"error":"ForbiddenOperationException","errorMessage":"Invalid credentials. Invalid username or password."}" }

(using api.mineskin.org)

Invalid JSON stops URLs from working

Greetings. MineSkin is great, so thanks for making it! :P

When I try to use a URL, I am receiving:

com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $

Entire ST:

01.01 23:01:14 [Server] WARN com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $ 
01.01 23:01:14 [Server] WARN at com.google.gson.JsonParser.parse(JsonParser.java:65) 
01.01 23:01:14 [Server] WARN at com.google.gson.JsonParser.parse(JsonParser.java:45) 
01.01 23:01:14 [Server] WARN at org.mineskin.MineskinClient.handleResponse(MineskinClient.java:245) 
01.01 23:01:14 [Server] WARN at org.mineskin.MineskinClient.lambda$generateUrl$1(MineskinClient.java:129) 
01.01 23:01:14 [Server] WARN at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
01.01 23:01:14 [Server] WARN at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
01.01 23:01:14 [Server] WARN at java.lang.Thread.run(Thread.java:748) 
01.01 23:01:14 [Server] WARN Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 12 path $ 
01.01 23:01:14 [Server] WARN at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1559)
 01.01 23:01:14 [Server] WARN at
com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1401) 
01.01 23:01:14 [Server] WARN at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542) 01.01 23:01:14 [Server] WARN at com.google.gson.stream.JsonReader.peek(JsonReader.java:425) 01.01 23:01:14 [Server] WARN at com.google.gson.JsonParser.parse(JsonParser.java:60) 
01.01 23:01:14 [Server] WARN ... 6 more

URL I'm using (test URL): https://www.minecraftskins.com/uploads/skins/2019/01/02/---the-twilight-zone----12698795.png

Let me know if I can provide more information.

Hey,

How I can check "RepublicanSensei"'s data with this API.

Invalid image file size

{
"success": false,
"errorType": "GeneratorError",
"errorCode": "invalid_image",
"error": "Invalid image file size",
"nextRequest": 1701330737.095,
"delayInfo": {
"seconds": 6,
"millis": 6000
}
}

Using Model.SLIM doesn't work

(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.

Incompatible with minecraft 1.19.2

Describe the bug
I am trying to use this with Fabric on 1.19.2 but there is dependency conflict

To Reproduce
Steps to reproduce the behavior:

  1. Start a project in fabric 1.19.2
  2. Go to build.gradle
  3. add
repositories {
    maven { url 'https://repo.inventivetalent.org/repository/public/' }
}

dependencies {
    // MineSkinClient
    implementation("org.mineskin:java-client:${project.mineskin_client_version}")
}
  1. Reload gradle
  2. Start minecraft
  3. Crash

Expected behavior
minecraft start correctly

Additional context
https://gist.github.com/Zailer43/5a799825f2ba0cc0196a617fbfa131d5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.