Reflect Access
object ReflectAccess
Reflection-backed member access for scripts — the part of "access widening" that works on classes that are already loaded (where bytecode modifier-flipping is illegal). Mod code runs with full Java access and net.minecraft lives in the unnamed module, so setAccessible(true) succeeds; GraalJS can't reach java.lang.reflect itself, so these helpers are the bridge.
Fields/methods are resolved by walking the class hierarchy and cached. Numeric arguments coming from JS (which arrive boxed and loosely typed) are coerced to the target field/parameter type.