Package dev.yumi.mc.core.api
Interface YumiMods
public interface YumiMods
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final dev.yumi.commons.event.EventManager<net.minecraft.resources.Identifier> Represents the Yumi event manager. -
Method Summary
Modifier and TypeMethodDescriptionstatic YumiModsget()Returns the current directory for game configuration files.<T> List<EntrypointContainer<T>> getEntrypoints(String key, Class<T> type) Gets all entrypoints for a givenkeyandtype.Returns the current game working directory.Gets the container for a given mod.@UnmodifiableView Collection<ModContainer> getMods()Gets all mod containers.default <T> voidinvokeEntrypoints(String key, Class<T> type, BiConsumer<T, ModContainer> action) Invokes the entrypoints of a givenkeyandtypeto do the givenaction.booleanReturnstrueif the current environment is a development environment, orfalseotherwise.
-
Field Details
-
EVENTS
static final dev.yumi.commons.event.EventManager<net.minecraft.resources.Identifier> EVENTSRepresents the Yumi event manager.- See Also:
-
-
Method Details
-
get
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment()Returnstrueif the current environment is a development environment, orfalseotherwise.- Returns:
trueif the current environment is a development environment, orfalseotherwise
-
getGameDirectory
Path getGameDirectory()Returns the current game working directory.- Returns:
- the current game working directory
-
getConfigDirectory
Path getConfigDirectory()Returns the current directory for game configuration files.- Returns:
- the current directory for game configuration files
-
getMod
Gets the container for a given mod.- Parameters:
id- the identifier of the mod- Returns:
- the mod container, if present
-
getMods
@UnmodifiableView Collection<ModContainer> getMods()Gets all mod containers.- Returns:
- a collection of all loaded mod containers
-
getEntrypoints
Gets all entrypoints for a givenkeyandtype.- Type Parameters:
T- the type of the entrypoint- Parameters:
key- the key of the entrypointtype- the corresponding type of the entrypoint- Returns:
- a list of the found entrypoints
- See Also:
-
invokeEntrypoints
Invokes the entrypoints of a givenkeyandtypeto do the givenaction.- Type Parameters:
T- the type of the entrypoint- Parameters:
key- the key of the entrypointtype- the corresponding type of the entrypointaction- the action to do to invoke the found entrypoints- See Also:
-