Commit Graph
33 Commits
Author SHA1 Message Date
Algent afd6c698ad test: characterize post microblock trait 2026-09-03 22:32:20 +02:00
Algent 5e020e51e8 test: characterize edge microblock trait 2026-09-03 22:07:48 +02:00
Algent 82da4522bd test: characterize corner microblock traits 2026-09-03 21:53:10 +02:00
Algent dc845bc91e test: characterize face microblock traits 2026-09-03 21:37:51 +02:00
Algent d6eb56b56f test: characterize common microblock traits 2026-09-03 21:07:06 +02:00
Algent 8d3010941c test: characterize microblock generator 2026-09-02 11:05:50 +02:00
Algent f57f52408b test: characterize micro occlusion 2026-09-02 10:21:12 +02:00
Algent 911e73291f test: characterize hollow microblocks 2026-09-02 01:15:59 +02:00
Algent 0f3a8c2097 test: characterize edge and post microblocks 2026-09-02 00:51:28 +02:00
Algent 44fb151828 test: characterize corner microblocks 2026-09-02 00:28:11 +02:00
Algent 2f638b1e79 test: characterize face microblocks 2026-09-01 20:04:52 +02:00
Algent 30925fbddd test: characterize microblock base 2026-09-01 19:45:44 +02:00
Algent ee75f86e02 test: characterize microblock classes 2026-09-01 19:28:19 +02:00
Algent 7a031e6cb4 test: characterize microblock renderer 2026-09-01 19:09:21 +02:00
Algent c6ce881aa7 test: characterize saw item and renderer 2026-09-01 18:54:55 +02:00
Algent a932f47dc1 test: characterize Angelica compat 2026-09-01 18:41:29 +02:00
Algent 53751101d2 test: characterize config content 2026-09-01 14:00:50 +02:00
Algent 87a1c23f54 test: characterize block micro material 2026-09-01 13:41:08 +02:00
Algent 2549bfdffb test: characterize placement grids 2026-09-01 10:16:01 +02:00
Algent e286de3401 test: characterize microblock placement 2026-09-01 09:53:09 +02:00
Algent 9ac0a5e409 test: characterize ItemMicroPart 2026-09-01 08:28:14 +02:00
Algent 36a0e9c865 test: characterize microblock proxy 2026-09-01 00:22:01 +02:00
Algent a1ab154f4c test: characterize grass micro materials 2026-08-31 20:01:13 +02:00
Algent f9724b9d93 test: characterize default content
Pin the singleton ABI and exact built-in factory, material, and remap registrations.
2026-08-31 19:36:36 +02:00
Algent e1ca4fba53 test: characterize missing micro material
Pin the singleton ABI, inert defaults, registration, and client stripping.
2026-08-31 19:04:10 +02:00
Algent 7152b5e394 test: characterize microblock packet handlers
Pin the packet-handler ABI, client registry handling, and server handshake payload before the Java port.
2026-08-31 13:38:00 +02:00
Algent cd84c140ae test: characterize microblock event handler
Pin the client-only ABI and dedicated-server side stripping before the Java port.
2026-08-30 21:55:54 +02:00
Algent dbe617ed46 test: characterize microblock mod lifecycle
Pin the Scala mod instance, handler surface, and mutable compatibility hook before the Java port.
2026-08-30 21:37:09 +02:00
Algent df21e4041c test: characterize microblock recipes 2026-08-28 10:59:04 +03:00
Algent 3e68e67599 test: characterize the marker interfaces
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.
2026-08-15 15:28:17 +02:00
Algent edd6136354 refactor: port MicroMaterialRegistry to Java
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.
2026-08-14 22:08:30 +02:00
Algent dc758d4310 test: characterize MicroMaterialRegistry
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.
2026-08-14 22:03:04 +02:00
Algent 844efac5a2 test: characterize Saw
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.
2026-08-14 21:42:03 +02:00