Klasse EarlyRiser

java.lang.Object
de.florianmichael.asmfabricloader.api.EarlyRiser

public class EarlyRiser extends Object
Utility to manually create entrypoints from mods before fabric loader is doing it. This can be useful if you want to invoke entrypoints in language adapter loading stage.
  • Konstruktordetails

    • EarlyRiser

      public EarlyRiser()
  • Methodendetails

    • invokeEntrypoints

      public static <T> void invokeEntrypoints(String name, Class<T> type, Consumer<T> consumer)
      Invokes a given consumer for all early entrypoints with a specific name and type.
      Parameter:
      name - the entrypoint name
      type - the entrypoint type
      consumer - the consumer to invoke
    • getEarlyEntrypoints

      public static <T> List<T> getEarlyEntrypoints(String name, Class<T> type)
      Get all early entrypoints for a specific name and type.
      Parameter:
      name - the entrypoint name
      type - the entrypoint type
      Gibt zurück:
      the list of entrypoints
    • createEntrypoint

      public static <T> T createEntrypoint(net.fabricmc.loader.api.ModContainer mod, String value, Class<T> type)
      Create an entrypoint from a mod. Failure will result in a null return value and a log message.
      Parameter:
      mod - the mod container
      value - the entrypoint value
      type - the entrypoint type
      Gibt zurück:
      the entrypoint instance