Commit Graph
120 Commits
Author SHA1 Message Date
Algent 75900d0602 test: characterize TNormalOcclusion
Extends the occlusion characterization to the parts of the area the port
will touch: the NormalOcclusionTest$ singleton and its MODULE$ field, the
TNormalOcclusion$class bridge, the super accessor the bridge calls back
through, NormallyOccludedPart's single-box constructor that AE2 links
against, and its null getType.

The generated codechicken$multipart$TNormalOcclusion$$super$occlusionTest
accessor is ACC_SYNTHETIC on the reference interface, so javac neither
sees nor allows implementing it. It is reached by reflection here, and the
port has to expose it as an ordinary method for any new implementor to be
able to satisfy it.

Adds a frozen Scala 2.11.5 consumer compiled against the reference dev jar
at cd6420f. It mixes in the trait without overriding occlusionTest, so
invoking it covers the whole bridge round trip: forwarder, $class,
singleton, and the callback through the accessor. ForgeRelocationFMP,
OpenComputers and ProjRed all depend on that path.

38 plain-JVM tests, all passing against the untouched Scala.
2026-08-14 20:24:28 +02:00
Algent cd6420f7f2 refactor: port TCuboidPart to Java
Replaces TCuboidPart.scala with Java implementations of TCuboidPart,
JCuboidPart and the TCuboidPart$class bridge. The canonical behavior now
lives in three statics on JCuboidPart; the deprecated bridge delegates to
them, since old Scala forwarders call the statics directly and delegating
to the instance methods would recurse.

Every reference descriptor is preserved, verified by diffing javap -s
output against the reference dev jar. ForgeRelocationFMP, OpenComputers,
ProjRed and ProjectBlue all call these four statics, and a frozen Scala
2.11.5 consumer compiled against the reference jar loads and runs against
the port.

Scala trait linearization cannot be reproduced by a Java interface: a
superclass method beats an interface default on the JVM, so a recompiled
Scala class mixing TCuboidPart into a TMultiPart subclass silently gets
TMultiPart's empty implementations. Declaring the methods default would
not help, so they stay abstract, matching the reference bytecode. Existing
binaries are unaffected. Microblock, the one in-repo case, now extends
TMultiPart with TCuboidPart and forwards explicitly. See
JAVA_MIGRATION_DIVERGENCES.md.

The three files live under src/main/scala because compileJava runs before
compileScala and they still reference TMultiPart.

Validated with 33 plain-JVM tests, a clean build, and the Java 8 Forge
dedicated-server suite.
2026-08-14 20:12:22 +02:00
Algent 8294240659 test: characterize TCuboidPart
Freezes the observable behavior of TCuboidPart, JCuboidPart and the
TCuboidPart$class bridge before the Java port, per the test-first gate in
JAVA_MIGRATION.md. All cases pass against the untouched Scala.

Records two asymmetries worth preserving: getSubParts wraps the bounds in
an IndexedCuboid6, whose copy constructor makes it a copy carrying a boxed
Integer 0 as data, while getCollisionBoxes aliases the bounds instance
itself. Cuboid6 has no equals, so geometry is compared component-wise.

Also adds a frozen Scala consumer compiled with 2.11.5 against the
reference dev jar at 246daff. Its forwarders call all four $class statics,
so it detects the linkage break that a freshly recompiled test would miss.
ForgeRelocationFMP, OpenComputers, ProjRed and ProjectBlue all depend on
those descriptors.

One case exists specifically to guard the port: TMultiPart supplies empty
getSubParts and getCollisionBoxes, and on the JVM a superclass method beats
an interface default, so a Java interface cannot reproduce Scala trait
linearization on its own.
2026-08-14 20:03:33 +02:00
Algent 246dafffda refactor: drop unused IDWriter and JPartialOcclusion Scala bridges
The downstream ABI inventory scanned 240 mod jars in GTNH daily
2026-08-14+678 and found no consumer of either bridge. Both were written
speculatively, before the inventory existed.

IDWriter had no downstream reference at all, so its four Scala function
accessors are removed and the class now selects a carrier width directly.
That also removes the Integer boxing and Function1/Function2 allocation
per read and write that the first port had preserved. Calling write or
read before setMax now throws IllegalStateException rather than
NullPointerException; no caller reaches that state.

JPartialOcclusion$class had no downstream reference either. The two
consumers that touch JPartialOcclusion only call getPartialOcclusionBoxes,
and the two jars that implement the interface emit no call to the helper.
The interface and both of its method descriptors are unchanged. The
ReferenceScalaPartialOcclusion fixture is removed with the helper it
existed to verify.

Validated with 27 plain-JVM tests, a clean checkstyleTest build with
Spotless re-enabled, and the Java 8 Forge dedicated-server suite.
2026-08-14 19:52:28 +02:00
Algent 78959e70e9 docs: inventory downstream ForgeMultipart ABI consumers 2026-08-14 19:48:01 +02:00
Algent 5c087c50b5 run spotless 2026-08-14 19:44:56 +02:00
Algent a0428b9994 refactor: port partial occlusion to Java
Keep the Scala trait helper so reference-compiled implementations remain linkable.
2026-08-14 18:24:59 +02:00
Algent 60818853e3 test: freeze Scala partial-occlusion ABI
Load a reference-compiled consumer so the Java bridge must retain the Scala trait helper.
2026-08-14 18:19:18 +02:00
Algent 2c610bdb48 refactor: port IDWriter to Java
Keep Scala function descriptors as deprecated bridges while adding primitive Java entry points.
2026-08-14 18:02:03 +02:00
Algent 07530d93bf test: characterize partial occlusion
Freeze voxel ownership and visibility rules before the Java port.
2026-08-14 17:46:30 +02:00
Algent a69f846775 test: characterize normal occlusion
Freeze contact tolerance and partial-box delegation before the Java port.
2026-08-14 17:38:53 +02:00
Algent 4ae2a6d0fa test: add Forge server characterization
Run JUnit after FML server startup and gate the task on fresh XML because Forge can exit zero after a test-mod exception.
2026-08-14 17:27:18 +02:00
Algent e33d3b2493 Add first characterization tests 2026-08-14 16:52:22 +02:00
Ryan Nasers f10595d062 Isbrh interface fmp (#53) 2026-08-13 12:14:59 +02:00
Jason Mitchell 7221176efd Maybe more thread safe renderpass (#50) 2026-07-22 15:30:42 -07:00
DarkShadow44andRecursivePineapple aa7d02cfb0 Don't use rock material (#45)
Co-authored-by: RecursivePineapple <[email protected]>
2026-07-05 00:05:47 +00:00
FourIsTheNumber d2ce5b7362 Add postea transformer for microblock items (#48) 2026-07-04 20:02:17 -04:00
Caedis 09e2b847fc fix(microblock): prevent microblocks becoming blood rune slabs (#47) 2026-06-21 09:20:32 +02:00
Dan faa052f70c fix npe on chunk unload when tile is null (#46) 2026-06-05 20:58:04 +02:00
Alexdoruandboubou19 15298cb677 [Memory-opti:fix leak] fix world client leak in renderer (#44)
Co-authored-by: boubou19 <[email protected]>
2026-04-30 11:18:51 +02:00
Alexdoru d3054211db [Memory-opti:fix leak] fix world client from keybind handler (#43) 2026-04-30 11:13:22 +02:00
UltraProdigy 2a5e2a150f Optimize Images & Workflow (#42) 2026-04-26 08:39:13 +02:00
Alexdoru 1a4edfbc89 fix world server leak (#41) 2026-04-14 14:48:23 +00:00
Woriveandgithub-actions[bot] a36120fc91 Add dynamic render option without relying on doesTick (#38)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-08 10:50:16 +01:00
Worive 238b041f12 Revert light value caching, applying better iteration to avoid null exceptions (#37) 2025-12-08 10:04:49 +01:00
Worive 0b0e99024d Optimize FMP Rendering and memory leaks (#35) 2025-12-06 12:07:08 +01:00
DarkShadow44 3c42abd7ac Allow y coordinates bigger 255 (#32) 2025-10-24 05:34:05 +00:00
Alexdoru f3a0ab0568 Delete DepLoader and declare depency properly (#31) 2025-08-01 00:42:50 +02:00
Caedis a0af5e19cf Force render return type to Unit (#30) 2025-07-02 01:16:53 +00:00
Martin Robertz 4fc6b9cff2 sa 2025-06-05 21:45:59 +02:00
Alexdoru d50ec43d76 Fix WorldClient leak (#28) 2025-06-03 12:52:09 -06:00
David Lindström 05eb683a33 Forward material to shader (#27) 2025-05-27 23:22:56 +02:00
Glease de264540d2 fix rare client world leak (#26) 2025-01-13 00:12:45 -06:00
Martin Robertz bc3542efd2 fix Instance() 2024-12-31 15:41:21 +01:00
glowredman 439243b00a Add Localization (#25) 2024-12-30 18:18:34 -06:00
Jason Mitchell 2abb775696 Thread saftey (#24)
* Update BS

* Thread Safety
2024-05-26 12:41:45 +02:00
glowredman 76a1df6eff Add version to @Mod annotations (#23) 2024-02-12 23:35:09 +01:00
bombcarandMartin Robertz f4a9610e22 Re-add dependencies.info corrected, update BS etc (#22)
* read corrected dependencies.info

* update bs, dependencies, and settings.gradle

---------

Co-authored-by: Martin Robertz <[email protected]>
2024-01-10 00:26:17 +01:00
bombcar 794c3ca030 fix the rest 2024-01-02 13:07:44 -06:00
bombcar ee37e779fd partial maintain state 2024-01-02 13:02:02 -06:00
bombcar 5039fb8984 update to support 1.2.0 CCL - needs work to be more performant 2024-01-02 11:38:11 -06:00
Roadhog360andMartin Robertz d336cfbb67 Fix ButtonPart.java crashes, tweaks to allow mods to hook it (#20)
* Fix ButtonPart.java crashes, tweaks to allow mods to hook it
`ButtonPart`:
- Rewrite `getBounds()` to use a list generated from the button hitbox itself, instead of being a hardcoded list. Then mods like Et Futurum Requiem which change buttons only have to mix to `metaSideMap` and `sideMetaMap`
  - This adds an access transformer to get the button hitbox states, which are ordinarily private.
- Change `placement` to check if the corresponding side's value in `sideMetaMap` is `-1` instead of a hardcoded side check, so top/bottom is still unplaceable unless mods add it.
`McSidedMetaPart.java`:
- Fix crash from out of bounds side values from meta (notably in this commit, `-1` from buttons) by making any value below 0 or above 5 return false.

* update bs+sa+gradle+deps

* backdate ccl mod

* derp

---------

Co-authored-by: Martin Robertz <[email protected]>
2023-12-31 16:40:51 +01:00
Ryan Nasers ce032ee9a8 Potential Fix to some FMP stuff relating to Redstone parts not connecting to bottoms of machines. (#18)
* BS Update and spotlessApply

* Forgot this bit

* Changing a line that I'm not actually sure if it will break things
2023-11-25 15:33:31 +01:00
rjnasers 75958e3892 BS Update and spotlessApply 2023-11-06 17:23:20 +01:00
miozune 2f6bd45e4f Update build (#16)
* Update build

* spotlessApply
2023-06-27 17:23:32 +09:00
Alexdoru 909643e9a2 spell block correct 2023-02-05 20:12:29 +01:00
Alexdoru aa631173a2 unbind key by default and move key to its own category "Forge Multipart" 2023-02-05 20:10:56 +01:00
Alexdoru e3bf9e3b79 missing localisation for keybind name 2023-02-05 20:09:44 +01:00
Jason Mitchell 6b18eca613 [ci skip] spotlessApply with the new settings 2023-01-29 10:24:12 -08:00
Raven Szewczyk 1ba2172e8a Fix wrong asm types being used for TypeInsnNodes 2023-01-19 17:12:21 +00:00