Skip to content

Commit

Permalink
feat(mixin): 完全禁用refMap,支持更多Java版本,更新mixin版本
Browse files Browse the repository at this point in the history
  • Loading branch information
huanmeng-qwq committed Aug 25, 2024
1 parent 2423158 commit 2e1be57
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<log4j2.version>2.19.0</log4j2.version>
<jkook.version>48d1a7b46237d1d29eee2e4df7de0a1da5139679</jkook.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mixin.version>0.12.4+mixin.0.8.5</mixin.version>
<mixin.version>0.15.2+mixin.0.8.7</mixin.version>
<asm.version>9.3</asm.version>
<!-- Used by JitPack CI -->
<skipShade>false</skipShade>
Expand Down
9 changes: 7 additions & 2 deletions src/main/java/snw/kookbc/impl/mixin/MixinServiceKookBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void prepare() {
*/
@Override
public Phase getInitialPhase() {
System.setProperty("mixin.env.remapRefMap", "false");
System.setProperty("mixin.env.disableRefMap", "true");

if (MixinServiceKookBC.findInStackTrace("snw.kookbc.LaunchMain", "launch") > 189) {
return Phase.DEFAULT;
Expand All @@ -166,7 +166,7 @@ public Phase getInitialPhase() {
*/
@Override
public CompatibilityLevel getMaxCompatibilityLevel() {
return CompatibilityLevel.JAVA_8;
return CompatibilityLevel.JAVA_22;
}

@Override
Expand Down Expand Up @@ -587,6 +587,11 @@ public ClassNode getClassNode(String className, boolean runTransformers) throws
return this.getClassNode(className, this.getClassBytes(className, true), ClassReader.EXPAND_FRAMES);
}

@Override
public ClassNode getClassNode(String className, boolean runTransformers, int flags) throws ClassNotFoundException, IOException {
return this.getClassNode(className, this.getClassBytes(className, runTransformers), flags);
}

/**
* Gets an ASM Tree for the supplied class bytecode
*
Expand Down

0 comments on commit 2e1be57

Please sign in to comment.