Package-level declarations

Types

Link copied to clipboard

Bootstrap methods for invokedynamic call sites emitted by the access-widening bytecode transform in ScriptWeave. Each bootstrap resolves a private/protected/package-private member via MethodHandles.privateLookupIn and returns a ConstantCallSite, which the JIT can inline.

Link copied to clipboard

Enumerate the real backing jars for net.minecraft.* at runtime, so the REPL can feed them to the Kotlin compiler as its classpath.

Link copied to clipboard
object CodeOrigin

Who put each compile-classpath jar there, for the access-widen overlay to shard by.

Link copied to clipboard
internal object Downloads

Fetching the per-version mapping artifacts RemapCache provisions from: where they live, how to retry a transient failure, and how to verify what came back. Nothing here knows about the cache layout or the masking-loader hop — it hands back files.

Link copied to clipboard
internal object EvalRender

The value/output join and the mojmap reverse-mapping of throwables. Pure functions over their arguments — no REPL state. Game loader, so the lane can render without reaching across the masking seam.

Link copied to clipboard
object JarLocator

Resolve a CodeSource or module-reference location to the real backing jar File, across loaders.

Link copied to clipboard
class Mappings

Parses the runtime mappings bundle — tiny v2 (namespace ORDER read from the header, see Parser.parseTinyV2) or forge TSRG2 — into the named->runtime lookups mapClass / mapMethod / mapField, so name strings written in mojmap (REPL scripts that pass class/method names to Patches.onEnter / Patches.onExit, plus the mod's own reflective lookups — auth probe, command compat) can be translated to the runtime namespace on a non-mojmap production runtime.

Link copied to clipboard
interface MaskingBridge

Type-safe gateway across the game-loader ↔ masking-loader boundary. Aggregates every operation that can ONLY run on the masking loader — the Kotlin REPL host (repl.impl.ReplHost) and the remap-cache builder (repl.impl.RemapCacheBuilder) — behind one interface, so the game loader never has to reflect a masking-only class per call. Every method below forwards to one of those two backends; see ReplBridge for the boundary rules, which is what keeps every type here java.* or the mod's own, and how the single implementation instance is obtained.

Link copied to clipboard

Classloader for the REPL's Kotlin scripting stack.

Link copied to clipboard
object MixinProbe

What Mixin merges into its targets, read off Mixin's own model — the prepared configs and the MixinInfos under them — rather than by applying anything to a class.

Link copied to clipboard
internal object ModJarCache

The disk side of ModJarCollector: turns a code root with no file behind it into a repacked jar, and decides when that jar is stale.

Link copied to clipboard

Enumerate the backing jars of every LOADED mod — including jar-in-jar / nested modules — so a script can import mod APIs (fabric-api, NeoForge/Forge mods, and any mod's bundled libraries) at compile time.

Link copied to clipboard

Detects, once at startup, which naming namespace the game runtime actually uses — so the REPL knows whether a compiled (mojmap-named) script must be remapped before it can link against the running MC.

Link copied to clipboard
internal object PluginBridge

Class lookup across the classloaders of a hybrid server (Silkard, Youer, ...), reached from MaskingClassLoader's snippet loader once nothing in the host has the name.

Link copied to clipboard

Plugin jars for the compile classpath: whatever the host enumerates (Services.PLATFORM) plus the urls of the loaders behind the plugins. PluginBridge searches those same loaders at runtime, and the two MUST agree — a name the compiler resolves and the snippet loader then misses is a NoClassDefFoundError.

Link copied to clipboard
class RemapBundle(val mappings: Path, val symbols: Path)

The mojmap<->runtime remap bundle in force: a mappings file, and the symbol dir holding MC_SYMBOLS (plus DEPS_LIST where one was harvested). Private constructor — mappings without symbols leaves scripts compiling against the runtime jar, where no mojmap name resolves, so neither factory below can produce that pair.

Link copied to clipboard
object RemapCache

First-launch remap-bundle provisioning for a NON-mojmap production runtime. The mod jar carries no per-version mapping data. On a Fabric intermediary runtime with no mcp.remap.* flags set, this downloads the two per-version artifacts that ARE published (Mojang client mappings + fabric intermediary), assembles named<->intermediary, and reverse-remaps the runtime jar into a mojmap symbol jar — caching everything under the mod's cache dir, one subdirectory per MC version. On later launches it's a cache hit, and a loader change rebuilds only the symbol jar, from the mappings already there.

Link copied to clipboard
object ReplBridge

Game-loader side of the REPL. Builds the MaskingClassLoader, crosses into the masking world with a single reflective bootstrap of ...repl.impl.MaskingBridgeImpl — reached type-safely thereafter through the shared MaskingBridge interface — and caches the result so every compile / execute after the first is a warm call. The same bridge also fronts the remap-cache builder (assembleMappings, buildSymbols), so ALL masking-only calls share this one hop.

Link copied to clipboard
internal object ReplJars

The jars the REPL runs on: the urls of the MaskingClassLoader, and the classpath snippets compile against. Both are worked out on the game loader, ahead of the masking world ReplBridge builds from them.

Link copied to clipboard
internal object ValueRender

The => type = value line, for both the single-tick result and every cross-tick McpScope.yield — one function, so the two cannot drift apart.

Functions

Link copied to clipboard
internal inline fun <T> probing(block: () -> T): T?

block's result, or null if it failed for any reason short of the JVM running out of something.