mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-19 11:59:08 +00:00
bde34454889aeb59f99a4263959d69c1a2f65af7
rayTraceAll was the one method the read-path cleanup restructured, moving from an indexed loop over a copied list to an iterator with a manual counter, and nothing covered it. The index it writes into ExtendedMOP.data is what reduceMOP hands back to every click, activate, harvest and pick block, so an off-by-one there would misroute interactions silently. Six tests pin the index production: a part that misses still consumes its index, sorting by distance happens after the indices are assigned, the part's own data is nested underneath rather than replaced, subHit keeps its default because data is assigned directly, and an index taken from a hit still selects the part that produced it. harvestPart's indexing and collisionRayTrace's nearest-or-null are covered alongside. All six also pass against the pre-cleanup implementation at 370b353^, which is the evidence that the restructure preserved behavior.
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%