Class ForgePlatformHelper

java.lang.Object
net.darkhax.bookshelf.forge.impl.util.ForgePlatformHelper
All Implemented Interfaces:
IPlatformHelper

public class ForgePlatformHelper extends Object implements IPlatformHelper
  • Constructor Details

    • ForgePlatformHelper

      public ForgePlatformHelper()
  • Method Details

    • getGamePath

      public Path getGamePath()
      Description copied from interface: IPlatformHelper
      Gets the working directory path of the game directory.
      Specified by:
      getGamePath in interface IPlatformHelper
      Returns:
      The working directory path of the game directory.
    • getConfigPath

      public Path getConfigPath()
      Description copied from interface: IPlatformHelper
      Gets the specified configuration path for the game.
      Specified by:
      getConfigPath in interface IPlatformHelper
      Returns:
      The specified configuration path for the game.
    • getModsPath

      public Path getModsPath()
      Description copied from interface: IPlatformHelper
      Gets the primary path that the current loader will load mods from.
      Specified by:
      getModsPath in interface IPlatformHelper
      Returns:
      The currently specified mods path.
    • isModLoaded

      public boolean isModLoaded(String modId)
      Description copied from interface: IPlatformHelper
      Checks if a given mod is loaded.
      Specified by:
      isModLoaded in interface IPlatformHelper
      Parameters:
      modId - The mod id to search for.
      Returns:
      True when the specified mod id has been loaded.
    • isDevelopmentEnvironment

      public boolean isDevelopmentEnvironment()
      Description copied from interface: IPlatformHelper
      Checks if the mod is running in a development environment.
      Specified by:
      isDevelopmentEnvironment in interface IPlatformHelper
      Returns:
      True when the mod is running in a developer environment.
    • getPhysicalSide

      public PhysicalSide getPhysicalSide()
      Description copied from interface: IPlatformHelper
      Gets the physical environment that the code is running on.
      Specified by:
      getPhysicalSide in interface IPlatformHelper
      Returns:
      The physical environment that the code is running on.
    • getLoadedMods

      public Set<ModEntry> getLoadedMods()
      Description copied from interface: IPlatformHelper
      Gets a set of every loaded modId.
      Specified by:
      getLoadedMods in interface IPlatformHelper
      Returns:
    • isTestingEnvironment

      public boolean isTestingEnvironment()
      Description copied from interface: IPlatformHelper
      Checks if the mod is currently running in an environment with game tests enabled.
      Specified by:
      isTestingEnvironment in interface IPlatformHelper
      Returns:
      Are game tests currently enabled?
    • getName

      public String getName()
      Description copied from interface: IPlatformHelper
      Gets the name of the platform.
      Specified by:
      getName in interface IPlatformHelper
      Returns:
      The name of the platform.
    • unsafeRegisterMenu

      public <T extends net.minecraft.world.inventory.AbstractContainerMenu> void unsafeRegisterMenu(net.minecraft.resources.ResourceLocation id, MenuRegister.ClientMenuFactory<T> clientFactory)
      Specified by:
      unsafeRegisterMenu in interface IPlatformHelper