Skip to content

Commit

Permalink
We don't need to check since ModBootstrap won't run in application bo…
Browse files Browse the repository at this point in the history
…otstrap mode
  • Loading branch information
InitAuther97 committed Feb 19, 2025
1 parent 4e999fa commit 687a051
Showing 1 changed file with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.CodeSigner;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.*;
import java.util.jar.Manifest;

public class ModBootstrap implements AbstractBootstrap {
Expand All @@ -46,7 +43,9 @@ public record ModBoot(Configuration configuration, ClassLoader parent) {}

static void run() {
var plugin = Launcher.INSTANCE.environment().findLaunchPlugin("arclight_implementer");
if (plugin.isPresent()) return;
if (plugin.isPresent()) {
return;
}
var logger = LogManager.getLogger("Arclight");
var marker = MarkerManager.getMarker("INSTALL");
try {
Expand Down Expand Up @@ -86,6 +85,7 @@ private void inject() throws Throwable {
injectLaunchPlugin();
}

// No need to check again since it's already checked in run()
@Override
public void dirtyHacks() throws Exception {
AbstractBootstrap.super.dirtyHacks();
Expand All @@ -105,12 +105,6 @@ public void dirtyHacks() throws Exception {
throw new RuntimeException("Cannot transform ModDiscoverer: <init> not found");
}

for (var field: clazz.fields) {
if ("arclight$INSTANCE".equals(field.name)) {
return;
}
}

FrameNode lastFrame = null;
for (var insn: constructor.instructions) {
if (insn instanceof FrameNode frame) {
Expand Down

0 comments on commit 687a051

Please sign in to comment.