Class Loader

java.lang.Object
dev.xdpxi.xdlib.api.Loader

public class Loader extends Object
A utility class to detect the mod loader being used in the environment. It checks if the mod is being loaded by Fabric, NeoForge, or an unknown loader.
  • Constructor Details

    • Loader

      public Loader()
  • Method Details

    • getModLoader

      public static String getModLoader()
      Detects the mod loader being used.

      It first checks for the presence of the Fabric mod loader class, then for the NeoForge mod loader class. If neither are found, it returns "Unknown".

      Returns:
      a String representing the mod loader ("Fabric", "NeoForge", or "Unknown")