Package cpw.mods.modlauncher.api
Interface IEnvironment
- All Known Implementing Classes:
Environment
public interface IEnvironment
System environment. Global properties relevant to the current environment and lookups to find global artifacts
in the environment.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Supplier
<TypesafeMap.Key<T>> <T> T
computePropertyIfAbsent
(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 namedILaunchHandlerService
findLaunchPlugin
(String name) Find the namedILaunchPluginService
<T> Optional
<T> getProperty
(TypesafeMap.Key<T> key) Get a property from the Environment
-
Method Details
-
getProperty
Get a property from the Environment- Type Parameters:
T
- Type of key- Parameters:
key
- to find- Returns:
- the value
-
computePropertyIfAbsent
<T> T computePropertyIfAbsent(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.- Type Parameters:
T
- Type of key- Parameters:
key
- to insertvalueFunction
- the supplier of a value- Returns:
- The value of the key
-
findLaunchPlugin
Find the namedILaunchPluginService
- Parameters:
name
- name to lookup- Returns:
- the launch plugin
-
findLaunchHandler
Find the namedILaunchHandlerService
- Parameters:
name
- name to lookup- Returns:
- the launch handler
-
findModuleLayerManager
Optional<IModuleLayerManager> findModuleLayerManager() -
buildKey
-