mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-22 05:02:32 +00:00
bef35139fb43572563ac31c2433832d98118b71b
The fourth generated tile written directly in Java, and the first with both mutable state and inherited member access. The eight characterization tests pass unchanged, and the runtime interface keeps the exact thirteen methods. INeighborTileChange, the surface shipping jars link against, is byte-identical between the reference and ported dev jars, and no consumer references the removed $class or closure classes. Two transformer constraints turned up, both now in the handoff gotchas. registerJavaTrait rejects a trait with a non-empty InnerClasses attribute outright, so the anonymous AbstractFunction1 for the operate callback could not stay in the trait; it is a named class in the access shim. The shim's parameters are Object rather than the trait type. Typing them as the trait let javac elide the cast to TileMultipart, since the untransformed trait extends it, and the verifier then rejected the getfield once Forge rewrote the trait to an interface. TRedstoneTileAccess only escapes this because IRedstoneTile is unrelated to TileMultipart and forces a real checkcast.
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%