Klasse Common
java.lang.Object
de.luckymcdev.foundryengine.common.Common
Shared constants and singleton managers for FoundryEngine.
-
Feldübersicht
FelderModifikator und TypFeldBeschreibungstatic final Stringstatic final Pathstatic final Pathstatic final Pathstatic final Pathstatic final Pathstatic final Pathstatic final Pathstatic final Pathstatic final Pathstatic final org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Path -
Methodenübersicht
Modifikator und TypMethodeBeschreibungstatic voidRuns all registered event cleanup callbacks.static AreaManagerReturns the singletonAreaManager.static BundleManagerstatic CompatibilityModestatic CutsceneManagerReturns the singletonCutsceneManager.static CutsceneSessionManagerReturns the singletonCutsceneSessionManager.static DialogueManagerReturns the singletonDialogueManager.static StringgetFileContent(@Nullable Path file) Reads the full content of a file as a UTF-8 string.static GameManagerReturns the singletonGameManager.static GameStageHandlerReturns the singletonGameStageHandler.static NetworkManagerReturns the singletonNetworkManager.static @Nullable RegistryCollectorstatic SavedDataManagerReturns the singletonSavedDataManager.static ScriptShellReturns the singletonBundleManager.static StageTableManagerReturns the singletonStageTableManager.static WaypointManagerReturns the singletonWaypointManager.static net.minecraft.resources.IdentifierReturns aIdentifiernamespaced toMODID.static net.minecraft.resources.IdentifierReturns anIdentifierwith the given namespace and path.static net.minecraft.resources.IdentifierReturns anIdentifierin the default Minecraft namespace.static <T extends net.neoforged.bus.api.Event>
Tpost(net.neoforged.bus.api.EventPriority priority, T event) Posts an event at the given priority to the NeoForge event bus.static <T extends net.neoforged.bus.api.Event>
Tpost(T event) Posts an event to the NeoForge event bus.static voidregisterEventClear(Runnable clearer) Registers a cleanup callback invoked onclearEvents().static PathresolveAndValidate(Path path) Resolves a user‑supplied path to its canonical form and ensures it lies inside the Minecraft game directory.static voidsetRegistryCollector(@Nullable RegistryCollector collector)
-
Felddetails
-
MODID
- Siehe auch:
-
MODNAME
- Siehe auch:
-
LOGGER
public static final org.slf4j.Logger LOGGER -
GAMEDIR
-
CONFIG
-
TEMP_DIR
-
BLOCK_DISPLAY_TAG
- Siehe auch:
-
DIRECTORY
-
BUNDLES
-
CACHE
-
DUMPS
-
GAME
-
ENGINE_DATA
-
CONFIG_FE
-
-
Methodendetails
-
id
-
mId
Returns anIdentifierin the default Minecraft namespace. -
id
-
getScriptShell
Returns the singletonBundleManager. -
getBundleManager
-
getGameStageHandler
Returns the singletonGameStageHandler. -
getStageTableManager
Returns the singletonStageTableManager. -
getNetworkManager
Returns the singletonNetworkManager. -
getAreaManager
Returns the singletonAreaManager. -
getCutsceneManager
Returns the singletonCutsceneManager. -
getCutsceneSessionManager
Returns the singletonCutsceneSessionManager. -
getSavedDataManager
Returns the singletonSavedDataManager. -
getWaypointManager
Returns the singletonWaypointManager. -
getGameManager
Returns the singletonGameManager. -
getDialogueManager
Returns the singletonDialogueManager. -
getRegistryCollector
-
setRegistryCollector
-
getCompatibilityMode
-
getFileContent
-
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
Registers a cleanup callback invoked onclearEvents(). -
clearEvents
public static void clearEvents()Runs all registered event cleanup callbacks. -
resolveAndValidate
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 canonicalizationSecurityException- if the resolved path is outsideGAMEDIR
-