소스 검색

changed human skin loader into a folder serverside

Kajetan Johannes Hammerle 5 년 전
부모
커밋
b491aa4fc1
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      src/main/java/me/km/entities/HumanSkinLoader.java

+ 4 - 5
src/main/java/me/km/entities/HumanSkinLoader.java

@@ -56,14 +56,13 @@ public class HumanSkinLoader
             HttpURLConnection httpurlconnection = null;
             HttpURLConnection httpurlconnection = null;
             try
             try
             {
             {
-                //httpurlconnection = (HttpURLConnection)(new URL("http://skins.minecraft.net/MinecraftSkins/" + name + ".png"))
-                httpurlconnection = (HttpURLConnection) (new URL("http://skins.hammerle.me/" + name + ".png"))
-                        .openConnection(Minecraft.getInstance().getProxy());
+                URL url = new URL("http://skins.hammerle.me/skins/" + name + ".png");
+                httpurlconnection = (HttpURLConnection) url.openConnection(Minecraft.getInstance().getProxy());
                 httpurlconnection.setDoInput(true);
                 httpurlconnection.setDoInput(true);
                 httpurlconnection.setDoOutput(false);
                 httpurlconnection.setDoOutput(false);
                 httpurlconnection.connect();
                 httpurlconnection.connect();
-
-                int code = httpurlconnection.getResponseCode();
+                
+                int code = httpurlconnection.getResponseCode();               
                 if(code != 200)
                 if(code != 200)
                 {
                 {
                     // Failed own server, trying crafatar
                     // Failed own server, trying crafatar