NeoForgePlatformHelper

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val cacheDir: Path
Link copied to clipboard
open override val configPath: 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: static FMLLoader.getDist() (<=21.1) -> static FMLEnvironment.getDist() (26.1+) -> instance FMLLoader.getCurrent().getDist() (26.1+).

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().

Link copied to clipboard
private fun tryCurrentInstanceDist(): Any?

FMLLoader.getCurrent().getDist() — the 26.1+ instance shape.

Link copied to clipboard
private fun tryStaticDist(className: String): Any?

Static className.getDist(), or null if the class/method is absent or non-static (invoke(null) on an instance method throws — that just means "this shape doesn't apply, try the next").