mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-18 11:29:33 +00:00
d224ce116ddf8251b4dc22e09a5ed98f0ba90463
A Scala package object compiles to a class literally named 'package', and that is a Java keyword, so no Java source can declare or even name it. The characterization had to reach both through Class.forName, which is the argument in one line. There is no Java form to port to. Each held exactly one member, a logger alias for its proxy, so the indirection is inlined at its eight call sites: ConfigContent (7) and MultipartGenerator (1). The functional characterization asserted beforehand that each alias returned the very instance its proxy holds, so the substitution is an identity; both classes are descriptor-identical afterwards. Exactly four classes leave the jar and nothing else changes. No consumer referenced them, and no Java consumer could have. 120 plain-JVM tests and 22 Forge server tests pass. PackageObjectCharacterization went with its subject; ProxyLoggerFunctionalTest keeps the assertion worth having, that both proxies publish a logger during preInit.
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%