Javadocs, cleanup, extension's client rules, built-in BundledModules generators, etc (#544)
* Add javadocs to many methods * Added built-in ways to generate BundledModules and documented them * Add Eclipse launch files to .gitignore and fix 11 warnings * Remove many unused imports * Remove some dead and unused code around app loading * Allow extensions to have client-side rules in their SettingsManager Also change tabs to spaces when those changed * Remove unnecessary classloader param in BundledModule * Change max tickwarp duration to Integer.MAX_VALUE * Move RulePrinter into the source so it can be managed by the IDE * Properly reset hopperCounters when changing worlds Also change tabs to spaces again and minor tweaks to javadocs * Run mergedocs even if Full.md was modified * Update src/main/java/carpet/commands/TickCommand.java Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
This commit is contained in:
1 parent
f444fab183
commit
ba1071a8d1
35 files changed
+315
-91
No files matched your search
@@ -7,6 +7,7 @@ import java.util.Random;
|
||||
|
||||
import carpet.commands.*;
|
||||
import carpet.network.ServerNetworkHandler;
|
||||
import carpet.helpers.HopperCounter;
|
||||
import carpet.helpers.TickSpeed;
|
||||
import carpet.logging.LoggerRegistry;
|
||||
import carpet.script.CarpetScriptServer;
|
||||
@@ -44,6 +45,12 @@ public class CarpetServer implements ClientModInitializer,DedicatedServerModInit
|
||||
}
|
||||
|
||||
// Separate from onServerLoaded, because a server can be loaded multiple times in singleplayer
|
||||
/**
|
||||
* Registers a {@link CarpetExtension} to be managed by Carpet.<br>
|
||||
* Should be called before Carpet's startup, like in Fabric Loader's
|
||||
* {@link net.fabricmc.api.ModInitializer} entrypoint
|
||||
* @param extension The instance of a {@link CarpetExtension} to be registered
|
||||
*/
|
||||
public static void manageExtension(CarpetExtension extension)
|
||||
{
|
||||
extensions.add(extension);
|
||||
@@ -85,6 +92,7 @@ public class CarpetServer implements ClientModInitializer,DedicatedServerModInit
|
||||
{
|
||||
extensions.forEach(e -> e.onServerLoadedWorlds(minecraftServer));
|
||||
scriptServer.initializeForWorld();
|
||||
HopperCounter.resetAll(minecraftServer);
|
||||
}
|
||||
|
||||
public static void tick(MinecraftServer server)
|
||||
|
||||
Reference in new issue
Block a user