mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-21 04:32:33 +00:00
Fixed java.lang.VerifyError incorrect stack frame errors
This commit is contained in:
1 parent
e51a2dd288
commit
d742604aab
4 files changed
+4
-5
No files matched your search
@@ -53,10 +53,10 @@ public class MixinClassWriter extends ClassWriter {
|
||||
ClassInfo d = ClassInfo.forName(type2);
|
||||
|
||||
if (c.hasSuperClass(d)) {
|
||||
return type1;
|
||||
return type2;
|
||||
}
|
||||
if (d.hasSuperClass(c)) {
|
||||
return type2;
|
||||
return type1;
|
||||
}
|
||||
if (c.isInterface() || d.isInterface()) {
|
||||
return MixinClassWriter.JAVA_LANG_OBJECT;
|
||||
@@ -68,7 +68,7 @@ public class MixinClassWriter extends ClassWriter {
|
||||
return MixinClassWriter.JAVA_LANG_OBJECT;
|
||||
}
|
||||
|
||||
} while (!c.hasSuperClass(d));
|
||||
} while (!d.hasSuperClass(c));
|
||||
|
||||
return c.getName();
|
||||
}
|
||||
|
||||
@@ -130,6 +130,7 @@ class MixinPreProcessor {
|
||||
MixinTargetContext createContextFor(ClassNode target) {
|
||||
this.prepare();
|
||||
MixinTargetContext context = new MixinTargetContext(this.mixin, this.classNode, target);
|
||||
target.version = Math.max(this.classNode.version, target.version);
|
||||
this.attach(context);
|
||||
return context;
|
||||
}
|
||||
|
||||
@@ -392,7 +392,6 @@ public class MixinTargetContext implements IReferenceMapperContext {
|
||||
* @param handle Handle to transform
|
||||
*/
|
||||
private Handle transformHandle(MethodNode method, Iterator<AbstractInsnNode> iter, Handle handle) {
|
||||
this.targetClass.version = Constants.JAVA8_CLASSFILE_VERSION;
|
||||
MemberRef.HandleRef memberRef = new MemberRef.HandleRef(handle);
|
||||
if (memberRef.isField()) {
|
||||
this.transformFieldRef(method, iter, memberRef);
|
||||
|
||||
@@ -32,7 +32,6 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
*/
|
||||
public abstract class Constants {
|
||||
|
||||
public static final int JAVA8_CLASSFILE_VERSION = 52;
|
||||
public static final String INIT = "<init>";
|
||||
public static final String CLINIT = "<clinit>";
|
||||
public static final String IMAGINARY_SUPER = "super$";
|
||||
|
||||
Reference in new issue
Block a user