Skip to content
This repository was archived by the owner on Jan 3, 2020. It is now read-only.

Commit 5f4fd3a

Browse files
committed
no force opaque
1 parent 9d67527 commit 5f4fd3a

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ buildscript {
1717

1818
apply plugin: 'forge'
1919

20-
version = "1.1"
20+
version = "1.2-dev2"
2121
group= "org.devinprogress.uniskinmod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
2222
archivesBaseName = "UniSkinMod"
2323

src/main/java/org/devinprogress/uniskinmod/CoreTransformer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class CoreTransformer implements IClassTransformer {
3939
public CoreTransformer(){
4040
asm=new ASMHelper(this);
4141
asm.add("net.minecraft.client.resources.SkinManager$3","run","run","()V","()V","injectCode");
42+
asm.add("net.minecraft.client.renderer.ImageBufferDownload","b","setAreaOpaque","(IIII)V","(IIII)V","noOpaque");
4243
asm.add("com.mojang.authlib.minecraft.MinecraftProfileTexture", "getHash", "getHash", "()Ljava/lang/String;", "()Ljava/lang/String;","newHash");
4344
}
4445

@@ -58,6 +59,12 @@ public static void injectCode(MethodNode mn){
5859
ASMHelper.InsertInvokeStaticBefore(mn,n,"org.devinprogress.uniskinmod.SkinCore","injectTexture","(Ljava/util/HashMap;Lcom/mojang/authlib/GameProfile;)V");
5960
}
6061

62+
public static void noOpaque(MethodNode mn){
63+
mn.instructions.clear();
64+
mn.instructions.add(new InsnNode(Opcodes.RETURN));
65+
mn.maxLocals=1;mn.maxStack=0;
66+
}
67+
6168
public static void newHash(MethodNode mn){
6269
SkinCore.log("hash Transformer Hit");
6370
mn.instructions.clear();

src/main/java/org/devinprogress/uniskinmod/SkinCore.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ public void injectData(Map<String, Object> data) {
6767
f.createNewFile();
6868
FileWriter fw = new FileWriter(cfgPath);
6969
BufferedWriter bw = new BufferedWriter(fw);
70-
bw.write("#Skin: http://your.domain/**** ");bw.newLine();
71-
bw.write("#Cloak: http://your.domain/**** ");bw.newLine();
72-
bw.write("#Use '%s' to represent the player's name.");bw.newLine();
73-
bw.write("#The file is Case-Sensitive.");bw.newLine();
70+
bw.write("Skin: http://www.skinme.cc/MinecraftSkins/%s.png");bw.newLine();
71+
bw.write("Cloak: http://www.skinme.cc/MinecraftCloaks/%s.png");bw.newLine();
72+
bw.write("Skin: http://skins.minecraft.net/MinecraftSkins/%s.png");bw.newLine();
73+
bw.write("Cloak: http://skins.minecraft.net/MinecraftCloaks/%s.png");bw.newLine();
7474
bw.flush();bw.close();fw.close();
7575
}
7676

@@ -79,7 +79,7 @@ public void injectData(Map<String, Object> data) {
7979
String theLine;
8080
while (br.ready()) {
8181
theLine = br.readLine();
82-
if (theLine.startsWith("#"))
82+
if (theLine.startsWith("#")||theLine.equals(""))
8383
continue;
8484
if (!tryProcessLine(theLine)){//failed
8585
log("Failed to process the config line: '"+theLine+"'");

0 commit comments

Comments
 (0)