Skip to content

Commit

Permalink
make mods available on the system classloader
Browse files Browse the repository at this point in the history
  • Loading branch information
vectrixdevelops committed Apr 24, 2021
1 parent 23ba486 commit 13ef7c4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private URL computeNext() {
try {
return resolved.toUri().toURL();
} catch (final MalformedURLException exception) {
IgniteLaunchService.this.logger.error("Failed to compute resource path for '" + resolved.toString() + "'!", exception);
IgniteLaunchService.this.logger.error("Failed to compute resource path for '" + resolved + "'!", exception);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
import org.spongepowered.asm.mixin.Mixins;
import space.vectrix.ignite.api.mod.ModContainer;
import space.vectrix.ignite.api.mod.ModResource;
import space.vectrix.ignite.applaunch.agent.Agent;
import space.vectrix.ignite.applaunch.util.IgniteConstants;

import java.io.IOException;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
Expand Down Expand Up @@ -87,6 +89,12 @@ public boolean locateResources() {
for (final ModContainer container : this.resourceLoader.loadResources(this)) {
final ModResource resource = container.getResource();

try {
Agent.addJar(container.getResource().getPath());
} catch (final IOException exception) {
this.getLogger().error("Unable to add container '" + container.getId() + "' to the classpath!", exception);
}

this.containers.put(container.getId(), container);

final Map.Entry<String, Path> entry = Maps.immutableEntry(resource.getPath().getFileName().toString(), resource.getPath());
Expand Down

0 comments on commit 13ef7c4

Please sign in to comment.