74 KiB
Java migration divergence log
This log records intentional differences from the 1.7.12 reference implementation. Behavioral changes must be isolated from behavior-preserving conversions and justified here.
2026-08-14 — IDWriter Java pilot
Observable behavior
No known behavior divergence. Byte, unsigned-short, and integer carrier selection and encoding remain identical, including the reference behavior that negative maximum values select the byte carrier.
Supported JVM API
- Preserved
write(),write_$eq(Function2),read(),read_$eq(Function1),setMax(int), and the public constructor with their reference JVM descriptors. - Marked the four Scala function property methods deprecated.
- Added
write(MCDataOutput, int)andread(MCDataInput)as the Java-native API. Recompiled Scala callers also resolve to these methods.
Compiler artifacts
Accepted divergence: the six public-but-generated IDWriter$$anonfun$setMax$1 through $6 classes are removed and replaced by private Java anonymous helper classes. They represented closure implementation details, were not named by source callers, and are not retained as supported API.
Validation
- Existing
IDWriterCharacterizationTest: 8 tests, 0 failures, 0 errors. - Complete plain-JVM suite: 25 tests, 0 failures, 0 errors.
- Clean
checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 2 tests, 0 failures, 0 errors.
IDWriterclass-file version: 52 (Java 8).
2026-08-14 — Partial occlusion Java port
Observable behavior
No known voxel-test divergence. Grid resolution, coordinate rounding, owner encoding, conflict marking, required visibility, complete-occlusion exemption, and same-part overlap behavior remain unchanged.
Supported JVM API
- Preserved every public
PartialOcclusionTestconstructor, accessor,filloverload, andapply()descriptor. Its four private fields also retain their reference names and descriptors. - Preserved the
JPartialOcclusionname plus both method descriptors.allowCompleteOcclusion()changes from a Scala-trait abstract method to a Java default method returningfalse. - Retained deprecated
JPartialOcclusion$classwith the referenceallowCompleteOcclusion(JPartialOcclusion)and$init$(JPartialOcclusion)static descriptors. This keeps Scala 2.11 implementations compiled against the reference jar linkable.
Compiler artifacts
Accepted divergence: the five generated PartialOcclusionTest$$anonfun$* classes are removed. The Java loops produce no replacement helper classes, and these closure implementation details are not retained as supported API.
Validation
PartialOcclusionCharacterizationTest: 10 tests, 0 failures, 0 errors.- Reference-compiled Scala consumer: 1 test, 0 failures, 0 errors.
- Complete plain-JVM suite: 27 tests, 0 failures, 0 errors.
- Clean
checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 2 tests, 0 failures, 0 errors.
PartialOcclusionTestclass-file version: 52 (Java 8).
2026-08-14 — Removal of unused Scala bridges
The downstream ABI inventory (JAVA_MIGRATION_ABI_INVENTORY.md) scanned 240 mod jars and found no consumer of either
bridge below. Both were written speculatively before the inventory existed.
Removed API
IDWriter.write(),IDWriter.write_$eq(Function2),IDWriter.read(), andIDWriter.read_$eq(Function1). No jar in the pack referencesIDWriterat all. Both in-repo callers,MultiPartRegistryandMicroMaterialRegistry, already usewrite(MCDataOutput, int)andread(MCDataInput).JPartialOcclusion$class, including theallowCompleteOcclusion(JPartialOcclusion)and$init$(JPartialOcclusion)static descriptors. No jar references the helper. The two consumers that touchJPartialOcclusion, ForgeRelocationFMP and WitchingGadgets, only callgetPartialOcclusionBoxes()Ljava/lang/Iterable;, and the two jars that implement the interface, WR-CBE and extrautilities, emit no call to the helper. The interface itself and both of its method descriptors are unchanged.
The ReferenceScalaPartialOcclusion binary fixture and JPartialOcclusionBinaryCompatibilityTest were removed with
the helper they existed to verify.
Observable behavior
IDWriter no longer stores Scala closures, so carrier selection and encoding happen without boxing an Integer or
allocating a Function1/Function2 per call. Byte, unsigned-short, and integer selection and the encoded bytes are
unchanged, including negative maximums selecting the byte carrier.
Accepted divergence: calling write or read before setMax now throws IllegalStateException instead of
NullPointerException. No caller reaches this state; the change only improves the failure message.
Validation
IDWriterCharacterizationTest: 9 tests, 0 failures, 0 errors.- Complete plain-JVM suite: 27 tests, 0 failures, 0 errors.
- Clean
checkstyleTest buildwith Spotless re-enabled: passing. - Java 8 Forge dedicated-server suite: 2 tests, 0 failures, 0 errors.
2026-08-14 — TCuboidPart Java port
Observable behavior
No known divergence for any part that reaches the cuboid implementation. getSubParts still yields one
IndexedCuboid6 holding a boxed Integer 0 and a copy of the bounds, getCollisionBoxes still yields the bounds
instance itself, and drawBreaking performs the same pipeline setup and BlockRenderer.renderCuboid call.
The concrete java.lang.Iterable implementation changes from a Scala Seq wrapped by JavaConversions to
Collections.singletonList. Both are single-element and immutable; only code inspecting the runtime class or
attempting mutation could observe the difference.
Accepted divergence: Scala trait linearization is not reproducible
This is the significant one, and it affects source compatibility rather than binary compatibility.
A Scala trait that overrides superclass methods wins over that superclass. A Java interface loses to it: on the JVM a
superclass method always beats an interface default. TCuboidPart is now a Java interface, so a recompiled Scala
class written as class Foo extends TMultiPart with TCuboidPart silently inherits TMultiPart's empty getSubParts
and getCollisionBoxes instead of the cuboid ones. It compiles cleanly and fails at runtime with missing collision and
selection boxes.
Declaring the interface methods as default would not help, because the superclass still wins. They are therefore left
abstract, which also matches the reference bytecode exactly.
Consequences:
- Already compiled binaries are unaffected. Their forwarders call
TCuboidPart$class, which is retained. - Java consumers are unaffected. They extend
JCuboidPart, which carries the overrides. - Scala consumers that recompile must extend
JCuboidPart, or declare the three overrides themselves and delegate toJCuboidPart.subParts,JCuboidPart.collisionBoxesandJCuboidPart.renderBreaking.
Microblock was the one in-repo case and now does exactly that. It changed from extends TCuboidPart to
extends TMultiPart with TCuboidPart plus the three explicit forwarders, because a Java interface can no longer supply
TMultiPart as its superclass.
CuboidPartCharacterizationTest.cuboidBehaviorWinsOverTheEmptyTMultiPartDefaults is the regression guard for this.
Supported JVM API
- Preserved every reference descriptor on
TCuboidPart,JCuboidPartandTCuboidPart$class, verified by diffingjavap -soutput against the reference dev jar built at246daff. - Retained
TCuboidPart$classwith all four statics, since ForgeRelocationFMP, OpenComputers, ProjRed and ProjectBlue call them. Its bodies cannot delegate to the instance methods, because old forwarders call the statics and would recurse; they delegate to the canonical statics onJCuboidPartinstead. - Kept
@SideOnly(Side.CLIENT)onTCuboidPart.drawBreakingandTCuboidPart$class.drawBreaking, matching the reference. As in the reference,Microblock.drawBreakingis deliberately not annotated, so on a dedicated server it survives while its callee is stripped. That hazard is unchanged; the method is never invoked server-side. - Added
JCuboidPart.subParts,JCuboidPart.collisionBoxesandJCuboidPart.renderBreakingas public statics, plus a private constructor onTCuboidPart$class. Both are additive.
Build layout
compileJava runs before compileScala, so Java sources under src/main/java cannot reference types that are still
Scala. All three files live under src/main/scala/codechicken/multipart/ for joint compilation, matching the existing
minecraft/McBlockPart.java. They can move to src/main/java once TMultiPart is ported.
Compiler artifacts
None removed. The Scala implementation generated no closure classes for this trait.
Validation
CuboidPartCharacterizationTest: 5 tests, 0 failures, 0 errors, unchanged from the Scala baseline.TCuboidPartBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, loading a Scala 2.11.5 class compiled against the reference dev jar whose forwarders call all four$classstatics.- Complete plain-JVM suite: 33 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 2 tests, 0 failures, 0 errors. The
RenderBlocksside warning and theantlr4jar parse errors in that log are present on the pre-port baseline as well.
2026-08-14 — TNormalOcclusion Java port
Covers NormalOcclusionTest, NormalOcclusionTest$, JNormalOcclusion, TNormalOcclusion,
TNormalOcclusion$class and NormallyOccludedPart, which all shared one Scala file.
Observable behavior
No known divergence in the occlusion result. The box test still returns true when every pair of boxes fails to intersect, still gathers the neighbour's normal boxes followed by its partial boxes in that order, and the bridge still evaluates the box test before the super chain and short-circuits on failure.
Traversable inputs are drained through JavaConversions.asJavaIterator(boxes.toIterator()) into an ArrayList
before testing, rather than traversed with forall. Iteration order is preserved. The result of the test does not
depend on order, since intersects is side-effect free.
Accepted divergence: super accessor becomes a non-synthetic default
The reference interface declares codechicken$multipart$TNormalOcclusion$$super$occlusionTest(TMultiPart)Z as
ACC_PUBLIC | ACC_ABSTRACT | ACC_SYNTHETIC. javac hides synthetic members completely, so no Java class, and no
Scala class recompiled against a Java interface, could ever implement it. Left abstract it would make the interface
unimplementable outside the original Scala compiler.
It is therefore emitted as a non-synthetic default returning true. true is the identity for the && chain the
bridge builds, and matches TMultiPart.occlusionTest. Classes compiled against the reference supply their own
override carrying their real super chain, so the default is only reached if the deprecated bridge is used on a class
that never had one. Method resolution ignores ACC_SYNTHETIC, so existing invokeinterface call sites are unaffected.
Consequently NormallyOccludedPart no longer declares that method itself and inherits the default. An old
invokevirtual against it still resolves through the interface default and still returns true.
Accepted divergence: Scala apply sugar on NormalOcclusionTest
NormalOcclusionTest was a Scala object, so Scala callers could write NormalOcclusionTest(boxes1, boxes2). It is
now a Java class with static methods, and that sugar no longer compiles; recompiled Scala callers must write
NormalOcclusionTest.apply(...). The in-repo callers in EdgeMicroblock and HollowMicroblock were updated.
Binary compatibility is unaffected: both static forwarders keep their reference descriptors, and NormalOcclusionTest$
keeps MODULE$ plus both instance methods, which is what ForgeRelocationFMP and OpenComputers link against.
Accepted divergence: NormallyOccludedPart.getType
The reference emitted two getType methods, ()Ljava/lang/String; and ()Lscala/runtime/Null$;, because Scala infers
Null for def getType = null. Only the String form remains. The Null$ form was a compiler artifact of the
inferred type, and no jar in the pack references it. AE2, the only consumer of this class, uses the (Cuboid6)V
constructor and the type itself.
Trait linearization, as with TCuboidPart
Both in-repo mixins needed explicit handling, and the two cases differ:
HollowMicroblockdid not overrideocclusionTestat all and relied on the trait. It now declaresNormalOcclusionTest.apply(this, npart) && super.occlusionTest(npart).PostMicroblockalready overrodeocclusionTestand ended withsuper.occlusionTest(npart), which previously routed throughTNormalOcclusionbecause it was the last mixin. That call now reachesMicroblockdirectly and would have skipped the box test entirely, so the same expression was substituted at that call site.
This second shape is the more dangerous one: the class looks correct, still compiles, and silently drops the box test.
Every remaining trait conversion needs its existing super call sites audited, not just its missing overrides.
Supported JVM API
NormalOcclusionTest$,JNormalOcclusionandTNormalOcclusionare descriptor-identical to the reference.NormalOcclusionTestandTNormalOcclusion$classadd only a private constructor, andNormalOcclusionTestthree private helpers. Both publicapplydescriptors are unchanged, including(Lscala/collection/Traversable;Lscala/collection/Traversable;)Z.- Scala's
Traversableis retained in two descriptors, as the ABI inventory anticipated.
Compiler artifacts
Accepted divergence: NormalOcclusionTest$$anonfun$apply$1 and NormalOcclusionTest$$anonfun$apply$1$$anonfun$apply$2
are removed. The Java loops produce no replacement classes. These were closure implementation details of the nested
forall and are not retained as supported API.
Documentation fix
The reference scaladoc said the test "returns true if the test fails", which the earlier characterization showed to be backwards. The Java doc comments now say the test returns true when the parts may coexist.
Validation
NormalOcclusionCharacterizationTest: 12 tests, 0 failures, 0 errors, unchanged from the Scala baseline.TNormalOcclusionBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, exercising forwarder,$class, singleton and the accessor callback.- Complete plain-JVM suite: 38 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 2 tests, 0 failures, 0 errors.
2026-08-14 — TFacePart Java port
Observable behavior
No known divergence. solid still returns true for every side, including negative and out-of-range values, and
redstoneConductionMap still returns 0. TFacePart still extends TSlottedPart.
The first trait where default methods are safe
TMultiPart declares neither solid nor redstoneConductionMap, and neither does anything in the microblock
superclass chain. There is therefore no superclass method for an interface default to lose to, and both members are
emitted as real Java default methods rather than left abstract.
This is the check to apply to every remaining trait: a default is safe only when no class in an implementor's
superclass chain declares the same member. TCuboidPart and TNormalOcclusion both failed that check and had to stay
abstract with explicit forwarders.
As a result no in-repo Scala needed changing. FaceMicroblock and HollowMicroblock already override what they care
about, and FaceMicroblock picks up the redstoneConductionMap default exactly as it previously picked up the trait
implementation.
Improvement for Java implementors
Both members were abstract on the reference interface, so a Java class implementing TFacePart had to supply them even
to accept the defaults; minecraft/McSidedMetaPart does exactly that. Java implementors can now inherit them. This is
additive: McSidedMetaPart is descriptor-identical to the reference, and existing implementors that declare their own
overrides are unaffected.
Supported JVM API
TFacePartis descriptor-identical to the reference, including both members remaining public and non-static on the interface. Changing them from abstract to default does not affect method resolution for existing implementors, which all declare their own.- Retained
TFacePart$classwith all three statics for OpenComputers, ProjRed and ProjectBlue. It adds only a private constructor. Its bodies hold the defaults directly rather than dispatching through the instance, matching the reference and avoiding recursion from old forwarders. - The emitted class-file set for this area is unchanged; the Scala implementation generated no closure classes here.
Validation
FacePartCharacterizationTest: 4 tests, 0 failures, 0 errors, unchanged from the Scala baseline.TFacePartBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, loading a Scala 2.11.5 consumer whose forwarders call all three statics.- Complete plain-JVM suite: 43 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 3 tests, 0 failures, 0 errors. A new case covers what plain-JVM tests cannot:
microblock classes are generated by ASM at runtime, so it checks that a generated
FaceMicroblockinherits theredstoneConductionMapdefault and that a generatedHollowMicroblockstill returns its own0x10andfalse.
2026-08-14 — TIconHitEffects Java port
Covers IconHitEffects, JIconHitEffects, JIconHitEffects$class, TIconHitEffects and TIconHitEffects$class,
which shared one Scala file.
Observable behavior
No known divergence. getBreakingIcon still ignores its subPart argument and returns getBrokenIcon(side), destroy
effects still request sides 0 through 5 in order, and the scaleDensity overload still chooses between the part's own
bounds and Cuboid6.full.
Evaluation order in addDestroyEffects is deliberately preserved: icons first, then bounds, then the tile. Hoisting
the tile read to the top of the method would have been tidier but changes which work happens before a null tile fails,
and the characterization pins the reference order.
Removed API: IconHitEffects$
Accepted divergence: the IconHitEffects$ companion singleton and its MODULE$ field are removed. No jar in the pack
references the class, by bytecode or by name; the four consumers of this area use the static forwarders on
IconHitEffects (WR-CBE, extrautilities) or the two $class bridges (ForgeRelocationFMP, OpenComputers, ProjRed).
This is the same reasoning applied to the dead IDWriter and JPartialOcclusion bridges, but it removes a public
class rather than a method, so it is worth calling out separately. Restoring it is a thin delegating class if any
consumer outside the pack turns out to need it. Note the contrast with NormalOcclusionTest$, which is referenced by
ForgeRelocationFMP and OpenComputers and was therefore kept.
Trait linearization, split decision
The two interfaces needed opposite treatment, which is the rule from the TFacePart port working as intended:
JIconHitEffects.getBreakingIconbecomes a realdefault.TMultiPartdoes not declare it, so nothing in an implementor's superclass chain can beat it. Java implementors can now inherit it;minecraft/McBlockPartalready declared its own and stays descriptor-identical.TIconHitEffects.addHitEffectsandaddDestroyEffectsstay abstract.TMultiPartdeclares both, so a default would silently lose to its empty versions.
MicroblockClient was the one in-repo case and now declares both explicitly, delegating to the IconHitEffects
statics.
Supported JVM API
JIconHitEffectsandTIconHitEffectsare descriptor-identical to the reference.IconHitEffects,JIconHitEffects$classandTIconHitEffects$classadd only a private constructor. All threeIconHitEffectsstatic overloads keep their reference descriptors, including the three-argumentscaleDensityform that extrautilities links against.@SideOnly(Side.CLIENT)placement matches the reference exactly: two onJIconHitEffects, one onJIconHitEffects$class, two onTIconHitEffects, two onTIconHitEffects$class, and none onIconHitEffects.JIconHitEffectsdoes not extendTMultiPartat bytecode level in the reference either, so the statics cast toTMultiPartinternally exactly as the reference does. Passing a non-TMultiPartstill fails withClassCastException.
Compiler artifacts
Accepted divergence: IconHitEffects$$anonfun$addDestroyEffects$1 is removed along with IconHitEffects$. The Java
loop produces no replacement class.
Validation
IconHitEffectsCharacterizationTest: 5 tests, 0 failures, 0 errors, unchanged from the Scala baseline.TIconHitEffectsBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, exercising all five statics across both bridges.- Complete plain-JVM suite: 49 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 3 tests, 0 failures, 0 errors.
- Particle appearance itself needs a client and stays on the manual checklist.
2026-08-14 — TItemMultiPart Java port
Covers JItemMultiPart, TItemMultiPart and TItemMultiPart$class, which shared ItemMultiPart.scala.
Observable behavior
No known divergence. getHitDepth still projects a copy of the hit vector onto the axis for that side and adds 1 on
even sides, leaving the caller's vector untouched. onItemUse still tries the clicked block only when the depth is
below 1, then always tries the neighbour on that side, reusing and mutating a single BlockCoord across both attempts
and passing the same Vector3 to every newPart call. Placement still short-circuits on a null part before touching
the world, still skips addPart on the client, and still decrements the stack only outside creative mode.
First trait extending a Minecraft class rather than TMultiPart
TItemMultiPart extends Item, so the linearization check runs against Item instead of TMultiPart. The outcome is
the same split seen in the TIconHitEffects port:
getHitDepthbecomes a realdefault.Itemdoes not declare it, so nothing in an implementor's superclass chain can beat it.onItemUsestays abstract.Itemdeclares it, so a default would silently lose to the vanilla implementation and placement would stop working.
This confirms the rule generalises: what matters is the implementor's actual superclass, not TMultiPart specifically.
There were no in-repo implementors beyond JItemMultiPart itself, so nothing else needed changing.
Supported JVM API
TItemMultiPartis descriptor-identical to the reference.JItemMultiPartkeeps its constructor, both instance methods and their descriptors; WR-CBE links against the constructor and the inheritedfunc_77658_a. It gains two public statics,hitDepthand theonItemUseoverload taking the part, plus a privateplace. All additive.TItemMultiPart$classkeeps all three public statics for ProjRed, its only consumer. It adds a private constructor and drops the reference's privateplace$1helper, which was never visible to consumers.getHitDepthon the bridge ignores its part argument and calls the static directly, matching the reference, whose trait body never usedthis. TheonItemUsepath still dispatchesgetHitDepththrough the interface, so an implementor's override is honoured exactly as before.
Compiler artifacts
None removed or added. The emitted class-file set for this area is unchanged; the local place function compiled to a
private static method rather than a closure class in both versions.
Validation
ItemMultiPartCharacterizationTest: 7 tests, 0 failures, 0 errors, unchanged from the Scala baseline.TItemMultiPartBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, driving a reference-compiled Scala consumer through both attempt positions.- Complete plain-JVM suite: 57 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 3 tests, 0 failures, 0 errors.
- Real placement into a world needs a client or a server scenario and stays on the functional and manual layers.
2026-08-14 — TEdgePart Java port
Observable behavior
No known divergence. conductsRedstone still returns false and TEdgePart still extends TSlottedPart.
Default method, same test as TFacePart
TMultiPart does not declare conductsRedstone, and nothing in the microblock superclass chain does either, so the
member is emitted as a real Java default. EdgeMicroblock never declared its own forwarder even in the reference,
because it is a Scala trait rather than a concrete class, and the generated concrete classes now resolve the interface
default instead of a Scala trait forwarder. The functional microblock generation case added during the TFacePart
port already covers that resolution path.
No in-repo Scala needed changing.
Supported JVM API
TEdgePartis descriptor-identical to the reference.TEdgePart$classkeeps both statics and adds only a private constructor. OpenComputers links against$init$only, butconductsRedstoneis retained because the bridge class is being kept regardless and dropping one static from a live bridge would be a gratuitous shape change.- The emitted class-file set for this area is unchanged; the Scala implementation generated no closure classes here.
Validation
EdgePartCharacterizationTest: 3 tests, 0 failures, 0 errors, unchanged from the Scala baseline.TEdgePartBinaryCompatibilityTest: 1 test, 0 failures, 0 errors.- Complete plain-JVM suite: 61 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 3 tests, 0 failures, 0 errors.
2026-08-14 — Saw Java port
The first port outside codechicken.multipart. Saw was declared in ItemSaw.scala; only the trait is extracted,
and ItemSaw itself stays Scala.
Observable behavior
No known divergence. getMaxCuttingStrength still asks the saw about a stack of itself, so the stack handed to
getCuttingStrength wraps the saw and has size 1, and the result still follows an implementor's
getCuttingStrength override.
Default method, and a shape change on ItemSaw
Item does not declare getMaxCuttingStrength, so it becomes a real Java default.
Consequence worth recording: ItemSaw previously carried a Scala trait forwarder for getMaxCuttingStrength and now
inherits the default instead, so it no longer declares that method. Three jars reference the ItemSaw type
(IguanaTweaksTConstruct, ProjectBlue, endercore) but none reference any of its members, and an invokevirtual against
ItemSaw.getMaxCuttingStrength would still resolve through the interface default. harvestLevel and
getCuttingStrength are unchanged.
This is the first time a port changed the declared members of a class it did not touch. Watch for it whenever a trait default is introduced on a type with concrete Scala implementors.
Unlike the other constant bridges
Saw$class.getMaxCuttingStrength dispatches getCuttingStrength back through the interface, so an implementor's
override is honoured even when the bridge is called directly. TFacePart$class and TEdgePart$class hold constants
and deliberately ignore overrides. Both behaviors are preserved as found and are asserted separately.
Supported JVM API
Sawis descriptor-identical to the reference.Saw$classkeeps both statics for ProjRed and adds only a private constructor. Its body casts toItemto build the stack, exactly as the reference bytecode did.- The emitted class-file set for this area is unchanged.
Validation
SawCharacterizationTest: 3 tests, 0 failures, 0 errors, unchanged from the Scala baseline.SawBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, where the fixture reports its strength only if handed a stack that wraps itself.- Complete plain-JVM suite: 65 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 3 tests, 0 failures, 0 errors.
2026-08-14 — MicroMaterialRegistry Java port
The first stateful registry converted, and the widest surface so far: ten jars reference the type and three more reach
it reflectively. Covers MicroMaterialRegistry, MicroMaterialRegistry$ and the two nested interfaces.
Observable behavior
No known divergence. setupIDMap still sorts the type map by name into the id array so ids are indexes into it,
materialID and materialName still round trip, remapName still resolves on both getMaterial(String) and
materialID, getMissingId still fails loudly when the placeholder is absent rather than falling back to zero, ids
still round trip through the shared IDWriter, and a highlight renderer that claims the highlight still short-circuits
the default renderer.
calcMaxCuttingStrength still throws when no saw is registered. The reference reached that through max on an empty
collection; the port throws UnsupportedOperationException explicitly to keep the same failure rather than silently
leaving the field at zero.
Changed API: readIDMap
Accepted divergence: readIDMap returns java.util.List<String> instead of scala.collection.Seq<String>. No jar in
the pack references it, and the only caller is the in-repo material registration packet handler, which was updated
from mkString to String.join. This removes one of the five Scala-typed descriptors the ABI inventory identified.
getIdMap()[Lscala/Tuple2; is deliberately not changed, because extrautilities links against it. The registry
therefore still stores scala.Tuple2 internally rather than converting on every call.
Removed API
- The three mangled accessors Scala emitted as public so its closure classes could reach private state:
codechicken$microblock$MicroMaterialRegistry$$idMap(),$$typeMap()and$$nameMap(). They are compiler artifacts, not API, and no jar references them. MicroMaterialRegistry$IMicroMaterial$class, along with its four statics. No jar references it. All ten implementors reachIMicroMaterialthroughBlockMicroMaterial, which is in-repo, so nothing external carries forwarders to the helper.MissingMicroMaterial.canRenderInPass(int)andMissingMicroMaterial.isSolid()static forwarders, plus the matching instance methods onMissingMicroMaterial$. That object overrides neither, so with the members now being Java interface defaults Scala emits no forwarder and therefore no static forwarder either. Nothing in the pack referencesMissingMicroMaterialat all. This is the same class of change asItemSawin theSawport, and the characterization caught it by failing to compile.
Added API
setupIDMap, calcMaxCuttingStrength and loadIcons gain static forwarders on MicroMaterialRegistry. They were
private[microblock] in Scala, which is public on the JVM but produces no static forwarder. Additive.
IMicroMaterial defaults
loadIcons, canRenderInPass and isSolid become real Java defaults. Neither nested interface has a superclass to
lose to, and both in-repo implementors, BlockMicroMaterial and MissingMicroMaterial, extend nothing else. Java
implementors can now inherit the three instead of restating them; both nested interfaces are descriptor-identical to
the reference.
Compiler artifacts
Accepted divergence: all eleven MicroMaterialRegistry$$anonfun$* classes are removed. The Java loops produce no
replacement classes.
Validation
MicroMaterialRegistryCharacterizationTest: 7 tests, 0 failures, 0 errors, passing against both the Scala baseline and the port.MicroMaterialRegistryBinaryCompatibilityTest: 1 test, 0 failures, 0 errors, driving a reference-compiled Scala consumer throughMODULE$and the rawscala.Tuple2array.- Complete plain-JVM suite: 73 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 3 tests, 0 failures, 0 errors. This exercises the real path, since server
startup calls
setupIDMap,calcMaxCuttingStrengthand the default content registration. - Error paths remain uncovered by tests: they call the microblock logger, which is null until
MicroblockProxy.preInitruns, so they cannot execute headless. They are unchanged from the reference.
2026-08-14 — MultiPartRegistry Java port
Covers MultiPartRegistry, MultiPartRegistry$ and the three nested interfaces. Twelve jars reference the type and
Schematica reaches the singleton reflectively.
Observable behavior
Registry behavior itself has no known divergence. beforeServerStart still sorts the type map by name so ids are indexes into it, part ids still
round trip through the shared IDWriter, converters are still grouped per block with the first non-null result
winning, registration still refuses to run once the registry is closed and still requires an active mod container, a
duplicate part id still throws, and writePartID and getModContainer still throw rather than returning null for an
unknown name.
Resolved reflective regression, discovered and fixed 2026-08-27
The full consumer-source audit found a constraint that the bytecode scan missed. Schematica 1.12.6 obtains the private
field codechicken$multipart$MultiPartRegistry$$typeMap from MultiPartRegistry$ and casts its value to
scala.collection.mutable.Map. The Java port moved the canonical map to a private java.util.HashMap on
MultiPartRegistry, and MultiPartRegistry$ exposed no compatibility field, so Schematica disabled its FMP
integration during reflective initialization.
MultiPartRegistry$ now restores that exact private field and descriptor using Scala's existing live Java-map wrapper;
the Java map remains the single source of truth. MultiPartRegistryCharacterizationTest performs Schematica's actual
ReflectionHelper lookup, casts the result to scala.collection.mutable.Map, and proves mutations reach the Java
registry. No separate registry or synchronization path was added.
Preserved Scala-typed descriptors
Both remain, because ForgeRelocationFMP and ProjRed link against them:
registerParts(Lscala/Function2;Lscala/collection/Seq;)VregisterParts(Lcodechicken/multipart/MultiPartRegistry$IPartFactory2;Lscala/collection/Seq;)V
The Seq overload drains through JavaConversions.seqAsJavaList. The Function2 overload applies the function with
a boxed Boolean, matching what the Scala closure received.
Array overloads become Java varargs
registerParts(IPartFactory, String[]) and registerParts(IPartFactory2, String[]) are declared String.... The
descriptor is unchanged, verified against the reference dev jar; ACC_VARARGS is a compiler flag and does not affect
linkage. This was needed because MicroblockClass called the Scala varargs form with a single string, which no longer
resolves against a plain array parameter. It also makes the Java call sites more natural without adding API.
Changed and removed API
readIDMapreturnsjava.util.List<String>instead ofscala.collection.Seq<String>, as withMicroMaterialRegistry. It isprivate[multipart]in Scala, so it has no static forwarder, and no jar references it.- The mangled public accessor methods Scala emitted so its closures could reach private state
(
codechicken$multipart$MultiPartRegistry$$typeMap()and the four others) are gone. No jar links those methods. This original check did not cover Schematica's reflective access to the separate private backing field described above.
Compiler artifacts
Accepted divergence: the eight MultiPartRegistry$$anonfun$* classes and MultiPartRegistry$$anon$1 are replaced by
two Java anonymous classes, MultiPartRegistry$1 and $2, which are the two IPartFactory2 adapters the deprecated
overloads build.
Validation
MultiPartRegistryCharacterizationTest: 5 tests, 0 failures, 0 errors, unchanged from the Scala baseline.- Complete plain-JVM suite: 78 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 5 tests, 0 failures, 0 errors. This is the layer that matters for this class: registration needs FML's active mod container, so real startup is the only place both factory overloads actually run, and the suite resolves a part registered through each.
- Error paths that log remain uncovered headless, as before, because the multipart logger is null until preInit.
2026-08-27 compatibility repair validation
- The new Schematica reflection case failed first with
UnableToFindFieldException, then passed with the compatibility field present. javap -private -sconfirms the field is private/final with descriptorLscala/collection/mutable/Map;.MultiPartRegistryCharacterizationTest: 6 tests, 0 failures, 0 errors.- Complete plain-JVM suite: 126 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing.
2026-08-14 — TileMultipart Java port
The central tile. Twelve jars reference it and about twenty-five of its members. TileMultipartClient was split into
its own Scala file and deliberately not converted: it is registered with the ASM generator through
registerTrait, so converting it is Phase 5 registerJavaTrait work with different machinery.
Observable behavior
No known divergence. Parts are still appended in order, the list is still replaced rather than mutated so a previously
published Seq never changes under a caller, operate still skips parts whose tile is null, ticking still starts on
the first ticking part and stops when the last one leaves, getLightValue is still max-or-zero while
getExplosionResistance is still max-or-throws, occlusion still requires agreement in both directions, and
canReplacePart still excludes the outgoing part while rejecting a part already present.
handlePacket case 254 resolves the tile twice, once for the receiver and once for the argument, because the
reference used a by-name local def that re-evaluated TileCache.findTile at each use. Argument order is preserved.
The assert calls on part count, client removal and client addition become explicit AssertionError throws with the
same messages, since Scala's assert is always enabled here and Java's is not.
Storage
partList remains a scala.collection.immutable.List published through partList()Lscala/collection/Seq;, which
five jars link against. Mutations copy to a Java list, mutate, and republish through JavaConversions, matching the
reference's allocate-a-new-Seq semantics exactly. No performance decision is taken here; that is Phase 4 work and
needs profiling first.
operate keeps its (Lscala/Function1;)V descriptor and internal callers still go through it, wrapping their action
in an AbstractFunction1. That preserves both the virtual dispatch, so any trait overriding operate still sees
every call, and the reference's per-call allocation.
Preserved Scala-typed descriptors
partList()Lscala/collection/Seq;andpartList_$eq(Lscala/collection/Seq;)Voperate(Lscala/Function1;)VgetOrConvertTile2(...)Lscala/Tuple2;loadParts(Lscala/collection/Iterable;)VrayTraceAllstill stores ascala.Tuple2intoExtendedMOP.data, whichEdgeMicroblockreads back throughgetData[(Int, _)].
Removed API
protected$worldObj(TileMultipart), the public accessor Scala emitted so the dropItems closure could reach the
protected field. It is a compiler artifact and no jar references it. TileMultipartClient lost nothing, including its
generated super accessor for markRender, which Scala regenerated correctly against the Java superclass.
Recompiled Scala consumers
The largest source-only divergence so far. Scala reads the Java signatures rather than a ScalaSignature, so:
tile.partList(i)no longer parses as an index; it must betile.partList.apply(i). Eleven in-repo call sites were updated.TileMultipart.renderID = xmust becomerenderID_$eq(x).getOrConvertTile2returnsTuple2[TileMultipart, Object]rather than(TileMultipart, Boolean), so_2needs an explicit cast. Two in-repo call sites.operate { p => ... }no longer accepts a lambda, because Scala 2.11 will not adaptTMultiPart => UnittoFunction1[TMultiPart, BoxedUnit]. The one in-repo caller,TTileChangeTile, now builds anAbstractFunction1.
Binary compatibility is unaffected in all four cases.
Compiler artifacts
Accepted divergence: all 31 TileMultipart$$anonfun$* classes are removed, replaced by one Java anonymous class for
the operate adapter.
Validation
TileMultipartCharacterizationTest: 12 tests, 0 failures, 0 errors, unchanged from the Scala baseline.- Complete plain-JVM suite: 90 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 5 tests, 0 failures, 0 errors. This is the load-bearing check: the ASM
generator builds composite tiles that extend this class and mix Scala traits into it, and the suite still generates
a
TSlottedTilecomposite and two microblock classes. - Every public member of the reference is still present except
protected$worldObj, verified by name-level diff, andpartList,operate,jPartList,getOrConvertTile2,multiPartChange,rayTraceAllanddropItemswere checked descriptor by descriptor. - World-dependent paths, NBT round trips through
createFromNBT, and desc packets are not covered by tests and stay on the manual checklist.
2026-08-14 — TMultiPart Java port
The base class every part extends. Five jars extend it and about twenty of its members are referenced.
Observable behavior
No known divergence. The class is almost entirely no-op defaults; the only real implementation is
collisionRayTrace, which still offsets each sub part by the tile coordinates, rebuilds them as IndexedCuboid6
carrying the original data, and delegates to RayTracer.rayTraceCuboids with the same block coordinate and block
type. x, y and z still throw NullPointerException when the part is unbound, and world still returns null
rather than throwing.
getSubParts was traversed through JavaConversions purely to get Scala's map; rayTraceCuboids already took a
java.util.List, so the Java loop builds that list directly and the conversion disappears.
Supported JVM API
This is the cleanest result so far. Diffed against a reference dev jar built at cacc9a3:
- Every descriptor is identical, checked across all members rather than a sample.
- No public member lost and none added.
@SideOnly(Side.CLIENT)appears on the same seven members.getTile()and the no-argumentaddDestroyEffectsremain the only deprecated members.javapreports a higher raw count because javac emits both theDeprecatedattribute and the annotation where Scala emitted one form; the marked members are identical.tilekeeps itstile()andtile_$eq(TileMultipart)accessor pair, so Scala callers can still writepart.tile = t.
Recompiled Scala consumers
None. No in-repo Scala call site needed changing, which is the first port where that has been true of a type this
widely used. Scala resolves the empty-paren Java accessors the same way it resolved the Scala ones, and assignment to
tile still desugars to tile_$eq.
Compiler artifacts
Accepted divergence: TMultiPart$$anonfun$1, the closure from the getSubParts.map in collisionRayTrace, is
removed. The Java loop produces no replacement class.
Validation
- Complete plain-JVM suite: 90 tests, 0 failures, 0 errors, including the twelve
TileMultipartcases that drive parts throughbind,doesTick,occlusionTest,getLightValueandexplosionResistance. - Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 5 tests, 0 failures, 0 errors, covering real part registration and
instantiation of
mc_torchandmcr_faceplus composite tile generation. - Ray tracing, rendering and particle paths need a client and stay on the manual checklist.
2026-08-14 — TickScheduler Java port
No jar in the pack references this class, so the ABI constraint was minimal, but the reference shape was preserved anyway for consistency with the other ports.
Observable behavior
No known divergence. Ticks scheduled while the world is mid-tick are still queued and applied after processing rather than during it, an existing entry for the same part is still only overridden when going from random to scheduled, random-update parts still reschedule themselves 800 to 1600 ticks out, chunks are still dropped from the active set once their list empties, and only non-random entries are still written to chunk NBT.
processTicks filtered a ListBuffer with a side-effecting predicate that fires the part callbacks and mutates the
entry. The Java version iterates and rebuilds the list in the same order, so callback order and the reschedule
mutation are unchanged.
The singleton carries behavior here
Unlike the other companion singletons in this migration, TickScheduler$ is not a pure forwarder. The object extends
WorldExtensionInstantiator and WorldExtensionManager.registerWorldExtension is handed the instance itself, so the
two instantiator hooks have to live on the singleton. It stays a Java class extending WorldExtensionInstantiator
with MODULE$, delegating into the statics.
Supported JVM API
TickScheduler$andTickScheduler$PartTickEntryare descriptor-identical to the reference, includingPartTickEntry's Scala-styletime(),time_$eq,random()andrandom_$eqaccessor pairs and both constructors.TickScheduleradds only a private constructor.WorldTickSchedulerandChunkTickSchedulerwere Scalaprivate classand are now package-private static nested classes, keeping theirTickScheduler$WorldTickSchedulerandTickScheduler$ChunkTickSchedulerbinary names.
Recompiled Scala consumers
One call site. WorldExtensionManager.registerWorldExtension(TickScheduler) passed the object as a value and must now
pass TickScheduler$.MODULE$.
TRandomUpdateTick is a Scala trait extending TMultiPart, so at bytecode level it is a bare interface that does not
extend the class. The Java code casts where the reference relied on Scala's view of the type, the same pattern already
recorded for JIconHitEffects.
Compiler artifacts
Accepted divergence: the five $$anonfun$ classes under WorldTickScheduler.postTick and ChunkTickScheduler's
processTicks, saveData and loadData are removed. The Java loops produce no replacement classes.
Validation
- Complete plain-JVM suite: 90 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 5 tests, 0 failures, 0 errors. This exercises the port directly rather than
incidentally: the scheduler is registered as a world extension during startup, so
createWorldExtension,load, and thepreTick/postTickpair all run for every server tick of the suite. - Scheduled and random tick firing over time, and the chunk NBT round trip, are not asserted by any test and stay on the manual checklist.
2026-08-14 — BlockMultipart Java port
The Block face of the API. No jar references any member of it; it appears only as the return type of
MultipartProxy.block(), which ProjRed and buildcraft-compat call, and by name in Waila and guidenh reflection.
Observable behavior
No known divergence. Every override still resolves the tile through getTile, which continues to return null both
when the tile is not a multipart tile and when its part list is empty, so the null branches and the empty-tile branches
stay merged exactly as before. isAir still reports true for a missing tile, getExplosionResistance still returns 0
rather than reaching the throwing max on an empty tile, and the redstone queries still flip the side with side ^ 1.
reduceMOP still returns the struck part's index alongside a rebased ExtendedMOP carrying that part's own data and
the original distance.
Supported JVM API
BlockMultipart$is descriptor-identical to the reference, includingreduceMOP'sscala.Tuple2return.BlockMultipartdiffers by exactly one descriptor, discussed below.addCollisionBoxesToListkeeps its descriptor; only its generic signature changes from Scala'sList<?>to the rawListthat vanilla'sBlockactually declares, which is the more faithful override.- The four static forwarders
getTile,getClientTile,reduceMOPanddrawHighlightare unchanged.
Removed API
hasTileEntity$default$1(), the accessor Scala emits for the default argument on hasTileEntity(meta: Int = 0).
Java has no default arguments, so it disappears. It is a compiler artifact of the default parameter, not API, and no
jar references any member of this class.
TileMultipartClient is a bare interface here
getClientTile returns TileMultipartClient, which is a Scala trait extending TileMultipart, so in bytecode it is
an interface carrying none of the class's members. addHitEffects casts to TileMultipart to reach the part list.
This is the third occurrence of the pattern, after JIconHitEffects and TRandomUpdateTick.
Compiler artifacts
Accepted divergence: the four $$anonfun$ classes under getDrops and addCollisionBoxesToList, including the two
nested inner closures, are removed. The Java loops produce no replacement classes.
Validation
- Complete plain-JVM suite: 90 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 5 tests, 0 failures, 0 errors. The block is registered during startup and is
the block every generated multipart tile is placed against, so registration and
hasTileEntityrun for real. - Almost everything else in this class needs a player, a ray trace or a renderer. Block breaking, selection boxes, collision, pick block, activation, particles and light are all on the manual checklist and are the reason that checklist exists.
2026-08-15 — Marker interface Java port
Six interfaces that carry no implementation: TSlottedPart, IRandomDisplayTick, INeighborTileChange,
TRandomUpdateTick, ISidedHollowConnect and IMicroMaterialRender.
Observable behavior
No known divergence. Five of the six were already pure abstract interfaces in bytecode with no $class helper, so
their conversion is a source-language change with no bytecode consequence at all. The sixth is discussed below.
Supported JVM API
All six are member-identical and descriptor-identical to the reference. Every implementor and mixin was diffed as
well — Microblock, RedstoneTorchPart, TorchPart, HollowMicroblock, TSlottedTile, TTileChangeTile and
TRandomDisplayTickTile are unchanged member for member, so no concrete class gained or lost a forwarder.
TSlottedPart and TRandomUpdateTick extended TMultiPart in Scala source. A trait extending a class is a bare
interface in bytecode, carrying none of the class's members, so the Java interfaces are bare too and match the
reference exactly. This is the same pattern as JIconHitEffects and TileMultipartClient; the port makes it explicit
in the source rather than changing it.
IMicroMaterialRender keeps the Scala accessor names world, x, y and z. TMultiPart declares all five
members under exactly these names, which is what implements the interface for every part. Renaming any of them to a
bean accessor would silently unimplement it, so the names are pinned by a characterization test.
Removed API
TRandomUpdateTick$class, with its onWorldJoin and $init$ statics. It is the only class removed from the jar by
this port; the full class list is otherwise identical.
onWorldJoin cannot become an interface default. TMultiPart declares onWorldJoin, and a superclass method
always beats an interface default on the JVM, so the default would never run and the failure would be silent. It stays
abstract, and each implementor declares it and calls TickScheduler.loadRandomTick itself, which is what
RedstoneTorchPart — the only implementor in this codebase — already did. The Scaladoc already carried this warning
for Java implementors; it now applies to Scala implementors too.
No jar in the pack references TRandomUpdateTick in any form, and the frozen baseline contains exactly the eight
$class helpers listed in the inventory, which does not include this one. Per the IDWriter precedent, no
compatibility bridge was written. The consequence to accept: a Scala class mixing in TRandomUpdateTick and relying
on the trait's onWorldJoin must now declare it, or it will resolve to TMultiPart's no-op and never register for
random ticks. This is a recompiled-Scala-consumer break with no shipping consumer.
Validation
- Complete plain-JVM suite: 99 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 5 tests, 0 failures, 0 errors.
- Public members, descriptors and the full emitted class list diffed against a reference jar built at
3e68e67. - Random tick firing over time still needs a world and stays on the manual checklist, as does torch display-tick rendering and hollow-cover connection sizing.
2026-08-15 — MultipartHelper Java port
The NBT and description-packet entry point. Two of its statics are linked against by shipping jars, and guidenh
reflects on both MultipartHelper and MultipartHelper$ by name.
Observable behavior
No known divergence. The id guard still returns null before assigning MultipartSaveLoad.loadingWorld, so a tag that
is not a saved multipart still leaves the loading world untouched. sendDescPacket still resolves the chunk from the
tile's own coordinates and still sends nothing when getDescPacket returns null, which it does when the iterator
yields no TileMultipart.
createTileFromParts now builds one JavaConversions wrapper and passes it to both generateCompositeTile and
loadParts, where the Scala applied the implicit conversion separately at each call site. Both wrappers were views
over the same java.lang.Iterable, so this is one allocation fewer and the same traversal.
Supported JVM API
MultipartHelperis public-member-identical and descriptor-identical to the reference, includingcreateTileFromParts'sjava.lang.Iterableparameter, which is easy to misread as Scala's.MultipartHelper$IPartTileConverteris identical, including theclazz()accessor Scala generated for itsval.MultipartHelper$keepsMODULE$, its private constructor and all four instance forwarders, identical.- The full emitted class list is unchanged: nothing was added or removed.
MultipartHelper$ was kept deliberately. It is not among the 17 MODULE$ singletons the inventory found read from
bytecode, and no jar links against it, but guidenh names it as a reflective string constant. The inventory warns that
removing a companion breaks those consumers even where no bytecode reference exists, so this one stays. This is the
opposite call to IconHitEffects$, which was dropped because nothing referenced it in bytecode or by name.
Differences that are not API
MultipartHelpergains a private constructor, as every converted Scalaobjecthas.MultipartHelper$'s class initializer loses itsACC_PUBLICflag: Scala emitspublic static {},javacemitsstatic {}. The JVM invokes<clinit>implicitly and it cannot be named by any caller.IPartTileConverter.convertMultireturnsCollections.emptyList()orCollections.singletonList(part)instead of ascala.collection.convert.Wrappers$SeqWrapperover a ScalaSeq. The declared type was alwaysjava.lang.Iterableand no consumer implements or inspects the concrete type, so this is an implementation detail, and it removes a wrapper allocation per converted tile.- The two commented-out blocks the reference carried — the
PlayerInstance.playersInChunkreflection and the multi-tilesendDescPackets— are not reproduced as dead code. The reason they were removed, a missing forge access transformer, is recorded in the class javadoc instead.
The cast in convert is still checked
convert(TileEntity) calls convertMulti((T) tile), and erasure turns that cast into (TileEntity), which cannot
fail. The ClassCastException a mismatched tile produces comes from the synthetic bridge method on the subclass
that overrides convertMulti(T), exactly as it did under Scala's asInstanceOf[T]. The mechanism is unchanged, and
convertFailsOnATileTheConverterDoesNotAccept pins it because it looks like erasure should have swallowed it.
Validation
- Complete plain-JVM suite: 107 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 10 tests, 0 failures, 0 errors, 5 of them new for this port. They cover
everything the plain-JVM suite cannot reach: tile construction through the ASM generator, the NBT round trip through
the save/load hooks,
registerTileConverterappending to a ScalaMutableList, andsendDescPacketagainst a loaded chunk. - Public members, descriptors and the full emitted class list diffed against a reference jar built at
0fdf9e5. - What stays manual: a description packet actually arriving at a watching client. The functional test builds and sends one with no players connected, so the wire format and the client's handling of it are still unasserted.
2026-08-15 — TileCache Java port
The client-side tile recovery cache. Zero downstream references: no jar links against any member, and guidenh's
reflective name list does not include it. That makes this the first port free to change shape rather than preserve it,
on the IDWriter precedent.
Observable behavior
No known divergence. add still stores the tile unflagged and remove still replaces that entry with a flagged one
rather than dropping it, both keyed by a fresh BlockCoord built from the tile's own coordinates. findTile still
prefers the world's tile, still warns only when the cached entry is not flagged removed, and still throws
RuntimeException("DC: Client multipart @" + c + " not found") when the cache has nothing.
The reference's trailing case _ => null in findTile is unreachable — Some(FlaggedTile(t, rem)) matches whatever
the flag is — so a tile flagged removed is returned just like any other, silently. The Java port makes that explicit
with a comment instead of a dead branch, and stillReturnsATileThatWasFlaggedRemoved pins it.
Changed API
All of it is unreferenced, and each change removes a Scala type from a signature no Java caller could use naturally:
| Member | Reference | Port |
|---|---|---|
map() |
scala.collection.mutable.Map |
java.util.Map |
add, remove |
returned scala.Option (the displaced entry) |
void |
apply(BlockCoord) |
scala.Option<FlaggedTile> |
FlaggedTile, null when absent |
findTile and clear are unchanged. No internal caller used any of the discarded return values: TileMultipart calls
add/remove/findTile and MultipartEventHandler calls clear.
Removed API
TileCache$andTileCache$FlaggedTile$, the two companion singletons. Nothing references either in bytecode or by name, which is theIconHitEffects$case rather than theMultipartHelper$one.FlaggedTile's case-class machinery:copy,copy$default$1,copy$default$2,canEqual,equals,hashCode,toString,productPrefix,productArity,productElement,productIterator, and thescala.Productandscala.Serializableinterfaces. It is only ever a map value, never compared, hashed, printed or destructured, so none of it was load-bearing.t()andremoved()are kept under their generated names.
Validation
- Complete plain-JVM suite: 114 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 13 tests, 0 failures, 0 errors, 3 of them new.
findTileneeds a world, so all three branches are covered there rather than headless. - Class list and members diffed against a reference jar built at
b92d4b7. Two classes removed, both companions. - One characterization assertion changed with the port: the test's
entryAtadapter stopped unwrapping ascala.Option. It was written as the single place the collection types are named precisely so this diff would be two lines. Every behavioral assertion is unchanged and passed before and after. - What stays manual: the recovery path itself. It only fires when a client tile is evicted from its chunk before its update packet arrives, which no test reproduces.
2026-08-15 — PacketScheduler Java port
PacketScheduler, IScheduledPacketPart and TScheduledPacketPart. Zero downstream references and, unusually,
zero implementors in this codebase either: the whole subsystem is a third-party extension point that no shipping mod
in the pack uses.
Observable behavior
No known divergence. schedulePacket still refuses a client world with IllegalArgumentException, still ORs repeated
masks for the same part, and sendScheduled still skips parts whose tile is null, still writes the mask at the part's
own width before calling writeScheduled, and still clears the schedule at the end.
It also still fails rather than writing nothing for a mask width outside 1, 2, 4 and 8. The reference matched with no
fallback and raised scala.MatchError; the port throws IllegalArgumentException. Both are RuntimeException, which
is what the characterization asserts, and there is no consumer to notice the type. The map is still not cleared
when that throw happens, because the reference had no try/finally and the port does not add one.
Supported JVM API
IScheduledPacketPartis member- and descriptor-identical to the reference.PacketScheduler.schedulePacket(TMultiPart, long)is unchanged.TScheduledPacketPartkeepsreadabstract.TMultiPartdeclaresread, so a default would be shadowed by the superclass and a part would silently read a description instead of a mask.
Changed API
TScheduledPacketPart.writeScheduled and readScheduled became interface defaults with empty bodies. They were
abstract on the reference interface with the empty bodies held in TScheduledPacketPart$class, which is to say a Scala
implementor already got them for free and only a Java implementor had to write them out. Making them defaults restores
the trait's source-level semantics for Java implementors rather than changing them. TMultiPart declares neither, so
the default-versus-superclass rule permits it.
Added TScheduledPacketPart.readMask(TScheduledPacketPart, MCDataInput), a Java 8 interface static carrying the mask
dispatch that TScheduledPacketPart$class.read used to hold. Because read cannot be a default, this is what makes
the interface worth mixing in: implementors write a one-line read that delegates to it. The javadoc carries the
snippet.
sendScheduled is public. The reference declared it private[multipart], which reaches codechicken.multipart.handler
where the only caller lives; Java has no scope that spans a package and its siblings, so package-private would not
compile and public is the only option.
Removed API
PacketScheduler$ with its MODULE$, and TScheduledPacketPart$class. Neither is referenced by any jar in the pack,
in bytecode or by reflective name, so both fall under the IconHitEffects$ case rather than the MultipartHelper$
one. The two PacketScheduler$$anonfun$ closure classes go with them; the Java loop produces no replacement.
Validation
- Complete plain-JVM suite: 118 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 18 tests, 0 failures, 0 errors, 5 of them new for this port.
- Class list and members diffed against a reference jar built at
3ad25f5. - Two characterization adjustments, both anticipated: the functional test's
sendScheduledhelper stopped namingPacketScheduler$.MODULE$, and the structural test stopped asserting thatwriteScheduledandreadScheduledare abstract onTScheduledPacketPart, asserting the member set instead. Every behavioral assertion is unchanged. - What stays manual: the client-world guard.
schedulePacketthrows only whenworld.isRemote, which neither harness can produce — the plain JVM cannot build aWorldand the dedicated server is never remote.
2026-08-15 — ControlKeyModifer and ControlKeyHandler Java port
The placement-modifier key: a server-side map of which players hold it, and the client key binding that keeps that map in sync. Zero downstream references, and not among guidenh's reflective names.
The misspelling in ControlKeyModifer is the published name and is kept. The file was named ControlKeyModifier.scala
while the object inside it was ControlKeyModifer; only the file name is corrected. Renaming the type would be an API
change with no forcing reason, so it is left for a deliberate decision rather than smuggled into a port.
Observable behavior
No known divergence. isControlDown still branches on whether the player's world is remote, still reports
isClientPressing on a client and the recorded map value on a server, and an unrecorded player still reads as not
holding. ControlKeyHandler.tick still fires only on a change, still checks the net handler before sending, and still
sets the client flag before writing packet 1.
The reference's map was HashMap().withDefaultValue(false); the port uses a plain HashMap and treats an absent key
as false at the single read site, which is the only place the default was ever observable.
Changed and removed API
| Member | Reference | Port |
|---|---|---|
isControlDown(EntityPlayer) |
static | unchanged, the documented Java entry point |
isClientPressing() |
static | unchanged |
isClientPressing_$eq(boolean) |
static | setClientPressing(boolean) |
map() |
scala.collection.mutable.Map<EntityPlayer, Object> |
java.util.Map<EntityPlayer, Boolean> |
playerControlValue(EntityPlayer) |
static, returned ControlKeyValue |
removed |
Removed classes: ControlKeyModifer$, ControlKeyModifer$ControlKeyValue and ControlKeyHandler$. Nothing
references any of them in bytecode or by reflective name.
ControlKeyValue and playerControlValue existed only to give Scala player.isControlDown sugar through an implicit
conversion. They are meaningless from Java, and the reference already shipped isControlDown(EntityPlayer) explicitly
"for Java users". The one in-repo user, MicroblockPlacement, now calls that static directly.
ControlKeyHandler is now an ordinary class with a singleton
The reference was a Scala object extending KeyBinding, so the instance the key registry and the event bus both
needed was ControlKeyHandler$.MODULE$, and ControlKeyHandler was a class of static forwarders — including
forwarders for twelve inherited KeyBinding members. The port makes ControlKeyHandler itself the KeyBinding
subclass with a single INSTANCE, and MultipartProxy_clientImpl passes ControlKeyHandler.INSTANCE.
Consequence to note: referencing ControlKeyHandler at all now loads KeyBinding, where before only the companion
did. Both are reached solely from the client proxy's postInit, so nothing changes in practice, and the class carries
@SideOnly(Side.CLIENT).
Validation
- Complete plain-JVM suite: 120 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 21 tests, 0 failures, 0 errors, 3 of them new.
isControlDownneeds a real player to pick its branch, so they run against a ForgeFakePlayeron a server world, which takes the server branch. - Class list and members diffed against a reference jar built from the pre-port
src/main. - No characterization assertion changed with the port.
- What stays manual, and it is most of the client half: the key binding appearing in the controls screen, the packet
actually reaching the server on press and release, and
isControlDownreporting the pressed state on a client world. No harness has a client, soisClientPressingis never exercised.
2026-08-15 — Package objects removed rather than ported
codechicken.multipart.package and codechicken.microblock.package. This entry records a removal, not a
conversion, because a conversion is impossible.
Why they have no Java form
A Scala package object compiles to a class literally named package, plus its package$ companion. package is a
Java keyword, so no Java source can declare or even name those types. The characterization test had to reach both of
them through Class.forName, which is the whole argument in one line.
That left three options: leave two six-line Scala files in the tree forever, invent a Java type to hold the member, or
remove the indirection. Each package object held exactly one member — def logger = MultipartProxy.logger and
def logger = MicroblockProxy.logger — so the third is the honest one. The alias existed only to let Scala code inside
the package write logger unqualified; Java has no such sugar, and the proxies already publish the value.
Observable behavior
None changed. The functional characterization asserted before the removal that each alias returned the very instance
its proxy holds, so replacing logger with MultipartProxy.logger / MicroblockProxy.logger at the call sites is an
identity substitution. The eight call sites are ConfigContent (7) and MultipartGenerator (1); both classes are
descriptor-identical after the change, since only method bodies moved.
Removed API
codechicken/multipart/package, codechicken/multipart/package$, codechicken/microblock/package and
codechicken/microblock/package$. Exactly those four classes leave the jar and nothing else changes. No jar in the
pack references any of them, in bytecode or by reflective name — no Java consumer could reference them by name, and
no Scala consumer did.
Validation
- Complete plain-JVM suite: 120 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 22 tests, 0 failures, 0 errors.
- Class list diffed against a reference jar built from the pre-removal
src/main: exactly four classes removed. - Test churn, both expected for a removal rather than a port:
PackageObjectCharacterizationTestwas deleted with its subject, andProxyLoggerFunctionalTestlost only its alias-identity assertion. What survives is the assertion worth keeping — that both proxies publish a non-null logger during preInit, which is what the inlined call sites now read.
2026-08-15 — MultipartRenderer Java port
The client rendering callbacks. No jar links against any member, but guidenh reflects on both MultipartRenderer
and MultipartRenderer$ by name, resolving renderWorldBlock as a static first and falling back to the companion's
MODULE$. Both classes are therefore kept, in the TickScheduler$ shape: the companion holds the implementation
because Forge registers that instance itself, and the plain class is static forwarders.
Observable behavior
No known divergence. The render id is still claimed in the singleton's initialiser, which preserves the reference's
timing: a Scala object runs its body on first access, and the first access is the client proxy's postInit.
renderWorldBlock still returns false for a non-multipart tile, for an empty part list, and after drawing a breaking
overlay; renderTileEntityAt still returns early unless the tile has dynamic parts; getRenderId still reads
TileMultipart.renderID.
The reference wrote the dynamic-part guard with a non-short-circuiting |. The port uses ||. Both operands are
side-effect-free getters, so this cannot differ.
The breaking-overlay branch moved into a private helper. The reference nested a pattern match inside an if; the hit
data is a scala.Tuple2 that arrives erased, so the port checks the tuple and then the boxed index before unboxing,
which is what the match compiled to. BlockMultipart already reads the same data the same way.
Supported JVM API
The emitted class list is unchanged — nothing added, nothing removed. All five rendering callbacks keep their
exact signatures on MultipartRenderer, MODULE$ keeps its type and flags on MultipartRenderer$, and both classes
keep class-level @SideOnly(Side.CLIENT), so both are still stripped on a dedicated server.
MultipartRenderer$ still extends TileEntitySpecialRenderer and implements ISimpleBlockRenderingHandler. Forge
rejects the registration outright if either is missing, and the characterization asserts both.
Differences that are not API
MultipartRendererlosesfunc_147498_b,func_147496_aandfunc_147497_a, the forwarders Scala generates for inheritedTileEntitySpecialRenderermembers. Same category as the twelveKeyBindingforwarders dropped fromControlKeyHandler: artifacts of the object-forwarder mechanism, not API, and unreferenced.MultipartRenderer$'s class initialiser losesACC_PUBLIC, as every converted companion has.- The unused
com.gtnewhorizons.angelica.api.ThreadSafeISBRHimport is dropped. It appears nowhere else in the codebase and annotated nothing; no behavior depended on it. Worth a second look independently — if the intent was to mark this ISBRH thread-safe for Angelica, that annotation was never actually applied in the reference either.
Scala's uniform access hid a field-versus-method difference
renderer.hasOverrideBlockTexture reads identically in Scala whether it is a field or a no-arg method. It is a method
on RenderBlocks, and the port did not compile until it became hasOverrideBlockTexture(). This is a compile-time
failure rather than a silent one, but it will recur in every remaining renderer conversion.
Validation
- Complete plain-JVM suite: 125 tests, 0 failures, 0 errors.
- Clean
spotlessApply checkstyleTest build: passing. - Java 8 Forge dedicated-server suite: 22 tests, 0 failures, 0 errors. It does not exercise this class and cannot: the server never loads it.
- Class list and members diffed against a reference jar built from the pre-port
src/main. - No characterization assertion changed with the port.
- What stays manual, and it is everything this class actually does: static block rendering, dynamic part rendering, the breaking overlay on the struck part, inventory rendering, and the render id being claimed exactly once. None of it can run without a client, so all of it is on the checklist.