Package net.neoforged.fml.loading
Class FMLServiceProvider
java.lang.Object
net.neoforged.fml.loading.FMLServiceProvider
- All Implemented Interfaces:
ITransformationService
-
Nested Class Summary
Nested classes/interfaces inherited from interface cpw.mods.modlauncher.api.ITransformationService
ITransformationService.OptionResult, ITransformationService.Resource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate joptsimple.ArgumentAcceptingOptionSpec
<String> private joptsimple.ArgumentAcceptingOptionSpec
<String> (package private) ILaunchContext
private static final org.slf4j.Logger
private joptsimple.ArgumentAcceptingOptionSpec
<String> private joptsimple.ArgumentAcceptingOptionSpec
<String> private joptsimple.ArgumentAcceptingOptionSpec
<String> private joptsimple.ArgumentAcceptingOptionSpec
<String> private joptsimple.ArgumentAcceptingOptionSpec
<String> private joptsimple.ArgumentAcceptingOptionSpec
<String> private VersionInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
arguments
(BiFunction<String, String, joptsimple.OptionSpecBuilder> argumentBuilder) Define command line arguments for your mod service.void
beginScanning
(IEnvironment environment) Scan for mods (but don't classload them), identify metadata that might drive game functionality, return list of elements and target module layer (One of PLUGIN or GAME)completeScan
(IModuleLayerManager layerManager) void
initialize
(IEnvironment environment) Initialize your service.name()
The name of this mod service.void
onLoad
(IEnvironment environment, Set<String> otherServices) Load your service.List
<? extends ITransformer<?>> TheITransformer
is the fundamental operator of the system.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
modsOption
-
modListsOption
-
mavenRootsOption
-
mixinConfigsOption
-
fmlOption
-
forgeOption
-
mcOption
-
mcpOption
-
modsArgumentList
-
modListsArgumentList
-
mavenRootsArgumentList
-
mixinConfigsArgumentList
-
versionInfo
-
launchContext
-
-
Constructor Details
-
FMLServiceProvider
public FMLServiceProvider()
-
-
Method Details
-
name
Description copied from interface:ITransformationService
The name of this mod service. It will be used throughout the system. It should be lower case, the first character should be alphanumeric and it should only consist of standard alphanumeric characters- Specified by:
name
in interfaceITransformationService
- Returns:
- the name of the mod service
-
initialize
Description copied from interface:ITransformationService
Initialize your service.- Specified by:
initialize
in interfaceITransformationService
- Parameters:
environment
- environment - query state from here to determine viability
-
beginScanning
Description copied from interface:ITransformationService
Scan for mods (but don't classload them), identify metadata that might drive game functionality, return list of elements and target module layer (One of PLUGIN or GAME)- Specified by:
beginScanning
in interfaceITransformationService
- Parameters:
environment
- environment
-
completeScan
- Specified by:
completeScan
in interfaceITransformationService
-
onLoad
public void onLoad(IEnvironment environment, Set<String> otherServices) throws IncompatibleEnvironmentException Description copied from interface:ITransformationService
Load your service. Called immediately on loading with a list of other services found. Use to identify and immediately indicate incompatibilities with other services, and environment configuration. This is to try and immediately abort a guaranteed bad environment.- Specified by:
onLoad
in interfaceITransformationService
- Parameters:
environment
- environment - query state from hereotherServices
- other services loaded with the system- Throws:
IncompatibleEnvironmentException
- if there is an incompatibility detected. Identify specifics in the exception message
-
arguments
Description copied from interface:ITransformationService
Define command line arguments for your mod service. These will be prefixed by yourITransformationService.name()
to prevent collisions.- Specified by:
arguments
in interfaceITransformationService
- Parameters:
argumentBuilder
- a function mapping name, description to a set of JOptSimple properties for that argument
-
argumentValues
- Specified by:
argumentValues
in interfaceITransformationService
-
transformers
Description copied from interface:ITransformationService
TheITransformer
is the fundamental operator of the system.- Specified by:
transformers
in interfaceITransformationService
- Returns:
- A list of transformers for your ITransformationService. This is called after
ITransformationService.onLoad(IEnvironment, Set)
andITransformationService.initialize(IEnvironment)
, so you can return an appropriate Transformer set for the environment you find yourself in.
-