Class CraftTweakerAPI

java.lang.Object
com.blamejared.crafttweaker.api.CraftTweakerAPI

public final class CraftTweakerAPI extends Object
Provides access to the main CraftTweaker API.
Since:
9.1.0
  • Constructor Details

    • CraftTweakerAPI

      public CraftTweakerAPI()
  • Method Details

    • getAccessibleElementsProvider

      public static IAccessibleElementsProvider getAccessibleElementsProvider()
      Provides access to the IAccessibleElementsProvider, allowing for more internal access.
      Returns:
      The IAccessibleElementsProvider.
      Since:
      9.1.0
    • getRegistry

      public static ICraftTweakerRegistry getRegistry()
      Provides access to the main CraftTweaker set of registries.
      Returns:
      An instance of ICraftTweakerRegistry.
      Since:
      9.1.0
    • getScriptRunManager

      public static IScriptRunManager getScriptRunManager()
      Obtains the IScriptRunManager used to create and execute script runs.
      Returns:
      The script run manager.
      Since:
      9.1.0
    • getLoggerRegistry

      public static ILoggerRegistry getLoggerRegistry()
      Obtains the ILoggerRegistry used to create system-specific Logger instances.
      Returns:
      The logger registry.
      Since:
      11.0.0
    • getScriptsDirectory

      public static Path getScriptsDirectory()
      Obtains a Path to the default scripts directory used by CraftTweaker.
      Returns:
      The default scripts directory.
      Since:
      9.1.0
    • apply

      public static void apply(IAction action)
      Applies the given IAction.
      Parameters:
      action - The action to apply.
      Since:
      9.1.0
      See Also:
    • getLogger

      public static org.apache.logging.log4j.Logger getLogger(String systemName)
      Obtains a new Logger for logging CraftTweaker-specific messages related to the given system.

      The given logger is automatically configured to output messages to crafttweaker.log with the correct format. It can be therefore used directly.

      Parameters:
      systemName - The name of the system.
      Returns:
      A Logger instance tailored to the given system.
      Since:
      11.0.0
      See Also: