Merge branch 'master' into 1.17
This commit is contained in:
commit
6108cdce23
17 files changed
+174
-66
No files matched your search
@@ -0,0 +1,33 @@
|
||||
package carpet.utils;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
import net.fabricmc.api.DedicatedServerModInitializer;
|
||||
import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint;
|
||||
|
||||
import java.io.PrintStream;
|
||||
import java.lang.System;
|
||||
|
||||
/**
|
||||
* Runs only from GitHub Actions to generate the wiki
|
||||
* page with all Carpet rules on it.
|
||||
* It is here so it can be managed by the IDE
|
||||
*
|
||||
*/
|
||||
public class CarpetRulePrinter implements DedicatedServerModInitializer, PreLaunchEntrypoint {
|
||||
public static final PrintStream OLD_OUT = System.out;
|
||||
|
||||
@Override
|
||||
public void onInitializeServer() {
|
||||
// Minecraft (or whatever) changes the System.out to have prefixes,
|
||||
// our simple parser doesn't like that. So we change it back
|
||||
System.setOut(OLD_OUT);
|
||||
CarpetServer.onGameStarted();
|
||||
CarpetServer.settingsManager.printAllRulesToLog(null);
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPreLaunch() {
|
||||
// Just initializes our OLD_OUT by nooping the class
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package carpet.utils;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
import net.fabricmc.loader.api.entrypoint.PreLaunchEntrypoint;
|
||||
import java.lang.System;
|
||||
/**
|
||||
* Runs only from GitHub Actions to generate the wiki
|
||||
* page with all Carpet rules on it.
|
||||
* It is here so it can be managed by the IDE
|
||||
*
|
||||
* @author altrisi
|
||||
*
|
||||
*/
|
||||
public class RulePrinter implements PreLaunchEntrypoint {
|
||||
|
||||
@Override
|
||||
public void onPreLaunch() {
|
||||
CarpetServer.onGameStarted();
|
||||
CarpetServer.settingsManager.printAllRulesToLog(null);
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user