Update to legacylauncher 1.10 and asm 5.0.3

This commit is contained in:
cpw 2014-08-16 13:21:07 -04:00
parent 19b62a9fb8
commit 2ca75b3fa4
7 changed files with 16 additions and 16 deletions

View file

@ -8,10 +8,10 @@
"assets": "1.7.10",
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.9"
"name": "net.minecraft:launchwrapper:1.10"
},
{
"name": "org.ow2.asm:asm-debug-all:4.1",
"name": "org.ow2.asm:asm-debug-all:5.0.3",
"children" : ["sources"],
"url" : "http://repo.maven.apache.org/maven2"
},
@ -79,7 +79,7 @@
"name": "lzma:lzma:0.0.1"
},
{
"name": "com.mojang:realms:1.3.2"
"name": "com.mojang:realms:1.3.5"
},
{
"name": "org.apache.commons:commons-compress:1.8.1"

View file

@ -24,11 +24,11 @@
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.9",
"name": "net.minecraft:launchwrapper:1.10",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:4.1",
"name": "org.ow2.asm:asm-all:5.0.3",
"serverreq":true
},
{
@ -117,7 +117,7 @@
"serverreq":true
},
{
"name": "com.mojang:realms:1.3.2"
"name": "com.mojang:realms:1.3.5"
},
{
"name": "org.apache.commons:commons-compress:1.8.1"

View file

@ -8,7 +8,7 @@
"assets": "1.7.10",
"libraries": [
{
"name": "com.mojang:realms:1.3.2"
"name": "com.mojang:realms:1.3.5"
},
{
"name": "org.apache.commons:commons-compress:1.8.1"

View file

@ -141,7 +141,7 @@ public class EventSubscriptionTransformer implements IClassTransformer
*/
MethodNode method = new MethodNode(ASM4, ACC_PUBLIC, "<init>", getMethodDescriptor(VOID_TYPE), null, null);
method.instructions.add(new VarInsnNode(ALOAD, 0));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "<init>", getMethodDescriptor(VOID_TYPE)));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "<init>", getMethodDescriptor(VOID_TYPE), false));
method.instructions.add(new InsnNode(RETURN));
if (!hasDefaultCtr)
{
@ -161,7 +161,7 @@ public class EventSubscriptionTransformer implements IClassTransformer
*/
method = new MethodNode(ASM4, ACC_PROTECTED, "setup", getMethodDescriptor(VOID_TYPE), null, null);
method.instructions.add(new VarInsnNode(ALOAD, 0));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "setup", getMethodDescriptor(VOID_TYPE)));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "setup", getMethodDescriptor(VOID_TYPE), false));
method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", tList.getDescriptor()));
LabelNode initLisitener = new LabelNode();
method.instructions.add(new JumpInsnNode(IFNULL, initLisitener));
@ -171,8 +171,8 @@ public class EventSubscriptionTransformer implements IClassTransformer
method.instructions.add(new TypeInsnNode(NEW, tList.getInternalName()));
method.instructions.add(new InsnNode(DUP));
method.instructions.add(new VarInsnNode(ALOAD, 0));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "getListenerList", getMethodDescriptor(tList)));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tList.getInternalName(), "<init>", getMethodDescriptor(VOID_TYPE, tList)));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "getListenerList", getMethodDescriptor(tList), false));
method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tList.getInternalName(), "<init>", getMethodDescriptor(VOID_TYPE, tList), false));
method.instructions.add(new FieldInsnNode(PUTSTATIC, classNode.name, "LISTENER_LIST", tList.getDescriptor()));
method.instructions.add(new InsnNode(RETURN));
classNode.methods.add(method);

View file

@ -71,7 +71,7 @@ public class ItemStackTransformer implements IClassTransformer {
if (itemField.name.equals(fi.name) && fi.getOpcode() == Opcodes.GETFIELD)
{
it.remove();
MethodInsnNode replace = new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "net/minecraft/item/ItemStack",getItemMethod.name, getItemMethod.desc);
MethodInsnNode replace = new MethodInsnNode(Opcodes.INVOKEVIRTUAL, "net/minecraft/item/ItemStack",getItemMethod.name, getItemMethod.desc, false);
it.add(replace);
}
}

View file

@ -52,7 +52,7 @@ public class TerminalTransformer implements IClassTransformer
return new MethodVisitor(Opcodes.ASM4, super.visitMethod(mAccess, mName, mDesc, mSignature, mExceptions))
{
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc)
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean isIntf)
{
if (opcode == Opcodes.INVOKESTATIC && owner.equals("java/lang/System") && name.equals("exit") && desc.equals("(I)V"))
{
@ -98,7 +98,7 @@ public class TerminalTransformer implements IClassTransformer
desc = "(Ljava/lang/Runtime;I)V";
}
super.visitMethodInsn(opcode, owner, name, desc);
super.visitMethodInsn(opcode, owner, name, desc, isIntf);
}
};
}

View file

@ -94,7 +94,7 @@ public class ASMEventHandler implements IEventListener
mv = cw.visitMethod(ACC_PUBLIC, "<init>", "(Ljava/lang/Object;)V", null, null);
mv.visitCode();
mv.visitVarInsn(ALOAD, 0);
mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
mv.visitVarInsn(ALOAD, 0);
mv.visitVarInsn(ALOAD, 1);
mv.visitFieldInsn(PUTFIELD, desc, "instance", "Ljava/lang/Object;");
@ -110,7 +110,7 @@ public class ASMEventHandler implements IEventListener
mv.visitTypeInsn(CHECKCAST, instType);
mv.visitVarInsn(ALOAD, 1);
mv.visitTypeInsn(CHECKCAST, eventType);
mv.visitMethodInsn(INVOKEVIRTUAL, instType, callback.getName(), Type.getMethodDescriptor(callback));
mv.visitMethodInsn(INVOKEVIRTUAL, instType, callback.getName(), Type.getMethodDescriptor(callback), false);
mv.visitInsn(RETURN);
mv.visitMaxs(2, 2);
mv.visitEnd();