mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-19 11:59:08 +00:00
a1bf3c8c86e5693b77b581700689699edbe920f9
Replaces TNormalOcclusion.scala with Java implementations of the six types it held: NormalOcclusionTest, NormalOcclusionTest$, JNormalOcclusion, TNormalOcclusion, TNormalOcclusion$class and NormallyOccludedPart. The singleton and both interfaces are descriptor-identical to the reference; the other three add only private members. A frozen Scala consumer compiled against the reference jar still links through forwarder, $class, singleton and super accessor. Scala emits trait super accessors as ACC_SYNTHETIC, which javac hides entirely, so an abstract synthetic method cannot be implemented by any Java class or by Scala recompiled against a Java interface. codechicken$multipart$TNormalOcclusion$$super$occlusionTest is therefore a non-synthetic default returning true, the identity for the && chain the bridge builds. Method resolution ignores the flag, so existing call sites are unaffected. Both in-repo mixins needed work, in different ways. HollowMicroblock had no occlusionTest override and now declares one. PostMicroblock already had one ending in super.occlusionTest, which used to route through the trait and would now reach Microblock directly, silently dropping the box test; the same expression was substituted at that call site. Two further source-only divergences, both recorded: apply sugar on NormalOcclusionTest no longer compiles for Scala callers, and NormallyOccludedPart loses the scala.runtime.Null$ getType variant that Scala inferred for a null literal. No jar in the pack references either. Validated with 38 plain-JVM tests, a clean build, and the Java 8 Forge dedicated-server suite.
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%