Fix Mistakes

This commit is contained in:
Alexander Xia committed 2016-02-03 17:53:37 +08:00
1 parent 46f0167f72
commit ddc11864fb
6 files changed
+25 -40

No files matched your search

@@ -21,7 +21,7 @@ import java.util.regex.*;
* @author (C) Jeremy Lam [JLChnToZ] 2013 & Alexander Xia [xfl03] 2014-2016
*/
public class CustomSkinLoader {
public final static String VERSION="12.7";
public final static String VERSION="12.8";
public final static String DefaultSkinURL = "http://skins.minecraft.net/MinecraftSkins/*.png";
public final static String DefaultCloakURL = "http://skins.minecraft.net/MinecraftCloaks/*.png";
@@ -46,7 +46,7 @@ public class CustomSkinLoader {
"http://skins.minecraft.net/MinecraftCloaks/*.png",
"http://s.optifine.net/capes/*.png",
"http://minecrack.fr.nf/mc/cloaksminecrackd/*.png",
"http://www.skinme.cc:88/MinecraftCloaks/*.png"};
"http://www.skinme.cc/MinecraftCloaks/*.png"};
private static String[] cloakURLs = null, skinURLs = null;
private HttpURLConnection C = null;
@@ -21,7 +21,7 @@ import java.util.regex.*;
* @author (C) Jeremy Lam [JLChnToZ] 2013 & Alexander Xia [xfl03] 2014-2016
*/
public class CustomSkinLoader {
public final static String VERSION="12.7";
public final static String VERSION="12.8";
public final static String DefaultSkinURL = "http://skins.minecraft.net/MinecraftSkins/*.png";
public final static String DefaultCloakURL = "http://skins.minecraft.net/MinecraftCloaks/*.png";
@@ -46,7 +46,7 @@ public class CustomSkinLoader {
"http://skins.minecraft.net/MinecraftCloaks/*.png",
"http://s.optifine.net/capes/*.png",
"http://minecrack.fr.nf/mc/cloaksminecrackd/*.png",
"http://www.skinme.cc:88/MinecraftCloaks/*.png"};
"http://www.skinme.cc/MinecraftCloaks/*.png"};
private static String[] cloakURLs = null, skinURLs = null;
private HttpURLConnection C = null;
@@ -20,40 +20,25 @@ public class ImageBufferDownload implements IImageBuffer
}
else
{
int ratio=p_78432_1_.getWidth()/64;
this.imageWidth = 64 * ratio;
this.imageHeight = 64 * ratio;
BufferedImage var2 = new BufferedImage(this.imageWidth, this.imageHeight, 2);
this.imageWidth = p_78432_1_.getWidth();//Default: 64
this.imageHeight = p_78432_1_.getHeight();//Default: 32
BufferedImage var2 = new BufferedImage(this.imageWidth, this.imageWidth / 2, 2);
Graphics var3 = var2.getGraphics();
var3.drawImage(p_78432_1_, 0, 0, (ImageObserver)null);
if (p_78432_1_.getHeight() == 32 * ratio)
{
var3.drawImage(var2, 24 * ratio, 48 * ratio, 20 * ratio, 52 * ratio, 4 * ratio, 16 * ratio, 8 * ratio, 20 * ratio, (ImageObserver)null);
var3.drawImage(var2, 28 * ratio, 48 * ratio, 24 * ratio, 52 * ratio, 8 * ratio, 16 * ratio, 12 * ratio, 20 * ratio, (ImageObserver)null);
var3.drawImage(var2, 20 * ratio, 52 * ratio, 16 * ratio, 64 * ratio, 8 * ratio, 20 * ratio, 12 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 24 * ratio, 52 * ratio, 20 * ratio, 64 * ratio, 4 * ratio, 20 * ratio, 8 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 28 * ratio, 52 * ratio, 24 * ratio, 64 * ratio, 0 * ratio, 20 * ratio, 4 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 32 * ratio, 52 * ratio, 28 * ratio, 64 * ratio, 12 * ratio, 20 * ratio, 16 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 40 * ratio, 48 * ratio, 36 * ratio, 52 * ratio, 44 * ratio, 16 * ratio, 48 * ratio, 20 * ratio, (ImageObserver)null);
var3.drawImage(var2, 44 * ratio, 48 * ratio, 40 * ratio, 52 * ratio, 48 * ratio, 16 * ratio, 52 * ratio, 20 * ratio, (ImageObserver)null);
var3.drawImage(var2, 36 * ratio, 52 * ratio, 32 * ratio, 64 * ratio, 48 * ratio, 20 * ratio, 52 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 40 * ratio, 52 * ratio, 36 * ratio, 64 * ratio, 44 * ratio, 20 * ratio, 48 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 44 * ratio, 52 * ratio, 40 * ratio, 64 * ratio, 40 * ratio, 20 * ratio, 44 * ratio, 32 * ratio, (ImageObserver)null);
var3.drawImage(var2, 48 * ratio, 52 * ratio, 44 * ratio, 64 * ratio, 52 * ratio, 20 * ratio, 56 * ratio, 32 * ratio, (ImageObserver)null);
if(imageWidth == imageHeight){
var3.drawImage(p_78432_1_, 0, 0, this.imageWidth, this.imageWidth / 2, 0, 0, this.imageWidth, this.imageWidth / 2, (ImageObserver)null);
var3.drawImage(p_78432_1_, 0, this.imageWidth / 4, this.imageWidth, this.imageWidth / 2, 0, this.imageWidth / 2 , this.imageWidth, this.imageWidth / 4 * 3, (ImageObserver)null);
imageHeight/=2;
}else{
var3.drawImage(p_78432_1_, 0, 0, (ImageObserver)null);
}
var3.dispose();
this.imageData = ((DataBufferInt)var2.getRaster().getDataBuffer()).getData();
this.setAreaOpaque(0, 0, 32 * ratio, 16 * ratio);
this.setAreaTransparent(32 * ratio, 0, 64 * ratio, 32 * ratio);
this.setAreaOpaque(0, 16 * ratio, 64 * ratio, 32 * ratio);
this.setAreaTransparent(0, 32 * ratio, 16 * ratio, 48 * ratio);
this.setAreaTransparent(16 * ratio, 32 * ratio, 40 * ratio, 48 * ratio);
this.setAreaTransparent(40 * ratio, 32 * ratio, 56 * ratio, 48 * ratio);
this.setAreaTransparent(0, 48 * ratio, 16 * ratio, 64 * ratio);
this.setAreaOpaque(16 * ratio, 48 * ratio, 48 * ratio, 64 * ratio);
this.setAreaTransparent(48 * ratio, 48 * ratio, 64 * ratio, 64 * ratio);
//this.setAreaOpaque(0, 0, 32, 16);
//this.setAreaTransparent(32, 0, 64, 32);
//this.setAreaOpaque(0, 16, 64, 32);
this.setAreaOpaque(0, 0, imageWidth / 2, imageHeight / 2);
this.setAreaTransparent(imageWidth / 2, 0, imageWidth, imageHeight);
this.setAreaOpaque(0, imageHeight / 2, imageWidth, imageHeight);
return var2;
}
}
@@ -21,7 +21,7 @@ import java.util.regex.*;
* @author (C) Jeremy Lam [JLChnToZ] 2013 & Alexander Xia [xfl03] 2014-2016
*/
public class CustomSkinLoader {
public final static String VERSION="12.7";
public final static String VERSION="12.8";
public final static String DefaultSkinURL = "http://skins.minecraft.net/MinecraftSkins/*.png";
public final static String DefaultCloakURL = "http://skins.minecraft.net/MinecraftCloaks/*.png";
@@ -46,7 +46,7 @@ public class CustomSkinLoader {
"http://skins.minecraft.net/MinecraftCloaks/*.png",
"http://s.optifine.net/capes/*.png",
"http://minecrack.fr.nf/mc/cloaksminecrackd/*.png",
"http://www.skinme.cc:88/MinecraftCloaks/*.png"};
"http://www.skinme.cc/MinecraftCloaks/*.png"};
private static String[] cloakURLs = null, skinURLs = null;
private HttpURLConnection C = null;
@@ -21,7 +21,7 @@ import java.util.regex.*;
* @author (C) Jeremy Lam [JLChnToZ] 2013 & Alexander Xia [xfl03] 2014-2016
*/
public class CustomSkinLoader {
public final static String VERSION="12.7";
public final static String VERSION="12.8";
public final static String DefaultSkinURL = "http://skins.minecraft.net/MinecraftSkins/*.png";
public final static String DefaultCloakURL = "http://skins.minecraft.net/MinecraftCloaks/*.png";
@@ -46,7 +46,7 @@ public class CustomSkinLoader {
"http://skins.minecraft.net/MinecraftCloaks/*.png",
"http://s.optifine.net/capes/*.png",
"http://minecrack.fr.nf/mc/cloaksminecrackd/*.png",
"http://www.skinme.cc:88/MinecraftCloaks/*.png"};
"http://www.skinme.cc/MinecraftCloaks/*.png"};
private static String[] cloakURLs = null, skinURLs = null;
private HttpURLConnection C = null;
+2 -2
View File
@@ -1,13 +1,13 @@
MCCustomSkinLoader
==================
版权所有(C) 2013-2014 JLChnToZ xfl03
版权所有(C) 2013-2016 JLChnToZ xfl03
这一程序是自由软件,你可以遵照自由软件基金会出版的GNU通用公共许可证条款来修改和重新发布这一程序。或者用许可证的第三版,或者(根据你的选择)用任何更新的版本。
发布这一程序的目的是希望它有用,但没有任何担保。甚至没有适合特定目的的隐含的担保。更详细的情况请参阅GNU通用公共许可证。
Copyright(C) 2013-2014 JLChnToZ xfl03
Copyright(C) 2013-2016 JLChnToZ xfl03
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.