TSlottedPart, IRandomDisplayTick, INeighborTileChange, TRandomUpdateTick,
ISidedHollowConnect and IMicroMaterialRender carry no implementation, so their
characterization is their shape: every member abstract and public, no
superinterface, and the exact member names.
Two of them extend TMultiPart in Scala source but emit a bare interface, and
IMicroMaterialRender is satisfied entirely by TMultiPart's Scala-style
world/x/y/z accessors, so the names are load-bearing.
TRandomUpdateTick's onWorldJoin auto-registration lives in its $class helper.
A part that does not declare onWorldJoin resolves it to TMultiPart's no-op;
that is pinned so the port cannot quietly turn it into an interface default,
which the superclass would shadow.
Replaces MicroMaterialRegistry.scala with a Java registry, its companion
singleton and the two nested interfaces. Both nested interfaces are
descriptor-identical to the reference and MODULE$ keeps every instance
method ProjRed links against. Ten jars reference this type and three more
reach it reflectively, so the surface was checked member by member rather
than by descriptor count.
getIdMap keeps its scala.Tuple2 array because extrautilities links against
it, so the registry still stores tuples internally. readIDMap moves from
scala.collection.Seq to java.util.List, which no jar references; the one
in-repo caller moved from mkString to String.join. That clears one of the
five Scala-typed descriptors the inventory identified.
Three removals, all verified unreferenced: the mangled public accessors
Scala emitted so its closure classes could reach private state,
IMicroMaterial$class, and the MissingMicroMaterial forwarders for the two
members it does not override. The last of those was caught by the
characterization failing to compile, not by inspection.
IMicroMaterial's loadIcons, canRenderInPass and isSolid become real Java
defaults, so implementors can inherit rather than restate them. Eleven
anonfun classes are gone.
Validated with 73 plain-JVM tests passing against both the Scala baseline
and the port, a clean build, and the Java 8 Forge dedicated-server suite,
which exercises setupIDMap and calcMaxCuttingStrength during real startup.
Freezes the registry lifecycle before the port: setupIDMap sorts the type
map by name into the id array, ids are the index into it, materialID and
materialName round trip, remapName resolves on both getMaterial(String)
and materialID, getMissingId points at the registered placeholder rather
than falling back to zero, ids round trip through the shared IDWriter, and
a highlight renderer that claims the highlight short-circuits the default
client renderer.
Also freezes the two members IMicroMaterial supplies. A Java class cannot
inherit them today, so they are observed through MissingMicroMaterial,
which overrides only isTransparent and loadIcons.
Two limits are deliberate and recorded in the test. The registry is global
mutable state, so both test classes guard their registrations and assert
only relative facts. The error paths are not covered at all: they call the
microblock logger, which is null until MicroblockProxy.preInit runs.
Adds a frozen Scala 2.11.5 consumer compiled against the reference dev jar
at 52ff8ff, reading MODULE$ and the raw scala.Tuple2 array.
73 plain-JVM tests, all passing against the untouched Scala.
Freezes the one supplied member before the port: getMaxCuttingStrength
asks the saw about a stack of itself, so the stack handed to
getCuttingStrength wraps the saw and has size 1.
Unlike the constant-returning bridges ported so far, this one dispatches
getCuttingStrength through the interface, so a subclass override is
honoured even when the bridge is called directly. That is asserted
explicitly.
Adds a frozen Scala 2.11.5 consumer compiled against the reference dev jar
at 0de7283. It reports its strength only when handed a stack that actually
wraps itself, so the test proves the bridge built the stack rather than
only that it linked. ProjRed is the only consumer.
First characterization outside codechicken.multipart; these tests live in
codechicken.microblock alongside the type under test.
65 plain-JVM tests, all passing against the untouched Scala.