Class CurvedSpacetimeGameProvider

java.lang.Object
io.codetoil.curved_spacetime.loader.quiltmc.CurvedSpacetimeGameProvider
All Implemented Interfaces:
org.quiltmc.loader.impl.game.GameProvider

public class CurvedSpacetimeGameProvider extends Object implements org.quiltmc.loader.impl.game.GameProvider
Describes Curved Spacetime to Quilt Loader as the "game" it is loading.

Quilt is built to load mods for a game, so running anything else under it means supplying a provider that answers what that game is: its id and version, the jars it lives in, the built-in module it contributes, and how to launch it. That last part is why io.codetoil.curved_spacetime.Start.start must keep its signature — this provider invokes it reflectively, so a change there fails at run time rather than compile time.

  • Constructor Details

    • CurvedSpacetimeGameProvider

      public CurvedSpacetimeGameProvider()
      Creates the game provider.

      Instantiated by Quilt Loader through its service loader; the jars are not located until locateGame(QuiltLauncher, String[]) runs.

  • Method Details

    • getGameId

      public String getGameId()
      Specified by:
      getGameId in interface org.quiltmc.loader.impl.game.GameProvider
    • getGameName

      public String getGameName()
      Specified by:
      getGameName in interface org.quiltmc.loader.impl.game.GameProvider
    • getRawGameVersion

      public String getRawGameVersion()
      Specified by:
      getRawGameVersion in interface org.quiltmc.loader.impl.game.GameProvider
    • getNormalizedGameVersion

      public String getNormalizedGameVersion()
      Specified by:
      getNormalizedGameVersion in interface org.quiltmc.loader.impl.game.GameProvider
    • getBuiltinMods

      public Collection<org.quiltmc.loader.impl.game.GameProvider.BuiltinMod> getBuiltinMods()
      Specified by:
      getBuiltinMods in interface org.quiltmc.loader.impl.game.GameProvider
    • getGameJars

      public List<Path> getGameJars(String namespace)
      Specified by:
      getGameJars in interface org.quiltmc.loader.impl.game.GameProvider
    • getEntrypoint

      public String getEntrypoint()
      Specified by:
      getEntrypoint in interface org.quiltmc.loader.impl.game.GameProvider
    • getLaunchDirectory

      public Path getLaunchDirectory()
      Specified by:
      getLaunchDirectory in interface org.quiltmc.loader.impl.game.GameProvider
    • getMappingConfiguration

      public org.quiltmc.loader.impl.game.MappingConfiguration getMappingConfiguration()
      Specified by:
      getMappingConfiguration in interface org.quiltmc.loader.impl.game.GameProvider
    • requiresUrlClassLoader

      public boolean requiresUrlClassLoader()
      Specified by:
      requiresUrlClassLoader in interface org.quiltmc.loader.impl.game.GameProvider
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface org.quiltmc.loader.impl.game.GameProvider
    • locateGame

      public boolean locateGame(org.quiltmc.loader.impl.launch.common.QuiltLauncher launcher, String[] args)
      Specified by:
      locateGame in interface org.quiltmc.loader.impl.game.GameProvider
    • isGameClass

      public boolean isGameClass(String name)
      Specified by:
      isGameClass in interface org.quiltmc.loader.impl.game.GameProvider
    • initialize

      public void initialize(org.quiltmc.loader.impl.launch.common.QuiltLauncher launcher)
      Specified by:
      initialize in interface org.quiltmc.loader.impl.game.GameProvider
    • getArguments

      public org.quiltmc.loader.impl.util.Arguments getArguments()
      Specified by:
      getArguments in interface org.quiltmc.loader.impl.game.GameProvider
    • getLaunchArguments

      public String[] getLaunchArguments(boolean sanitize)
      Specified by:
      getLaunchArguments in interface org.quiltmc.loader.impl.game.GameProvider
    • getEntrypointTransformer

      public org.quiltmc.loader.impl.entrypoint.GameTransformer getEntrypointTransformer()
      Specified by:
      getEntrypointTransformer in interface org.quiltmc.loader.impl.game.GameProvider
    • hasAwtSupport

      public boolean hasAwtSupport()
      Specified by:
      hasAwtSupport in interface org.quiltmc.loader.impl.game.GameProvider
    • unlockClassPath

      public void unlockClassPath(org.quiltmc.loader.impl.launch.common.QuiltLauncher launcher)
      Specified by:
      unlockClassPath in interface org.quiltmc.loader.impl.game.GameProvider
    • launch

      public void launch(ClassLoader classLoader)
      Specified by:
      launch in interface org.quiltmc.loader.impl.game.GameProvider