Klasse Common

java.lang.Object
de.luckymcdev.foundryengine.common.Common

public final class Common extends Object
Shared constants and singleton managers for FoundryEngine.
  • Felddetails

    • MODID

      public static final String MODID
      Siehe auch:
    • MODNAME

      public static final String MODNAME
      Siehe auch:
    • LOGGER

      public static final org.slf4j.Logger LOGGER
    • GAMEDIR

      public static final Path GAMEDIR
    • CONFIG

      public static final Path CONFIG
    • TEMP_DIR

      public static final Path TEMP_DIR
    • BLOCK_DISPLAY_TAG

      public static final String BLOCK_DISPLAY_TAG
      Siehe auch:
    • DIRECTORY

      public static final Path DIRECTORY
    • BUNDLES

      public static final Path BUNDLES
    • CACHE

      public static final Path CACHE
    • DUMPS

      public static final Path DUMPS
    • GAME

      public static final Path GAME
    • ENGINE_DATA

      public static final Path ENGINE_DATA
    • CONFIG_FE

      public static final Path CONFIG_FE
  • Methodendetails

    • id

      public static net.minecraft.resources.Identifier id(String path)
      Returns a Identifier namespaced to MODID.
    • mId

      public static net.minecraft.resources.Identifier mId(String path)
      Returns an Identifier in the default Minecraft namespace.
    • id

      public static net.minecraft.resources.Identifier id(String namespace, String path)
      Returns an Identifier with the given namespace and path.
    • getScriptShell

      public static ScriptShell getScriptShell()
      Returns the singleton BundleManager.
    • getBundleManager

      public static BundleManager getBundleManager()
    • getGameStageHandler

      public static GameStageHandler getGameStageHandler()
      Returns the singleton GameStageHandler.
    • getStageTableManager

      public static StageTableManager getStageTableManager()
      Returns the singleton StageTableManager.
    • getNetworkManager

      public static NetworkManager getNetworkManager()
      Returns the singleton NetworkManager.
    • getAreaManager

      public static AreaManager getAreaManager()
      Returns the singleton AreaManager.
    • getCutsceneManager

      public static CutsceneManager getCutsceneManager()
      Returns the singleton CutsceneManager.
    • getCutsceneSessionManager

      public static CutsceneSessionManager getCutsceneSessionManager()
      Returns the singleton CutsceneSessionManager.
    • getSavedDataManager

      public static SavedDataManager getSavedDataManager()
      Returns the singleton SavedDataManager.
    • getWaypointManager

      public static WaypointManager getWaypointManager()
      Returns the singleton WaypointManager.
    • getGameManager

      public static GameManager getGameManager()
      Returns the singleton GameManager.
    • getDialogueManager

      public static DialogueManager getDialogueManager()
      Returns the singleton DialogueManager.
    • getRegistryCollector

      public static @Nullable RegistryCollector getRegistryCollector()
    • setRegistryCollector

      public static void setRegistryCollector(@Nullable RegistryCollector collector)
    • getCompatibilityMode

      public static CompatibilityMode getCompatibilityMode()
    • getFileContent

      public static String getFileContent(@Nullable Path file)
      Reads the full content of a file as a UTF-8 string. Returns empty on failure.
    • post

      public static <T extends net.neoforged.bus.api.Event> T post(T event)
      Posts an event to the NeoForge event bus.
    • post

      public static <T extends net.neoforged.bus.api.Event> T post(net.neoforged.bus.api.EventPriority priority, T event)
      Posts an event at the given priority to the NeoForge event bus.
    • registerEventClear

      public static void registerEventClear(Runnable clearer)
      Registers a cleanup callback invoked on clearEvents().
    • clearEvents

      public static void clearEvents()
      Runs all registered event cleanup callbacks.
    • resolveAndValidate

      public static Path resolveAndValidate(Path path) throws IOException
      Resolves a user‑supplied path to its canonical form and ensures it lies inside the Minecraft game directory. Symlinks are followed, and non‑existing paths are safely resolved by canonicalizing their deepest existing ancestor.
      Parameter:
      path - the path to validate and resolve
      Gibt zurück:
      the resolved, absolute, canonical path (if it exists), or a safe reconstruction
      Löst aus:
      IOException - if an I/O error occurs during canonicalization
      SecurityException - if the resolved path is outside GAMEDIR