Skip to content

Commit

Permalink
Merge branch 'develop-v0' into main-v0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed May 5, 2024
2 parents b03d650 + bf0200c commit c88684b
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public class OneConfigTweaker implements ITweaker {
private static final String MIXIN_TWEAKER = "org.spongepowered.asm.launch.MixinTweaker";

public OneConfigTweaker() {
try {
injectMixinTweaker();
} catch (Throwable t) {
t.printStackTrace();
}
final List<SourceFile> sourceFiles = getSourceFiles();
if (sourceFiles.isEmpty()) {
System.out.println("Not able to determine current file. Mod will NOT work");
Expand All @@ -63,15 +68,10 @@ public OneConfigTweaker() {
for (SourceFile sourceFile : sourceFiles) {
try {
setupSourceFile(sourceFile);
} catch (Exception e) {
e.printStackTrace();
} catch (Throwable t) {
t.printStackTrace();
}
}
try {
injectMixinTweaker();
} catch (Exception e) {
e.printStackTrace();
}
}

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -209,6 +209,13 @@ private SourceFile(File file, String coreMod, boolean mixin) {

@Override
public void acceptOptions(List<String> args, File gameDir, File assetsDir, String profile) {
boolean captureNext = false;
for (String arg : args) {
if (captureNext) {
Mixins.addConfiguration(arg);
}
captureNext = "--mixin".equals(arg);
}
}

@Override
Expand Down

0 comments on commit c88684b

Please sign in to comment.