mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-13 00:47:52 +00:00
edd61363546f69a8677df52c2b15b9d5cb5ba79d
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.
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
Scala
85.4%
Java
14.6%