mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-18 11:29:33 +00:00
57130a6955b543b2400e45ce7762ff445e0cb03e
Replaces TFacePart.scala with a Java interface and retains the TFacePart$class bridge for OpenComputers, ProjRed and ProjectBlue. The interface is descriptor-identical to the reference; the bridge adds only a private constructor. This is the first converted trait where Java default methods are safe. TMultiPart declares neither solid nor redstoneConductionMap, and neither does anything in the microblock superclass chain, so there is no superclass method for a default to lose to. Both members therefore become real defaults rather than staying abstract with explicit forwarders, and no in-repo Scala needed changing. The rule for the remaining traits is to check that condition before choosing. A side effect is that Java classes can now inherit these members; McSidedMetaPart previously had to declare both just to accept the defaults, and stays descriptor-identical. Adds the first functional coverage of runtime class generation against a ported type. Microblock classes are built by ASM at run time, so the server suite now checks that a generated FaceMicroblock resolves the inherited default and that a generated HollowMicroblock still returns its own overrides. Validated with 43 plain-JVM tests, a clean build, and the Java 8 Forge dedicated-server suite at 3 tests.
ForgeMultipart
An API for dynamically handling different functional parts in the one block space.
Requirements:
- The latest version of CCL (files.minecraftforge.net/CodeChickenLib/)
- Forge
- A scala compatible IDE and project (For eclipse, download the scala eclipse plugin and right click on the project -> Add Scala Nature)
If you only want to use the API and not modify it:
- Download the latest dev version from files.minecraftforge.net/ForgeMultipart/
- Download the latest dev version of CCL.
- Place both mods in your /libs/ folder and link them as libraries in your IDE.
Implementation of all parts of the API should be clean and easy in Java. The minecraft multipart mod is implemented in java as a test case.
Languages
Java
98.7%
Scala
1.3%