瀏覽代碼

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;
             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.setDoOutput(false);
                 httpurlconnection.connect();
-
-                int code = httpurlconnection.getResponseCode();
+                
+                int code = httpurlconnection.getResponseCode();               
                 if(code != 200)
                 {
                     // Failed own server, trying crafatar