Commit Graph
57 Commits
Author SHA1 Message Date
Algent 1c9cd65a74 test: characterize composite class generation 2026-09-03 19:07:10 +02:00
Algent 4d59900be6 test: characterize reflective class definition 2026-09-03 18:41:03 +02:00
Algent 4928cdfe5e test: characterize class-byte loading and caches 2026-09-03 16:42:36 +02:00
Algent 36e1a58bd9 fix: preserve generated client render dispatch 2026-09-03 16:26:51 +02:00
Algent d2276c45f3 test: characterize Scala trait registration 2026-09-03 14:39:21 +02:00
Algent b288d3d7c4 test: characterize side-only annotation filtering 2026-09-03 14:13:37 +02:00
Algent c0df2e0229 test: characterize ASM super lookup 2026-09-03 11:01:05 +02:00
Algent 5d611e0d47 test: characterize ASM bridge helpers 2026-09-03 10:36:10 +02:00
Algent abdf0b0559 test: characterize ClassInfo metadata lookup 2026-09-03 09:45:33 +02:00
Algent a65207cc62 test: strengthen ASM characterization gates 2026-09-03 09:04:31 +02:00
Algent e6af4251ae test: characterize multipart generator 2026-09-02 15:20:29 +02:00
Algent 8d3010941c test: characterize microblock generator 2026-09-02 11:05:50 +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 87a1c23f54 test: characterize block micro material 2026-09-01 13:41:08 +02:00
Algent e286de3401 test: characterize microblock placement 2026-09-01 09:53:09 +02:00
Algent 36a0e9c865 test: characterize microblock proxy 2026-09-01 00:22:01 +02:00
Algent e6278a8d14 test: characterize multipart proxy 2026-08-31 23:54:41 +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 3cdc62455c test: characterize multipart save/load 2026-08-31 14:33:56 +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 e9f244fefa test: characterize multipart event handler
Pin event annotations, bus identity, and server dispatch before the Java port.
2026-08-30 21:15:20 +02:00
Algent 6dbdb74559 test: characterize multipart mod lifecycle
Pin the Scala singleton identity and FML event surface before the Java port.
2026-08-30 16:14:00 +02:00
Algent 53e5901360 test: characterize multipart compatibility
Pin the Scala Function4 callback surface and MCPC fallback behavior before the Java port.
2026-08-30 15:29:59 +02:00
Algent 970e888b7f refactor: port client tile traits to java
Preserve the exact generated client interfaces, render-cache behavior, and ordered display ticks.

Teach Java mixin generation to linearize a registered parent and exclude transient runtime caches from copying.
2026-08-30 15:25:15 +02:00
Algent 6417e9b731 test: characterize client tile traits
Pin render-cache state, random display dispatch, and the generated TileMultipartClient inheritance before the Java port.
2026-08-30 14:06:13 +02:00
Algent 48cbb7ff3e test: characterize inventory tile trait
Pin flattened slot routing, sided access, AE2-style rebuild calls, and the generated TIInventoryTile/JInventoryTile interfaces before the Java port.
2026-08-30 13:50:31 +02:00
Algent cad4b1cef0 test: characterize fluid handler trait
Freeze ordered tank state and fluid distribution behavior.

Pin capability short-circuiting and the exact generated interface. All checks run against the untouched Scala trait.
2026-08-30 13:26:13 +02:00
Algent bef35139fb refactor: port tile change trait to java
The fourth generated tile written directly in Java, and the first with
both mutable state and inherited member access. The eight characterization
tests pass unchanged, and the runtime interface keeps the exact thirteen
methods. INeighborTileChange, the surface shipping jars link against, is
byte-identical between the reference and ported dev jars, and no consumer
references the removed $class or closure classes.

Two transformer constraints turned up, both now in the handoff gotchas.

registerJavaTrait rejects a trait with a non-empty InnerClasses attribute
outright, so the anonymous AbstractFunction1 for the operate callback
could not stay in the trait; it is a named class in the access shim.

The shim's parameters are Object rather than the trait type. Typing them
as the trait let javac elide the cast to TileMultipart, since the
untransformed trait extends it, and the verifier then rejected the
getfield once Forge rewrote the trait to an interface.
TRedstoneTileAccess only escapes this because IRedstoneTile is unrelated
to TileMultipart and forces a real checkcast.
2026-08-28 18:44:47 +03:00
Algent 003e8f94ca test: characterize tile change trait
Seven behavioral tests and a generated-interface freeze, both against the
untouched Scala trait. Nothing in the frozen consumer baseline references
TTileChangeTile or a $class helper for it, so there is no binary fixture
to take: the load-bearing surface is INeighborTileChange, which is already
Java and unchanged.

The behavior pinned is the flag lifecycle and the coordinate filter.
bindPart only ever ors the flag in, copyFrom takes it from another change
tile but leaves it alone for a plain source, clearParts resets it, and
partRemoved recomputes from the remaining list rather than from the part
handed to it. onNeighborTileChange dispatches only for an axial offset of
one or two blocks, and marks the two-block case weak.

The runtime interface is the exact thirteen methods: six overrides, the
field getter and setter, and five super accessors.
2026-08-28 18:35:22 +03:00
Algent 85c2c4d15c test: characterize multipart read paths 2026-08-28 16:54:50 +03:00
Algent eff7509585 test: characterize redstone tile trait 2026-08-28 15:58:57 +03:00
Algent 7894c98352 test: characterize slotted tile trait 2026-08-28 11:36:38 +03:00
Algent 2b04a2e52b test: characterize partial occlusion tile trait 2026-08-28 11:19:44 +03:00
Algent df21e4041c test: characterize microblock recipes 2026-08-28 10:59:04 +03:00
Algent 28c90189a6 test: characterize redstone interaction unit 2026-08-27 23:15:56 +03:00
Algent 54d6df002e test: add focused performance baseline 2026-08-27 20:51:57 +03:00
Algent 2aa9928ad0 test: freeze generated trait and pass-through behavior 2026-08-27 20:25:38 +03:00
Algent 57b314dd4e test: freeze multipart NBT and description packets 2026-08-27 18:11:28 +03:00
Algent 6410cc0028 test: characterize multipart ordering and move lifecycle 2026-08-27 18:02:41 +03:00
Algent d224ce116d refactor: remove the package objects instead of porting them
A Scala package object compiles to a class literally named 'package', and that
is a Java keyword, so no Java source can declare or even name it. The
characterization had to reach both through Class.forName, which is the argument
in one line. There is no Java form to port to.

Each held exactly one member, a logger alias for its proxy, so the indirection
is inlined at its eight call sites: ConfigContent (7) and MultipartGenerator
(1). The functional characterization asserted beforehand that each alias
returned the very instance its proxy holds, so the substitution is an identity;
both classes are descriptor-identical afterwards.

Exactly four classes leave the jar and nothing else changes. No consumer
referenced them, and no Java consumer could have.

120 plain-JVM tests and 22 Forge server tests pass. PackageObjectCharacterization
went with its subject; ProxyLoggerFunctionalTest keeps the assertion worth
having, that both proxies publish a logger during preInit.
2026-08-15 20:04:55 +02:00
Algent d6bba7ff46 test: characterize the package objects
Each holds one member, a logger alias for its proxy's logger. Everything goes
through reflection because 'package' is a Java keyword and cannot appear as a
type name in Java source, which is also why these two classes have no Java
form at all.

The plain-JVM half pins the shape and that the alias reads the proxy's var
rather than holding anything, so it reports null before preInit. The Forge
server half pins the part that matters for what comes next: after preInit each
alias returns the very instance its proxy holds, adding nothing.

123 plain-JVM tests, 23 Forge server tests.
2026-08-15 20:02:42 +02:00
Algent 8f73a693cc test: characterize ControlKeyModifer
Plain-JVM coverage is structural: the Java-facing isControlDown(EntityPlayer)
static that the reference scaladoc calls out as existing for Java callers, and
the typo in the class name, which is the published name.

Forge server coverage for the behavior. isControlDown branches on whether the
player's world is remote, so it needs a real player; a Forge FakePlayer on a
dedicated server world takes the server branch and reads the map the client
keeps in sync through packet 1. Unknown players default to not holding, the map
reflects the last recorded value, and clearing resets it.

The client branch reads isClientPressing instead and no harness has a client.

120 plain-JVM tests, 21 Forge server tests.
2026-08-15 19:42:38 +02:00
Algent 40bb1b71b7 refactor: port PacketScheduler to Java
IScheduledPacketPart is descriptor-identical and schedulePacket is unchanged.
TScheduledPacketPart.read stays abstract: TMultiPart declares read, so a
default would be shadowed and a part would silently read a description instead
of a mask. The dispatch that lived in the $class helper is now the interface
static readMask, with the one-line forwarder documented on read.

writeScheduled and readScheduled became defaults. TMultiPart declares neither,
and empty bodies are what mixing the Scala trait in already gave a Scala
implementor -- only Java implementors ever had to write them out.

sendScheduled is public because the reference's private[multipart] reaches the
handler package and Java has no equivalent scope. An unsupported mask width now
throws IllegalArgumentException rather than scala.MatchError; both are
RuntimeException and the map is still left uncleared on that path, as before.

Dropped PacketScheduler$, TScheduledPacketPart$class and two closure classes,
none referenced in bytecode or by reflective name.

118 plain-JVM tests and 18 Forge server tests pass.
2026-08-15 17:04:41 +02:00