mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-13 00:47:52 +00:00
31ec83f91b0e2bbbebf5d6a74f1e0808f5422bfe
The first port free to change shape rather than preserve it: TileCache has zero downstream references in bytecode and does not appear in guidenh's reflective names. map() became a java.util.Map, add/remove became void, and apply returns a nullable FlaggedTile instead of a scala.Option. No internal caller used any of the discarded return values. Dropped TileCache$, TileCache$FlaggedTile$ and FlaggedTile's case-class machinery. It is only ever a map value, never compared, hashed, printed or destructured. findTile is unchanged, including the branch the reference obscures: its trailing 'case _ => null' is unreachable because Some(FlaggedTile(t, rem)) matches whatever the flag holds, so a tile flagged removed is returned like any other and only the warning is suppressed. That is pinned by a functional test written before the port. 114 plain-JVM tests and 13 Forge server tests pass; the only test change is the two-line adapter that stopped unwrapping a scala.Option.
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%