Commit Graph
69 Commits
Author SHA1 Message Date
Algent aa1d26ca98 refactor: modernize micro occlusion helper 2026-09-09 14:31:25 +02:00
Algent ac2dde545e refactor: modernize hollow client rendering 2026-09-09 13:14:45 +02:00
Algent ce16d47d40 refactor: modernize microblock logic helpers 2026-09-09 13:07:37 +02:00
Algent 638d90c4f0 feat: add saw strength API 2026-09-09 00:52:19 +02:00
Algent 9fd64d3db1 docs: demonstrate Java microblock extensions 2026-09-05 17:45:57 +02:00
Algent 4ec29ec49f docs: mark the internal API boundary 2026-09-05 15:11:34 +02:00
Algent 37d5ea98f6 docs: define direct Java material access 2026-09-05 14:58:24 +02:00
Algent b7d28fb794 docs: define Java microblock creation contract 2026-09-05 14:28:06 +02:00
Algent 2bb5e7ffc9 feat: add Java material enumeration 2026-09-04 23:30:54 +02:00
Algent 5995e366b7 fix: preserve material property dispatch 2026-09-04 22:53:52 +02:00
Algent fd29e0a737 fix: preserve microblock state dispatch 2026-09-04 22:47:31 +02:00
Algent fa41ae0609 refactor: port micro occlusion client to Java 2026-09-04 00:32:48 +02:00
Algent f6d1568399 refactor: port micro occlusion logic to Java 2026-09-04 00:16:03 +02:00
Algent a50ce52cd3 refactor: port hollow microblock client to Java 2026-09-04 00:00:37 +02:00
Algent 940609bf46 refactor: port hollow microblock logic to Java 2026-09-03 23:31:25 +02:00
Algent 556fd519bb refactor: port post microblock client to Java
Retain Scala state and lifecycle bridges with ordered virtual dispatch.
2026-09-03 22:57:12 +02:00
Algent 1c7dd1424d refactor: port post microblock logic to Java
Retain Scala super dispatch and trait metadata for generated mixins.
2026-09-03 22:37:43 +02:00
Algent 7c4c87ec08 refactor: port edge microblock logic to Java
Retain Scala trait metadata and helper bridges for generated mixins.
2026-09-03 22:13:24 +02:00
Algent 33e0bc2ad3 refactor: port corner microblock logic to Java
Retain Scala trait declarations and helper bridges for inherited mixin registration and existing consumers.
2026-09-03 22:01:12 +02:00
Algent cfde82235a refactor: port face microblock logic to Java
Retain Scala trait declarations and helper bridges for inherited mixin registration and existing consumers.
2026-09-03 21:43:37 +02:00
Algent d89aaeacf3 refactor: port common microblock logic to Java
Retain Scala trait declarations and helper bridges for inherited mixin registration and existing consumers.
2026-09-03 21:14:54 +02:00
Algent 2f4972e6fd refactor: port microblock generator to Java 2026-09-02 11:25:04 +02:00
Algent 34aeb7c0d3 refactor: port micro occlusion to Java 2026-09-02 10:47:38 +02:00
Algent 33510e74bd refactor: port hollow microblock factory 2026-09-02 01:23:47 +02:00
Algent df212470e6 refactor: port edge and post factories 2026-09-02 01:00:12 +02:00
Algent d9ecf087ad refactor: port corner microblock factory 2026-09-02 00:33:54 +02:00
Algent 2f60e60193 refactor: port face microblock factory 2026-09-01 20:12:54 +02:00
Algent fa675676ae refactor: port microblock base to Java 2026-09-01 19:54:41 +02:00
Algent 7172af4573 refactor: port microblock classes to Java 2026-09-01 19:34:51 +02:00
Algent 6c54b740ac refactor: port microblock renderer to Java 2026-09-01 19:18:47 +02:00
Algent 0d03dea7b6 refactor: port saw item and renderer to Java 2026-09-01 19:01:26 +02:00
Algent 4761336d7b refactor: port Angelica compat to Java 2026-09-01 18:46:14 +02:00
Algent 80edf9bd01 refactor: port config content to Java 2026-09-01 14:13:05 +02:00
Algent d334d21653 refactor: port block micro material to Java 2026-09-01 13:50:41 +02:00
Algent 1939159564 refactor: port placement grids to Java 2026-09-01 10:25:36 +02:00
Algent c20b6bf9d9 refactor: port microblock placement to Java 2026-09-01 10:06:34 +02:00
Algent 2808742f26 refactor: port ItemMicroPart to Java 2026-09-01 08:35:56 +02:00
Algent f063cc94b4 refactor: port microblock proxy to java 2026-09-01 00:31:27 +02:00
Algent 86d8c14c4f refactor: port grass micro materials to java 2026-08-31 20:09:40 +02:00
Algent 8d4ad03223 refactor: port default content to java
Preserve the exact built-in factory, material, and remap registrations.
2026-08-31 19:45:20 +02:00
Algent 9a8bbfd7a7 refactor: port missing micro material
Preserve the singleton ABI, client stripping, and placeholder registration.
2026-08-31 19:12:26 +02:00
Algent 471c767d33 refactor: port microblock packet handlers
Preserve the registry channel, singleton ABI, client skip, and handshake payload.
2026-08-31 13:51:22 +02:00
Algent 1c91fbb4c9 refactor: port microblock event handler
Preserve the client-only ABI and dedicated-server side stripping.
2026-08-30 22:02:48 +02:00
Algent 1946ea4695 refactor: port microblock mod to java
Preserve the Scala FML instance and mutable Angelica compatibility hook.
2026-08-30 21:45:10 +02:00
Algent 984d3a2f61 refactor: port microblock recipes to java 2026-08-28 11:07:57 +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 a2797c986b refactor: port ControlKeyModifer and ControlKeyHandler to Java
isControlDown(EntityPlayer) and isClientPressing() keep their descriptors.
map() became a java.util.Map and isClientPressing_$eq became setClientPressing.

Dropped playerControlValue and ControlKeyValue. They existed only to give Scala
player.isControlDown sugar through an implicit conversion, and the reference
already shipped the explicit static 'for Java users'. MicroblockPlacement now
calls that static directly.

ControlKeyHandler was a Scala object extending KeyBinding, so the instance both
the key registry and the event bus needed was ControlKeyHandler$.MODULE$. It is
now an ordinary KeyBinding subclass with an INSTANCE constant, which also drops
the twelve static forwarders Scala generated for inherited KeyBinding members.

The misspelling in ControlKeyModifer is the published type name and is kept;
only the file name, which said ControlKeyModifier.scala, is corrected.

120 plain-JVM tests and 21 Forge server tests pass, none of them changed by the
port.
2026-08-15 19:45:53 +02:00
Algent 9db07f8c7c refactor: port the marker interfaces to Java
TSlottedPart, IRandomDisplayTick, INeighborTileChange, TRandomUpdateTick,
ISidedHollowConnect and IMicroMaterialRender.

All six are member- and descriptor-identical to the reference. The seven
implementors and mixin tiles were diffed too and are unchanged member for
member. Five were already pure abstract interfaces in bytecode, so their
conversion has no bytecode consequence; exactly one class leaves the jar,
TRandomUpdateTick$class.

onWorldJoin cannot become a default: TMultiPart declares it, and a superclass
method beats an interface default, so the auto-registration would silently
never run. It stays abstract and implementors call TickScheduler.loadRandomTick
themselves, as RedstoneTorchPart already did.

No bridge was written for TRandomUpdateTick$class. No jar in the pack
references TRandomUpdateTick in any form, and the frozen baseline holds exactly
the eight helpers the inventory lists.

99 plain-JVM tests and 5 Forge server tests pass.
2026-08-15 15:32:45 +02:00
Algent cacc9a30a8 refactor: port TileMultipart to Java
Converts the central tile class and its companion object. TileMultipartClient
moves to its own Scala file unchanged: it is registered with the ASM
generator through registerTrait, so converting it is Phase 5
registerJavaTrait work rather than part of this step.

Every public member of the reference survives except protected$worldObj,
the accessor Scala emitted so the dropItems closure could reach the
protected field; no jar references it, and TileMultipartClient lost
nothing including its generated super accessor for markRender. All five
Scala-typed descriptors are preserved: partList and its setter, operate,
getOrConvertTile2's Tuple2, loadParts, and the Tuple2 rayTraceAll stores
into ExtendedMOP.data.

partList stays an immutable Scala List republished on each mutation, which
matches the reference semantics exactly and takes no performance decision;
that belongs to Phase 4 with profiling. Internal callers still go through
operate rather than a private loop, so a trait overriding it still sees
every call.

Recompiled Scala consumers need four adjustments, all source-only:
partList.apply(i) for indexing, renderID_$eq for assignment, an explicit
cast on getOrConvertTile2._2, and an explicit AbstractFunction1 for
operate since 2.11 will not adapt a lambda to Function1[_, BoxedUnit].
Eleven, one, two and one in-repo call sites respectively.

31 anonfun classes collapse to one Java anonymous class.

Validated with 90 plain-JVM tests, a clean build, and the Java 8 Forge
dedicated-server suite, which is the load-bearing check here because the
ASM generator builds composite tiles on top of this class.
2026-08-15 11:15:03 +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