Interface YumiMods


public interface YumiMods
  • Field Details

    • EVENTS

      static final dev.yumi.commons.event.EventManager<net.minecraft.resources.Identifier> EVENTS
      Represents the Yumi event manager.
      See Also:
      • invalid reference
        dev.yumi.commons.event
  • Method Details

    • get

      static YumiMods get()
    • isDevelopmentEnvironment

      boolean isDevelopmentEnvironment()
      Returns true if the current environment is a development environment, or false otherwise.
      Returns:
      true if the current environment is a development environment, or false otherwise
    • 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

      <T> List<EntrypointContainer<T>> getEntrypoints(String key, Class<T> type)
      Gets all entrypoints for a given key and type.
      Type Parameters:
      T - the type of the entrypoint
      Parameters:
      key - the key of the entrypoint
      type - the corresponding type of the entrypoint
      Returns:
      a list of the found entrypoints
      See Also:
    • invokeEntrypoints

      default <T> void invokeEntrypoints(String key, Class<T> type, BiConsumer<T,ModContainer> action)
      Invokes the entrypoints of a given key and type to do the given action.
      Type Parameters:
      T - the type of the entrypoint
      Parameters:
      key - the key of the entrypoint
      type - the corresponding type of the entrypoint
      action - the action to do to invoke the found entrypoints
      See Also: