Interface ModLoadEvaluator

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ModLoadEvaluator
Platform-agnostic service abstraction for querying whether a specific mod is loaded in the active runtime environment.

Used primarily by ConfigReference.resolve() to evaluate conditional "try_config" and "else_config" configuration targets across Fabric, Forge, and NeoForge.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Global service provider holding the platform-specific ModLoadEvaluator implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether a mod with the specified identifier is currently loaded.
  • Method Details

    • isLoaded

      boolean isLoaded(String modId)
      Checks whether a mod with the specified identifier is currently loaded.
      Parameters:
      modId - The namespace/identifier of the mod to query.
      Returns:
      true if the mod is loaded in the current environment, false otherwise.