Package cpw.mods.modlauncher
Class Environment
java.lang.Object
cpw.mods.modlauncher.Environment
- All Implemented Interfaces:
IEnvironment
Environment implementation class
-
Nested Class Summary
Nested classes/interfaces inherited from interface cpw.mods.modlauncher.api.IEnvironment
IEnvironment.Keys -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TcomputePropertyIfAbsent(TypesafeMap.Key<T> key, Function<? super TypesafeMap.Key<T>, ? extends T> valueFunction) Compute a new value for insertion into the environment, if not already present.findLaunchHandler(String name) Find the namedILaunchHandlerServicefindLaunchPlugin(String name) Find the namedILaunchPluginServicefinal <T> Optional<T> getProperty(TypesafeMap.Key<T> key) Get a property from the Environment
-
Field Details
-
environment
-
launcher
-
-
Constructor Details
-
Environment
Environment(Launcher launcher)
-
-
Method Details
-
getProperty
Description copied from interface:IEnvironmentGet a property from the Environment- Specified by:
getPropertyin interfaceIEnvironment- Type Parameters:
T- Type of key- Parameters:
key- to find- Returns:
- the value
-
findLaunchPlugin
Description copied from interface:IEnvironmentFind the namedILaunchPluginService- Specified by:
findLaunchPluginin interfaceIEnvironment- Parameters:
name- name to lookup- Returns:
- the launch plugin
-
findLaunchHandler
Description copied from interface:IEnvironmentFind the namedILaunchHandlerService- Specified by:
findLaunchHandlerin interfaceIEnvironment- Parameters:
name- name to lookup- Returns:
- the launch handler
-
findModuleLayerManager
- Specified by:
findModuleLayerManagerin interfaceIEnvironment
-
computePropertyIfAbsent
public <T> T computePropertyIfAbsent(TypesafeMap.Key<T> key, Function<? super TypesafeMap.Key<T>, ? extends T> valueFunction) Description copied from interface:IEnvironmentCompute a new value for insertion into the environment, if not already present.- Specified by:
computePropertyIfAbsentin interfaceIEnvironment- Type Parameters:
T- Type of key- Parameters:
key- to insertvalueFunction- the supplier of a value- Returns:
- The value of the key
-