NeoForgePlatformHelper

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open val cacheDir: Path
Link copied to clipboard
open override val configPath: Path
Link copied to clipboard
open override val gameDir: Path
Link copied to clipboard
open override val isDedicatedServer: Boolean
Link copied to clipboard
open override val minecraftVersion: String
Link copied to clipboard
open override val modVersion: String
Link copied to clipboard
open override val platformId: String

Literal brand: FML publishes none this early. Version off the loader's own mod container rather than FMLLoader.versionInfo() — the same singleton modVersion uses, so no second reflective shape.

Functions

Link copied to clipboard
private fun fmlDist(): Any

Physical side net.neoforged.api.distmarker.Dist, wherever FMLLoader keeps it — see fmlLoader.

Link copied to clipboard
private fun fmlLoader(name: String): Any?

FMLLoader's no-arg name, called on what owns it — the class through 21.1, the FMLLoader.getCurrent() instance from 26.1, where FMLEnvironment's static getDist() is that very call — or null where FMLLoader has no such method. Told apart by the method's own modifier rather than by trying a shape and catching: that could not tell a shape that does not apply from a real failure in one that does, and answered the second with the next guess.

Link copied to clipboard
open override fun isModLoaded(modId: String): Boolean
Link copied to clipboard
open fun isServerRunning(handle: Any?): Boolean
Link copied to clipboard
open override fun modCodePaths(): List<ModCode>
Link copied to clipboard
open fun pluginCodePaths(): List<Path>?
Link copied to clipboard
open fun runCommands(handle: Any, command: String): String
Link copied to clipboard
private fun secureJarRoot(modFile: Any): Path?

getSecureJar().getRootPath(), reflectively — FML 11 (26.1+) dropped getSecureJar().