update asm to 6.0

This commit is contained in:
yushijinhun 2018-01-25 19:49:32 +08:00
parent 5705c009aa
commit 0fbff175ff
No known key found for this signature in database
GPG key ID: 5BC167F73EA558E4
4 changed files with 11 additions and 11 deletions

View file

@ -1,5 +1,5 @@
plugins { plugins {
id 'com.github.johnrengelman.shadow' version '2.0.1' id 'com.github.johnrengelman.shadow' version '2.0.2'
id 'com.palantir.git-version' version '0.10.0' id 'com.palantir.git-version' version '0.10.0'
id 'java' id 'java'
} }
@ -10,7 +10,7 @@ repositories {
} }
dependencies { dependencies {
compile 'org.ow2.asm:asm:5.2' compile 'org.ow2.asm:asm:6.0'
compile 'org.yaml:snakeyaml:1.19' compile 'org.yaml:snakeyaml:1.19'
compileOnly ('net.minecraft:launchwrapper:1.12') { compileOnly ('net.minecraft:launchwrapper:1.12') {
transitive = false transitive = false

View file

@ -1,6 +1,6 @@
package org.to2mbn.authlibinjector.transform; package org.to2mbn.authlibinjector.transform;
import static org.objectweb.asm.Opcodes.ASM5; import static org.objectweb.asm.Opcodes.ASM6;
import static org.to2mbn.authlibinjector.AuthlibInjector.log; import static org.to2mbn.authlibinjector.AuthlibInjector.log;
import java.util.Optional; import java.util.Optional;
import java.util.function.Function; import java.util.function.Function;
@ -17,11 +17,11 @@ public class LdcTransformUnit implements TransformUnit {
@Override @Override
public Optional<ClassVisitor> transform(String className, ClassVisitor writer, Runnable modifiedCallback) { public Optional<ClassVisitor> transform(String className, ClassVisitor writer, Runnable modifiedCallback) {
return Optional.of(new ClassVisitor(ASM5, writer) { return Optional.of(new ClassVisitor(ASM6, writer) {
@Override @Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new MethodVisitor(ASM5, super.visitMethod(access, name, desc, signature, exceptions)) { return new MethodVisitor(ASM6, super.visitMethod(access, name, desc, signature, exceptions)) {
@Override @Override
public void visitLdcInsn(Object cst) { public void visitLdcInsn(Object cst) {

View file

@ -2,7 +2,7 @@ package org.to2mbn.authlibinjector.transform;
import static org.objectweb.asm.Opcodes.AASTORE; import static org.objectweb.asm.Opcodes.AASTORE;
import static org.objectweb.asm.Opcodes.ANEWARRAY; import static org.objectweb.asm.Opcodes.ANEWARRAY;
import static org.objectweb.asm.Opcodes.ASM5; import static org.objectweb.asm.Opcodes.ASM6;
import static org.objectweb.asm.Opcodes.DUP; import static org.objectweb.asm.Opcodes.DUP;
import static org.objectweb.asm.Opcodes.ICONST_0; import static org.objectweb.asm.Opcodes.ICONST_0;
import static org.objectweb.asm.Opcodes.ICONST_1; import static org.objectweb.asm.Opcodes.ICONST_1;
@ -23,12 +23,12 @@ public class SkinWhitelistTransformUnit implements TransformUnit {
@Override @Override
public Optional<ClassVisitor> transform(String className, ClassVisitor writer, Runnable modifiedCallback) { public Optional<ClassVisitor> transform(String className, ClassVisitor writer, Runnable modifiedCallback) {
if ("com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService".equals(className)) { if ("com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService".equals(className)) {
return Optional.of(new ClassVisitor(ASM5, writer) { return Optional.of(new ClassVisitor(ASM6, writer) {
@Override @Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("<clinit>".equals(name)) { if ("<clinit>".equals(name)) {
return new MethodVisitor(ASM5, super.visitMethod(access, name, desc, signature, exceptions)) { return new MethodVisitor(ASM6, super.visitMethod(access, name, desc, signature, exceptions)) {
int status = 0; int status = 0;

View file

@ -1,6 +1,6 @@
package org.to2mbn.authlibinjector.transform; package org.to2mbn.authlibinjector.transform;
import static org.objectweb.asm.Opcodes.ASM5; import static org.objectweb.asm.Opcodes.ASM6;
import static org.objectweb.asm.Opcodes.BASTORE; import static org.objectweb.asm.Opcodes.BASTORE;
import static org.objectweb.asm.Opcodes.BIPUSH; import static org.objectweb.asm.Opcodes.BIPUSH;
import static org.objectweb.asm.Opcodes.DUP; import static org.objectweb.asm.Opcodes.DUP;
@ -25,12 +25,12 @@ public class YggdrasilKeyTransformUnit implements TransformUnit {
@Override @Override
public Optional<ClassVisitor> transform(String className, ClassVisitor writer, Runnable modifiedCallback) { public Optional<ClassVisitor> transform(String className, ClassVisitor writer, Runnable modifiedCallback) {
if ("com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService".equals(className)) { if ("com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService".equals(className)) {
return Optional.of(new ClassVisitor(ASM5, writer) { return Optional.of(new ClassVisitor(ASM6, writer) {
@Override @Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if ("<init>".equals(name)) { if ("<init>".equals(name)) {
return new MethodVisitor(ASM5, super.visitMethod(access, name, desc, signature, exceptions)) { return new MethodVisitor(ASM6, super.visitMethod(access, name, desc, signature, exceptions)) {
int state = 0; int state = 0;