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) ILaunchContextprivate static final org.slf4j.Loggerprivate 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 TypeMethodDescriptionvoidarguments(BiFunction<String, String, joptsimple.OptionSpecBuilder> argumentBuilder) Define command line arguments for your mod service.voidbeginScanning(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) voidinitialize(IEnvironment environment) Initialize your service.name()The name of this mod service.voidonLoad(IEnvironment environment, Set<String> otherServices) Load your service.List<? extends ITransformer<?>> TheITransformeris 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:ITransformationServiceThe 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:
namein interfaceITransformationService- Returns:
- the name of the mod service
-
initialize
Description copied from interface:ITransformationServiceInitialize your service.- Specified by:
initializein interfaceITransformationService- Parameters:
environment- environment - query state from here to determine viability
-
beginScanning
Description copied from interface:ITransformationServiceScan 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:
beginScanningin interfaceITransformationService- Parameters:
environment- environment
-
completeScan
- Specified by:
completeScanin interfaceITransformationService
-
onLoad
public void onLoad(IEnvironment environment, Set<String> otherServices) throws IncompatibleEnvironmentException Description copied from interface:ITransformationServiceLoad 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:
onLoadin 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:ITransformationServiceDefine command line arguments for your mod service. These will be prefixed by yourITransformationService.name()to prevent collisions.- Specified by:
argumentsin interfaceITransformationService- Parameters:
argumentBuilder- a function mapping name, description to a set of JOptSimple properties for that argument
-
argumentValues
- Specified by:
argumentValuesin interfaceITransformationService
-
transformers
Description copied from interface:ITransformationServiceTheITransformeris the fundamental operator of the system.- Specified by:
transformersin 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.
-