mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 03:49:14 +00:00
[1.18] Integrate the gametest framework with Forge (#8225)
Signed-off-by: SizableShrimp <[email protected]>
This commit is contained in:
1 parent
bb547a5748
commit
f0c2554b1c
28 files changed
+944
-8
No files matched your search
@@ -29,6 +29,7 @@ import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import net.minecraft.gametest.framework.GameTestServer;
|
||||
import net.minecraft.server.packs.repository.PackSource;
|
||||
import net.minecraft.server.packs.repository.RepositorySource;
|
||||
import net.minecraft.world.level.storage.LevelResource;
|
||||
@@ -97,7 +98,12 @@ public class ServerLifecycleHooks
|
||||
|
||||
public static boolean handleServerStarting(final MinecraftServer server)
|
||||
{
|
||||
DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, ()->()->LanguageHook.loadLanguagesOnServer(server));
|
||||
DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, ()->()->{
|
||||
LanguageHook.loadLanguagesOnServer(server);
|
||||
// GameTestServer requires the gametests to be registered earlier, so it is done in main and should not be done twice.
|
||||
if (!(server instanceof GameTestServer))
|
||||
net.minecraftforge.gametest.ForgeGameTestHooks.registerGametests();
|
||||
});
|
||||
PermissionAPI.initializePermissionAPI();
|
||||
return !MinecraftForge.EVENT_BUS.post(new ServerStartingEvent(server));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user