Add modular class loaders, enhanced mod verification, and new test cases for mod loading and validation.

This commit is contained in:
Overlord committed 2026-10-02 11:20:31 +02:00
1 parent df4d58a279
commit 3b21fc3aa6
27 files changed
+1871 -105

No files matched your search

@@ -7,6 +7,8 @@ import dev.overlord.zomboidforge.core.mods.ModLoadException;
import zombie.core.Core;
import java.nio.file.Path;
/**
* Hooks called by patched {@code zombie.network.GameServer} code and its shutdown hook
* {@code GameServer$1}. Exceptions are caught here: the main loop logs repeated exceptions only
@@ -34,8 +36,10 @@ public final class ServerHooks
{
System.out.println("[ZomboidForge] " + ZomboidForge.VERSION + " loading mods.");
GameVersion game = GameVersion.parse(Core.getInstance().getGameAndBuildVersion());
ServerHooks.FORGE.load(game, ServerHooks.class.getClassLoader());
GameVersion game = GameVersion.parse(Core.getInstance().getGameAndBuildVersion());
Path gameJar = Path.of(Core.class.getProtectionDomain().getCodeSource().getLocation().toURI());
ServerHooks.FORGE.load(game, gameJar, ServerHooks.class.getClassLoader());
return true;
}