findField

private open fun findField(ref: Class<out Any>, field: String, wantStatic: Boolean): Field

The field ref resolves field to. The transform emits the reference-site owner, but a private field can be declared on a superclass, where privateLookupIn(subclass) cannot reach it. Interfaces are searched last, transitively, for constants.

wantStatic is the CALL SITE's kind — GETFIELD wants an instance field, GETSTATIC a static one — and a mismatch keeps walking. Load-bearing on an obf runtime, where proguard reuses one name across a hierarchy: BlockPos.CODEC and the Vec3i.x it inherits are both a.