Compare commits

..
1 Commits
Author SHA1 Message Date
Algent 6380087bab Follow up to java port #59 (#64) 2026-11-24 01:11:53 +01:00
24 changed files with 355 additions and 66 deletions

No files matched your search

+2 -1
View File
@@ -11,7 +11,8 @@ dependencies {
functionalTestImplementation("org.junit.platform:junit-platform-launcher") functionalTestImplementation("org.junit.platform:junit-platform-launcher")
functionalTestImplementation("org.junit.platform:junit-platform-reporting") functionalTestImplementation("org.junit.platform:junit-platform-reporting")
implementation("com.github.GTNewHorizons:CodeChickenCore:1.4.22:dev") // api: FMP's public types expose CCL/CCC classes, so consumers need CCC on their compile classpath.
api("com.github.GTNewHorizons:CodeChickenCore:1.4.22:dev")
compileOnly("com.cardinalstar.cubicchunks:CubicChunks1710:v0.1.22-alpha:dev") compileOnly("com.cardinalstar.cubicchunks:CubicChunks1710:v0.1.22-alpha:dev")
compileOnly("com.github.GTNewHorizons:Angelica:2.2.32:dev") compileOnly("com.github.GTNewHorizons:Angelica:2.2.32:dev")
runtimeOnlyNonPublishable("com.github.GTNewHorizons:Hodgepodge:2.7.216:dev") runtimeOnlyNonPublishable("com.github.GTNewHorizons:Hodgepodge:2.7.216:dev")
+17 -4
View File
@@ -1,8 +1,8 @@
# ForgeMultipart Java API # ForgeMultipart Java API
Start here when integrating with ForgeMultipart for **Minecraft 1.7.10 / Forge**. This describes the `algent/java` Start here when integrating with ForgeMultipart for **Minecraft 1.7.10 / Forge**. The Java API first shipped in
migration branch. Its new APIs are implemented and tested but do not yet have a minimum published dependency version. **FMP 2.0.0**; depend on that release or later (`com.github.GTNewHorizons:ForgeMultipart:2.0.0:dev`) and declare
Use a dev artifact containing the methods you need; source Javadocs are packaged with the sources artifact. `ForgeMultipart@[2.0.0,)`. Source Javadocs are packaged with the sources artifact.
Consumers can use the Java surface without importing Scala types. FMP itself still needs Scala at runtime. A Consumers can use the Java surface without importing Scala types. FMP itself still needs Scala at runtime. A
Scala-authored mod can adopt the Java API without converting the rest of its code to Java. Scala-authored mod can adopt the Java API without converting the rest of its code to Java.
@@ -68,7 +68,20 @@ compile classpath for overload resolution, as the [loading guide](api/PART_LOADI
| --- | --- | | --- | --- |
| Construct a server composite tile from parts, or restore saved multipart NBT | [MultipartHelper](../src/main/scala/codechicken/multipart/MultipartHelper.java): `createTileFromParts(Iterable)`, `createTileFromNBT(World, NBTTagCompound)` | | Construct a server composite tile from parts, or restore saved multipart NBT | [MultipartHelper](../src/main/scala/codechicken/multipart/MultipartHelper.java): `createTileFromParts(Iterable)`, `createTileFromNBT(World, NBTTagCompound)` |
| Register microblock materials | [MicroMaterialRegistry](../src/main/scala/codechicken/microblock/MicroMaterialRegistry.java) and [BlockMicroMaterial](../src/main/scala/codechicken/microblock/BlockMicroMaterial.java) | | Register microblock materials | [MicroMaterialRegistry](../src/main/scala/codechicken/microblock/MicroMaterialRegistry.java) and [BlockMicroMaterial](../src/main/scala/codechicken/microblock/BlockMicroMaterial.java) |
| Register generated tile traits or pass-through interfaces | [MultipartGenerator](../src/main/scala/codechicken/multipart/MultipartGenerator.java); see [custom tile-trait authoring](api/CUSTOM_TILE_TRAITS.md) and [safe capability access](api/TILE_TRAIT_ACCESS.md) | | Register generated tile traits or pass-through interfaces | [MultipartGenerator](../src/main/scala/codechicken/multipart/MultipartGenerator.java) (`registerPassThroughInterface(String)` for an interface a part implements that the tile should expose, e.g. WR-CBE's wireless interfaces); see [custom tile-trait authoring](api/CUSTOM_TILE_TRAITS.md) and [safe capability access](api/TILE_TRAIT_ACCESS.md) |
| Register a block/metadata microblock material under its default or an explicit name | [BlockMicroMaterial](../src/main/scala/codechicken/microblock/BlockMicroMaterial.java): `createAndRegister(Block, int)`, `createAndRegister(Block, int, String)`. The name is the saved material ID: keep it stable, or existing microblocks lose their material |
| Read a block material's icons for custom client rendering | [BlockMicroMaterial](../src/main/scala/codechicken/microblock/BlockMicroMaterial.java): `icont()` returns the per-side `MultiIconTransformation`; [GrassMicroMaterial](../src/main/scala/codechicken/microblock/GrassMicroMaterial.java): `sideIconT()` returns the tinted grass side overlay. Client-only in practice: both are filled by `loadIcons()` during the texture stitch and are null on a dedicated server. The first `icont()` read after a stitch re-resolves the block's icons; icons assigned with `icont_$eq` are kept as-is (UtilitiesInExcess's sphere renderer) |
| Restore a server tile from saved multipart NBT without touching the loading world | [TileMultipart](../src/main/scala/codechicken/multipart/TileMultipart.java): `createFromNBT(NBTTagCompound)`. Same as `MultipartHelper.createTileFromNBT(World, tag)` except that the helper also sets `MultipartSaveLoad.loadingWorld` first; use the helper when parts read that world in `load` |
| Read the world whose multipart NBT is being loaded, from a part's `load(NBTTagCompound)` | [MultipartSaveLoad](../src/main/scala/codechicken/multipart/handler/MultipartSaveLoad.java): static `loadingWorld()`. FMP sets it before loading a chunk's multipart tiles and in `createTileFromNBT`; the part isn't bound to a tile yet. It isn't cleared afterwards, so read it only during FMP-driven loading (ProjectRed's gate timers) |
| Get FMP's block and microblock item | [MultipartProxy](../src/main/scala/codechicken/multipart/handler/MultipartProxy.java): static `block()`; [MicroblockProxy](../src/main/scala/codechicken/microblock/handler/MicroblockProxy.java): static `itemMicro()` (saws: see [saw strength](api/SAW_STRENGTH.md)). Call these statics, not the `MultipartProxy$` / `MicroblockProxy$` companions |
| Pick and highlight a face-placement slot for a custom face part | [FacePlacementGrid](../src/main/scala/codechicken/microblock/FacePlacementGrid.java): static `getHitSlot(Vector3, int)` and client-only `render(Vector3, int)` (ProjectBlue's control panel) |
| Build a cuboid part, or a vanilla-style metadata part | Extend [JCuboidPart](../src/main/scala/codechicken/multipart/JCuboidPart.java) (subparts, collision boxes and breaking render from `getBounds`), or [McMetaPart](../src/main/scala/codechicken/multipart/minecraft/McMetaPart.java) / [McSidedMetaPart](../src/main/scala/codechicken/multipart/minecraft/McSidedMetaPart.java) |
| Make a custom multipart torch | Extend [TorchPart](../src/main/scala/codechicken/multipart/minecraft/TorchPart.java) through its no-argument (factory) and `(int meta)` (placement/conversion) constructors; override `getType()` (and `getBlock()` if it isn't the vanilla torch) and register your own factory for that ID. Metadata save/load and description bytes come from `McMetaPart`; write your own fields after calling `super`. Read the public `TorchPart.sideMetaMap` (attachment face → metadata, use `side ^ 1` for a clicked face) to pick the placement metadata, as FMP's own `TorchPart.placement` does; treat it as read-only because FMP shares it (Chisel's torches) |
| Shrink a part's render bounds around neighbouring microblocks | Implement [JMicroShrinkRender](../src/main/scala/codechicken/microblock/TMicroOcclusion.scala) (`getPriorityClass`, `getSlot`, `getSize`, `isTransparent`, `getBounds`) and call the static [MicroOcclusion](../src/main/scala/codechicken/microblock/MicroOcclusion.java)`.recalcBounds(part, renderBounds)` when neighbours change, with the part bound to its tile; it shrinks `renderBounds` in place against the microblocks in the tile's slots and returns the shrink mask (WR-CBE's base plates) |
| Read the standard bounds of a microblock shape | Static [FaceMicroClass](../src/main/scala/codechicken/microblock/FaceMicroClass.java)`.aBounds()` and the matching getters on `CornerMicroClass`, `EdgeMicroClass` and `PostMicroClass`; call the getter, then index the array (`aBounds()[0x10 \| side]`) |
| Query redstone power and connections through a part's side | Static [RedstoneInteractions](../src/main/scala/codechicken/multipart/RedstoneInteractions.java)`.getPowerTo(TMultiPart, int)` / `getPowerTo(World, x, y, z, side, mask)` and `connectionMask(TMultiPart, int)` (ProjectRed, WR-CBE) |
| Emit display particles, or expose masked redstone connections | Implement [IRandomDisplayTick](../src/main/scala/codechicken/multipart/IRandomDisplayTick.java) or [IMaskedRedstonePart](../src/main/scala/codechicken/multipart/IMaskedRedstonePart.java) on the part |
| Test whether a part is a microblock | `instanceof` [Microblock](../src/main/scala/codechicken/microblock/Microblock.java), which every built-in shape extends. `CommonMicroblock` is still a retained Scala trait; prefer `Microblock` unless you need `getSlot()` |
New API examples use Java 8 language/library features. The source path `src/main/scala` also contains Java classes New API examples use Java 8 language/library features. The source path `src/main/scala` also contains Java classes
because of the current joint-compilation layout; it does not imply that those APIs require Scala source in a consumer. because of the current joint-compilation layout; it does not imply that those APIs require Scala source in a consumer.
+8 -3
View File
@@ -31,7 +31,7 @@ Source compiled against the untransformed dev jar is the problem. `javac` and `s
**The fix is to target the stable capability interface instead of the raw dev-jar class.** Note the package: the **The fix is to target the stable capability interface instead of the raw dev-jar class.** Note the package: the
types that break are in `codechicken.multipart.scalatraits`, the replacements are not. The existing types that break are in `codechicken.multipart.scalatraits`, the replacements are not. The existing
`IRedstoneTile.openConnections` and `TileMultipart.partMap` contracts work on both old and new FMP; the new `IRedstoneTile.openConnections` and `TileMultipart.partMap` contracts work on both old and new FMP; the new
`TileMultipart.refreshPartSlots` requires an FMP release containing the Java API. `TileMultipart.refreshPartSlots` requires FMP 2.0.0 or later, the first release containing the Java API.
| Instead of | Use | | Instead of | Use |
| --- | --- | | --- | --- |
@@ -52,7 +52,8 @@ Confirmed still present on each project's default branch:
| ProjectRed | `transmission/redwires.scala` | `TRedstoneTile.openConnections` | | ProjectRed | `transmission/redwires.scala` | `TRedstoneTile.openConnections` |
| OpenComputers | `integration/fmp/PrintPart.scala` | `TSlottedTile.v_partMap` | | OpenComputers | `integration/fmp/PrintPart.scala` | `TSlottedTile.v_partMap` |
`TTileChangeTile`, `TFluidHandlerTile` and `TRandomDisplayTickTile` have no known consumer references. Migrated source patches for both exist (targeting `IRedstoneTile` and `refreshPartSlots`), but neither is released
yet. `TTileChangeTile`, `TFluidHandlerTile` and `TRandomDisplayTickTile` have no known consumer references.
## 2. Silent behavior changes: recompiled Scala trait composition ## 2. Silent behavior changes: recompiled Scala trait composition
@@ -69,12 +70,16 @@ Where the implementation is now an interface default, forward explicitly:
| --- | --- | | --- | --- |
| `TCuboidPart` | Extend `JCuboidPart`, or forward subparts, collision boxes and breaking rendering to its statics | | `TCuboidPart` | Extend `JCuboidPart`, or forward subparts, collision boxes and breaking rendering to its statics |
| `TNormalOcclusion` | Combine `NormalOcclusionTest.apply(this, other)` with the intended super chain explicitly. Audit existing `super.occlusionTest` calls: they no longer route through the old trait | | `TNormalOcclusion` | Combine `NormalOcclusionTest.apply(this, other)` with the intended super chain explicitly. Audit existing `super.occlusionTest` calls: they no longer route through the old trait |
| `TIconHitEffects` | Forward `addHitEffects` and `addDestroyEffects` to `IconHitEffects` | | `TIconHitEffects` | Override `addHitEffects(hit, renderer)` → `IconHitEffects.addHitEffects(this, hit, renderer)` and the two-argument `addDestroyEffects(hit, renderer)` → `IconHitEffects.addDestroyEffects(this, renderer)`. Don't override the deprecated one-argument `addDestroyEffects(renderer)`, even though the old trait did |
| `TItemMultiPart` | Forward `onItemUse` to `JItemMultiPart`; the inherited `Item` method otherwise wins | | `TItemMultiPart` | Forward `onItemUse` to `JItemMultiPart`; the inherited `Item` method otherwise wins |
| `TRandomUpdateTick` | Implement `onWorldJoin` as `TickScheduler.loadRandomTick(this)` | | `TRandomUpdateTick` | Implement `onWorldJoin` as `TickScheduler.loadRandomTick(this)` |
| `TScheduledPacketPart` | Forward `read` to `TScheduledPacketPart.readMask(this, packet)` | | `TScheduledPacketPart` | Forward `read` to `TScheduledPacketPart.readMask(this, packet)` |
| `ScratchBitSet` | Implement both methods and the storage accessors, and initialize storage explicitly | | `ScratchBitSet` | Implement both methods and the storage accessors, and initialize storage explicitly |
`TFacePart`, `TEdgePart`, `TSlottedPart`, `IRedstonePart` and `Saw` need no forwarder: `TMultiPart` and `Item` don't
declare their methods, so the interface defaults apply. Where FMP has a deprecated overload, forward the
non-deprecated one.
Previously compiled calls into **retained** `$class` bridges still link; this applies only to recompilation. Previously compiled calls into **retained** `$class` bridges still link; this applies only to recompilation.
## 3. Compile errors: Scala source syntax ## 3. Compile errors: Scala source syntax
+18 -2
View File
@@ -23,8 +23,24 @@ only Java API types. Keep this code in a client integration class because `Multi
The helper accepts only a `savedMultipart` tag with at least one supported part. It preserves part order, loads each The helper accepts only a `savedMultipart` tag with at least one supported part. It preserves part order, loads each
part from its original tag, generates the required client tile traits, restores tile coordinates and NBT state, and part from its original tag, generates the required client tile traits, restores tile coordinates and NBT state, and
binds the parts. With a client world it then calls `onWorldJoin`, broadcasts a local part change, marks the render and binds the parts. With a client world it then calls `onWorldJoin`, broadcasts a local part change, marks the render and
rebuilds the client render cache. With a null world it creates a worldless staged preview; render caches initialize rebuilds the client render cache. With a null world it creates a worldless staged preview that only loads and binds
lazily. its parts: no `onWorldJoin` or `onPartChanged` callbacks run, since parts may assume a world there. Stock microblocks
(covers, hollow covers, strips, corners and posts) normally compute their client render bounds in those callbacks, so
the helper recalculates them directly; this needs only the bound tile and gives the same bounds as a world-backed part
change. Render caches initialize lazily.
Other mods' parts get no such initialization, and attaching a world afterwards does not run the skipped callbacks.
A part whose client render state is built only in `onAdded`, `onWorldJoin` or `onPartChanged` (WR-CBE's transmitter
base bounds, for example) should build it on first render when it is still missing. If that is not possible, return
null from `createPartForClientPreview`: the factory cannot tell whether a world will be supplied, so this leaves the
whole tile out of every preview instead of failing while it renders.
Part `load(tag)` runs before any world is attached, with whatever `MultipartSaveLoad.loadingWorld()` last held. A
part that reads it while loading (ProjectRed's active timer gates) sees a stale world, or null on a client connected
to a remote server, where the resulting exception propagates and drops the tile. FMP 2.0.0 behaves the same way.
Use this helper only for client-side previews. Server-thread work, such as rebuilding tiles while saving in an
integrated server, should use `TileMultipart.createFromNBT` even on a physical client.
A non-null world must have `isRemote == true`. The helper does not validate placement, install the tile in a chunk, A non-null world must have `isRemote == true`. The helper does not validate placement, install the tile in a chunk,
notify neighbors, recalculate lighting or send packets. It reads the supplied NBT without mutating it. notify neighbors, recalculate lighting or send packets. It reads the supplied NBT without mutating it.
+11 -6
View File
@@ -68,17 +68,22 @@ unchanged for existing releases.
GuideNH's promotion recreates the source family and material on the client, then copies the encoded shape byte. GuideNH's promotion recreates the source family and material on the client, then copies the encoded shape byte.
The [compiling Java example](../../src/functionalTest/java/codechicken/multipart/examples/MicroblockCreationExample.java) The [compiling Java example](../../src/functionalTest/java/codechicken/multipart/examples/MicroblockCreationExample.java)
implements that core-data policy through `setShape(size, slot)`, preserving all eight shape bits. `getShape()` alone implements that core-data policy by copying the raw byte with `shape_$eq(source.shape())`, preserving all eight
is only the slot nibble, while `shape()` returns the complete byte. The example leaves source bindings untouched and shape bits for every microblock family. `shape()` returns the complete byte; `getSize()` is its high nibble and
returns an unbound replacement. It is not a clone of arbitrary custom-part state or a shape-validity check. `getShape()` the stored low nibble. The example leaves source bindings untouched and returns an unbound replacement.
It is not a clone of arbitrary custom-part state or a shape-validity check.
Do not copy a shape with `setShape(getSize(), getShape())`. Its `slot` argument is the absolute `PartMap` slot (the value
`getSlot()` returns), not the stored nibble. Corner and edge microblocks (nooks and strips) override `setShape` to
subtract their slot offset (7 and 15), so that round trip corrupts them. Faces, hollow covers and posts use the base
encoding (posts store an axis index, not a `PartMap` slot), which hides the mistake.
The example captures factory, material and shape before construction. Current GuideNH reads the source shape after The example captures factory, material and shape before construction. Current GuideNH reads the source shape after
creation; material callbacks can have side effects, so that ordering can copy a callback-modified value. Preserve or creation; material callbacks can have side effects, so that ordering can copy a callback-modified value. Preserve or
explicitly validate that policy when migrating custom materials. explicitly validate that policy when migrating custom materials.
Public `setShape` uses the virtual shape setter; current GuideNH already calls `shape_$eq` directly, while its older `shape_$eq` is the public virtual shape setter; current GuideNH already calls it directly, while its older
private-field write bypassed that dispatch. Validate private-field write bypassed that dispatch. Validate custom traits overriding it before adopting the change. Preserve its existing missing/failed-promotion
custom traits overriding these hooks before adopting the change. Preserve its existing missing/failed-promotion
handling, part order, Java collection migration, tile state setup and subsequent loading/notifications. Do not copy handling, part order, Java collection migration, tile state setup and subsequent loading/notifications. Do not copy
the source tile binding to the new part. Private material-field access has a separate [typed query guide](MATERIAL_ACCESS.md). the source tile binding to the new part. Private material-field access has a separate [typed query guide](MATERIAL_ACCESS.md).
+3 -2
View File
@@ -11,8 +11,9 @@ method-specific guides linked from the API index.
inherited traits, companion objects, `$class` helpers and private fields. inherited traits, companion objects, `$class` helpers and private fields.
- [ ] Preserve published part/material IDs, NBT keys and packet field order unless the change includes an explicit data - [ ] Preserve published part/material IDs, NBT keys and packet field order unless the change includes an explicit data
migration or protocol break. migration or protocol break.
- [ ] Identify the exact FMP artifact used to compile and run. New Java APIs on `algent/java` have no minimum published - [ ] Identify the exact FMP artifact used to compile and run. The Java API first shipped in FMP 2.0.0; require
version yet; require a release that actually contains every method used. `ForgeMultipart@[2.0.0,)` (or a later release containing every method used) in the mod's dependency declaration or,
for optional integrations, in the version check that gates the compatibility class.
- [ ] If FMP is optional, keep FMP-typed code in a compatibility class loaded only after checking mod presence and a - [ ] If FMP is optional, keep FMP-typed code in a compatibility class loaded only after checking mod presence and a
supported version. Keep FMP types out of classes loaded unconditionally. supported version. Keep FMP types out of classes loaded unconditionally.
+4
View File
@@ -71,6 +71,10 @@ factory results or promise that a later NBT/packet will be accepted.
- `IPartFactory` or Scala `(String, Boolean) => TMultiPart` callers: implement `IPartFactory2`; route the NBT method to - `IPartFactory` or Scala `(String, Boolean) => TMultiPart` callers: implement `IPartFactory2`; route the NBT method to
the old constructor with `false` and the packet method with `true`. Keep any side-specific class selection. A factory the old constructor with `false` and the packet method with `true`. Keep any side-specific class selection. A factory
that ignores the old Boolean, such as ForgeRelocationFMP's frame factory, can construct the same part class in both. that ignores the old Boolean, such as ForgeRelocationFMP's frame factory, can construct the same part class in both.
**Also override `createPartForClientPreview` to return the client part** (the old constructor with `true`). The legacy
adapter answered client-preview requests that way, while the `IPartFactory2` default returns null, which drops the
part, and with it the whole tile, from Schematica/GuideNH previews. Worldless previews run no part callbacks, so
check that the part can render without them; see the [client preview contract](CLIENT_PREVIEW.md#reconstruction-contract).
- Keep [converter registration](BLOCK_CONVERTERS.md) and trait registration separate. This change neither replaces `registerConverter` nor - Keep [converter registration](BLOCK_CONVERTERS.md) and trait registration separate. This change neither replaces `registerConverter` nor
completes ProjectRed's external microblock trait migration or Schematica's private registry-map migration. completes ProjectRed's external microblock trait migration or Schematica's private registry-map migration.
+7 -4
View File
@@ -38,10 +38,13 @@ The setter changes only cutting strength. It does not recalculate the saw's dura
damage. This matches Iguana's current post-construction field mutation. The integer is intentionally unrestricted, damage. This matches Iguana's current post-construction field mutation. The integer is intentionally unrestricted,
like the constructor and legacy field; the consumer owns its tier mapping. like the constructor and legacy field; the consumer owns its tier mapping.
FMP calculates `MicroMaterialRegistry.getMaxCuttingStrength()` once during ForgeMicroblock post-initialization. FMP calculates `MicroMaterialRegistry.getMaxCuttingStrength()` during ForgeMicroblock post-initialization and, since
Startup integrations that add or relevel saws must finish first so the cached maximum sees the final tiers. Iguana's FMP 2.0.1, again on `FMLLoadCompleteEvent`, after every mod's post-init. With 2.0.1 or later, startup integrations that
optional ordering should therefore include `before:ForgeMicroblock` while retaining its existing FMP presence gate. add or relevel saws only have to finish within their own post-init (Iguana's `after:*` post-init qualifies); depend on
Call the setter on the main initialization thread, before recipes can be used. `ForgeMultipart@[2.0.1,)` when relying on this. FMP 2.0.0 calculates it only in its own post-init. Don't add
`before:ForgeMicroblock` for this: combined with `after:*` it makes FML's mod sorter fail with a
`ModSortingException`. `MicroRecipe.canCut` is the only reader of the cached maximum and only runs when crafting. Call
the setter on the main initialization thread, before recipes can be used.
The method is specific to `ItemSaw`. Other `Saw` implementations may derive strength from each `ItemStack` and do The method is specific to `ItemSaw`. Other `Saw` implementations may derive strength from each `ItemStack` and do
not promise mutable global strength. not promise mutable global strength.
+39 -25
View File
@@ -341,7 +341,7 @@ performed.
| Checkout | Inspected HEAD | 2026-09-21 HEAD | | Checkout | Inspected HEAD | 2026-09-21 HEAD |
| --- | --- | --- | | --- | --- | --- |
| AE2FluidCraft-Rework | `c7ec5b0c8b5f` | `6e8dd013bd4e` | | AE2FluidCraft-Rework | `c7ec5b0c8b5f` | `6e8dd013bd4e` |
| Applied-Energistics-2-Unofficial | `c690fbc273be` | `fdedc3a8f023` | | Applied-Energistics-2-Unofficial (deprecated after 2.9.x; AE2-NH is the target) | `c690fbc273be` | `fdedc3a8f023` |
| BiomesOPlenty | `fc7f1f6392a1` | same | | BiomesOPlenty | `fc7f1f6392a1` | same |
| BloodArsenal | `890824be106a` | same | | BloodArsenal | `890824be106a` | same |
| BloodMagic | `10a36f6413b8` | `6776676ef209` | | BloodMagic | `10a36f6413b8` | `6776676ef209` |
@@ -374,7 +374,7 @@ performed.
| Contract | Consumers that make it load-bearing | What must survive | | Contract | Consumers that make it load-bearing | What must survive |
| --- | --- | --- | | --- | --- | --- |
| Part factory/converter registration | ProjectRed, Extra Utilities, OpenComputers, AE2, BuildCraftCompat, ForgeRelocationFMP, Chisel, ThaumicTinkerer, WR-CBE, WitchingGadgets, ProjectBlue, UtilitiesInExcess | Java `IPartFactory`/`IPartFactory2`, converters, the Scala `Function2` and `Seq` overloads, stable type strings, client/server construction | | Part factory/converter registration | ProjectRed, Extra Utilities, OpenComputers, AE2, BuildCraftCompat, ForgeRelocationFMP, Chisel, ThaumicTinkerer (unreachable since 2023), WR-CBE, WitchingGadgets, ProjectBlue, UtilitiesInExcess | Java `IPartFactory`/`IPartFactory2`, converters, the Scala `Function2` and `Seq` overloads, stable type strings, client/server construction |
| Dynamic composite tiles | ProjectRed, Extra Utilities, AE2, ForgeRelocationFMP, WR-CBE, WitchingGadgets, UtilitiesInExcess; GuideNH and Schematica reconstruct them | Trait-bit selection, generated subclass caching, pass-through interfaces, client/server selection, promotion of an existing tile | | Dynamic composite tiles | ProjectRed, Extra Utilities, AE2, ForgeRelocationFMP, WR-CBE, WitchingGadgets, UtilitiesInExcess; GuideNH and Schematica reconstruct them | Trait-bit selection, generated subclass caching, pass-through interfaces, client/server selection, promotion of an existing tile |
| External Scala trait generation | ProjectRed illuminated microblocks | `MicroblockGenerator.registerTrait`, ScalaSignature decoding, `$class` helper handling, correct trait initialization and dispatch | | External Scala trait generation | ProjectRed illuminated microblocks | `MicroblockGenerator.registerTrait`, ScalaSignature decoding, `$class` helper handling, correct trait initialization and dispatch |
| Tile collections and slot state | ProjectRed, Extra Utilities, OpenComputers, AE2, ProjectBlue, GT5U, BuildCraftCompat, WitchingGadgets, MatterManipulator, GuideNH | `partList(): Seq`, `jPartList(): List`, ordering, `partMap(int)`, mutable `TSlottedTile.v_partMap`, `bindPart`, slot-map rebuilds | | Tile collections and slot state | ProjectRed, Extra Utilities, OpenComputers, AE2, ProjectBlue, GT5U, BuildCraftCompat, WitchingGadgets, MatterManipulator, GuideNH | `partList(): Seq`, `jPartList(): List`, ordering, `partMap(int)`, mutable `TSlottedTile.v_partMap`, `bindPart`, slot-map rebuilds |
@@ -425,11 +425,12 @@ trait linearization, tile and microblock code generation, redstone tile traits,
and the micro-material system. A launch-only smoke test is inadequate; illuminated microblocks, gates, face/framed and the micro-material system. A launch-only smoke test is inadequate; illuminated microblocks, gates, face/framed
wires, and routed pipes need functional fixtures. wires, and routed pipes need functional fixtures.
### Extra Utilities 1.2.12 - active supported consumer ### Extra Utilities 1.2.12 - dropped from the target pack
Extra Utilities remains in the supported compatibility target. UtilitiesInExcess is its intended replacement; Decision: Extra Utilities is dropped, not patched (it is closed source); UtilitiesInExcess replaces it, and its own
approval to switch that target and adoption of the replacement in the pack are still pending. Preserve the current FMP migration is prepared. Keep the APIs and saved-data behavior below only until Extra Utilities and Hodgepodge's
consumer's required APIs, saved-data behavior and integration coverage until both gates pass. Extra Utilities mixins are confirmed absent from the target pack; that is a Scala-removal gate. This section records
what the old mod used.
Required compatibility spans several FMP subsystems: Required compatibility spans several FMP subsystems:
@@ -452,8 +453,8 @@ The jar is sufficient to establish behavior, while the exact JAR's constant pool
names and descriptors. Obfuscated Minecraft method names should not be treated as source-quality naming evidence. names and descriptors. Obfuscated Minecraft method names should not be treated as source-quality naming evidence.
**Migration consequence:** Extra Utilities covers almost every Java-facing extension seam and is the strongest test **Migration consequence:** Extra Utilities covers almost every Java-facing extension seam and is the strongest test
that Java wrappers still compose into the same generated tile. UtilitiesInExcess does not make this compatibility that Java wrappers still compose into the same generated tile. The burden ends when the old mod is out of the target
burden disappear until existing worlds and the old mod have been retired. pack; UtilitiesInExcess's world conversion carries existing Extra Utilities parts and material names forward.
### OpenComputers - generated slot state is part of the effective API ### OpenComputers - generated slot state is part of the effective API
@@ -561,11 +562,14 @@ state, constructors, packet/NBT hooks, and static orientation tables source- and
### ThaumicTinkerer ### ThaumicTinkerer
ThaumicTinkerer registers block micro-materials and factories/converters for candle and nitor parts. The parts extend ThaumicTinkerer's only live FMP use is block micro-material registration: `new BlockMicroMaterial(block, meta)` plus
`McMetaPart`; the candle participates in random display ticks. They rely on FMP meta-part persistence, placement, `MicroMaterialRegistry.registerMaterial(material, name)`, with names `<unlocalizedName>` for meta 0 and
render hooks, and factory type dispatch. `<unlocalizedName>_<meta>` otherwise. Its candle and nitor parts (`RegisterBlockPart`, `PartCandle`, `PartNitor`, which
extend `McMetaPart`) are still in the jar, so the binary inventory lists their `IPartFactory`/`IPartConverter` and
`McMetaPart` references. But nothing has registered them since ThaumicTinkerer `acbc864d` (2023), so they are dead code.
**Migration consequence:** preserve `McMetaPart` subclass semantics and random-display capability composition. **Migration consequence:** keep material names stable. The part classes never run, so they need no runtime
compatibility; the migrated release still moved them to `IPartFactory2`.
### Wireless Redstone CBE ### Wireless Redstone CBE
@@ -768,40 +772,48 @@ persistent identity. Preserve:
- remap behavior for renamed materials; - remap behavior for renamed materials;
- `writeMaterialID`/`readMaterialID` wire agreement; - `writeMaterialID`/`readMaterialID` wire agreement;
- `materialName`/`materialID` round trips; - `materialName`/`materialID` round trips;
- the legacy `getIdMap(): scala.Tuple2[]` view until Extra Utilities and UtilitiesInExcess are migrated. - the legacy `getIdMap(): scala.Tuple2[]` view until Extra Utilities is out of the target pack (UtilitiesInExcess's
migration no longer uses it).
## Java API adoption ledger ## Java API adoption ledger
This ledger tracks migration of a specific legacy contract, not completion of an entire consumer's migration. This ledger tracks migration of a specific legacy contract, not completion of an entire consumer's migration.
Factory registration/lookup, material enumeration, tile collection/traversal access, tile loading/storage assignment, Factory registration/lookup, material enumeration, tile collection/traversal access, tile loading/storage assignment,
client preview reconstruction, tile occlusion and box queries, render-ID accessors, named tile conversion results and client preview reconstruction, tile occlusion and box queries, render-ID accessors, named tile conversion results and
the struck-part index and inventory slot refresh are implemented on the struck-part index and inventory slot refresh shipped in FMP 2.0.0, the minimum dependency for every replacement
`algent/java`. The [API index](../API.md) links the guides and compiling Java examples. These additions are not yet below. The [API index](../API.md) links the guides and compiling Java examples. Unlisted contracts remain governed by
tied to a released minimum dependency version. Unlisted contracts remain governed by the inventories above. the inventories above.
**Consumer status (2026-11-18):** source patches against FMP 2.0.0 are prepared, but not yet submitted or released,
for every consumer named below except Extra Utilities (dropped): ProjectRed, OpenComputers, ForgeRelocationFMP, AE2-NH,
GuideNH, Schematica, Et Futurum Requiem, IguanaTweaksTConstruct, GT5U and UtilitiesInExcess. AE2 is migrated in
AE2-NH only; AE2-Unofficial is deprecated after 2.9.x and won't be in the target pack. The per-row migration column
below still describes each contract before its patch; update it with the PR or first released version, and the
adoption column only with actual pack artifacts.
| Legacy contract | Consumer and inspected source | Supported replacement | Consumer migration/release | Target-pack adoption and removal gate | | Legacy contract | Consumer and inspected source | Supported replacement | Consumer migration/release | Target-pack adoption and removal gate |
| --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- |
| `ButtonPart.sideMetaMap[side ^ 1]` live inverse lookup | ProjectRed `e173952e96a4` and separate preparatory migration checkout: `illumination/items.scala`, `ItemPartButtonCommons.newPart` | `ButtonPart.metaForSide(side ^ 1)`; [lookup contract](../api/BUTTON_ORIENTATIONS.md#reading-orientation-metadata) | FMP accessor/example and regression coverage added; consumer replacement requires a rebuilt FMP artifact; preparatory migration is not upstream adoption | Retain the array until ProjectRed and Et Futurum migrations are released/adopted and a fresh scan clears legacy use | | `ButtonPart.sideMetaMap[side ^ 1]` live inverse lookup | ProjectRed `e173952e96a4` and separate preparatory migration checkout: `illumination/items.scala`, `ItemPartButtonCommons.newPart` | `ButtonPart.metaForSide(side ^ 1)`; [lookup contract](../api/BUTTON_ORIENTATIONS.md#reading-orientation-metadata) | FMP accessor/example and regression coverage added; consumer replacement requires a rebuilt FMP artifact; preparatory migration is not upstream adoption | Retain the array until ProjectRed and Et Futurum migrations are released/adopted and a fresh scan clears legacy use |
| `TRedstoneTile.openConnections(int)` | ProjectRed `e173952e96a4`: `transmission/redwires.scala` | Existing stable `IRedstoneTile.openConnections(int)` with the same mask/rotation logic; [guide](../api/TILE_TRAIT_ACCESS.md) | FMP source-access example and Forge coverage complete; consumer source patch/release pending | Retain the old runtime interface descriptor until adoption | | `TRedstoneTile.openConnections(int)` | ProjectRed `e173952e96a4`: `transmission/redwires.scala` | Existing stable `IRedstoneTile.openConnections(int)` with the same mask/rotation logic; [guide](../api/TILE_TRAIT_ACCESS.md) | FMP source-access example and Forge coverage complete; consumer source patch/release pending | Retain the old runtime interface descriptor until adoption |
| `TSlottedTile.v_partMap()` array mutation | OpenComputers `2c00f79be24b`: `PrintPart.toggleState` | `TileMultipart.refreshPartSlots(part)`; [equality, cache and notification contract](../api/TILE_TRAIT_ACCESS.md#refreshing-a-changed-slot-mask) | FMP API/example complete; consumer source patch/release pending, preserving validation and following sound/notify/packet/schedule order | Keep the live array/accessor ABI until released pack adoption; do not replace it with reflection or a whole-tile reload | | `TSlottedTile.v_partMap()` array mutation | OpenComputers `2c00f79be24b`: `PrintPart.toggleState` | `TileMultipart.refreshPartSlots(part)`; [equality, cache and notification contract](../api/TILE_TRAIT_ACCESS.md#refreshing-a-changed-slot-mask) | FMP API/example complete; consumer source patch/release pending, preserving validation and following sound/notify/packet/schedule order | Keep the live array/accessor ABI until released pack adoption; do not replace it with reflection or a whole-tile reload |
| `TIInventoryTile.rebuildSlotMap()` raw trait call | AE2 `c690fbc273be`: `appeng/fmp/CableBusPart.notifyNeighbors` | `TileMultipart.refreshInventorySlots()`, a no-op without inventory parts, so the `instanceof` guard can go; [mapping and scope](../api/TILE_TRAIT_ACCESS.md#refreshing-inventory-slots) | FMP API, example and regression coverage complete; consumer source patch and release pending, keeping its neighbor notification afterward | Keep the `TIInventoryTile` interface and `rebuildSlotMap` until released pack adoption | | `TIInventoryTile.rebuildSlotMap()` raw trait call | AE2 (inspected in AE2-Unofficial `c690fbc273be`; migrated in AE2-NH): `appeng/fmp/CableBusPart.notifyNeighbors` | `TileMultipart.refreshInventorySlots()`, a no-op without inventory parts, so the `instanceof` guard can go; [mapping and scope](../api/TILE_TRAIT_ACCESS.md#refreshing-inventory-slots) | FMP API, example and regression coverage complete; consumer source patch and release pending, keeping its neighbor notification afterward | Keep the `TIInventoryTile` interface and `rebuildSlotMap` until released pack adoption |
| External Scala `LightMicroblock` registered through `MicroblockGenerator.registerTrait` | ProjectRed `e173952e96a4`: `illumination/lightmicroblocks.scala` | Java source trait registered by name, `IGeneratedMaterial`, typed sibling traversal and halo helper; [example](../api/MICROBLOCK_EXTENSIONS.md) | FMP example tested; consumer rewrite/release, existing config/halo wiring and physical-client checks pending | Retain external Scala trait ingestion until released-consumer adoption and internal Scala-trait removal | | External Scala `LightMicroblock` registered through `MicroblockGenerator.registerTrait` | ProjectRed `e173952e96a4`: `illumination/lightmicroblocks.scala` | Java source trait registered by name, `IGeneratedMaterial`, typed sibling traversal and halo helper; [example](../api/MICROBLOCK_EXTENSIONS.md) | FMP example tested; consumer rewrite/release, existing config/halo wiring and physical-client checks pending | Retain external Scala trait ingestion until released-consumer adoption and internal Scala-trait removal |
| `MultiPartRegistry$.registerParts(IPartFactory2, Seq)` and existing array calls | ProjectRed `e173952e96a4`: transmission, expansion and fabrication proxies | `MultiPartRegistry.registerPartFactory` with existing `IPartFactory2` methods and unchanged IDs | Source patch and release pending; Boolean-factory proxies separately need the two-method adapter described in the guide | No migrated pack version verified; retain all registration bridges and external trait support | | `MultiPartRegistry$.registerParts(IPartFactory2, Seq)` and existing array calls | ProjectRed `e173952e96a4`: transmission, expansion and fabrication proxies | `MultiPartRegistry.registerPartFactory` with existing `IPartFactory2` methods and unchanged IDs | Source patch and release pending; Boolean-factory proxies separately need the two-method adapter described in the guide | No migrated pack version verified; retain all registration bridges and external trait support |
| `MultiPartRegistry$.registerParts(Function2, Seq)` | ForgeRelocationFMP `49a810b8c63b`: proxy init registering `rfmp_frame` | `IPartFactory2` creating a fresh `FramePart` on both paths, registered through `registerPartFactory` | Source patch and release pending; preserve `rfmp_frame` and keep converter/pass-through registration | No migrated pack version verified; retain the function companion descriptor | | `MultiPartRegistry$.registerParts(Function2, Seq)` | ForgeRelocationFMP `49a810b8c63b`: proxy init registering `rfmp_frame` | `IPartFactory2` creating a fresh `FramePart` on both paths, registered through `registerPartFactory` | Source patch and release pending; preserve `rfmp_frame` and keep converter/pass-through registration | No migrated pack version verified; retain the function companion descriptor |
| `MicroMaterialRegistry.getIdMap(): scala.Tuple2[]` | UtilitiesInExcess `3e107a1fe9bc15fcb6a808242ffda1354dac7c3a`: `FMPRecipeLoader.run`, `UEMultipartItem.getSubItems` | `materialCount()` with `materialName(int)` and, when needed, `getMaterial(int)` | Source patch and first released version pending; checkout used as reference only | No migrated pack version verified; retain the bridge | | `MicroMaterialRegistry.getIdMap(): scala.Tuple2[]` | UtilitiesInExcess `3e107a1fe9bc15fcb6a808242ffda1354dac7c3a`: `FMPRecipeLoader.run`, `UEMultipartItem.getSubItems` | `materialCount()` with `materialName(int)` and, when needed, `getMaterial(int)` | Source patch and first released version pending; checkout used as reference only | No migrated pack version verified; retain the bridge |
| `MicroMaterialRegistry.getIdMap(): scala.Tuple2[]` | Extra Utilities 1.2.12, active supported consumer: NEI and microblock material enumeration | Same ID-based Java enumeration | Keep current compatibility; switching support to UtilitiesInExcess awaits approval and pack adoption | Verify Extra Utilities is absent and its replacement uses the new API before retiring this dependency | | `MicroMaterialRegistry.getIdMap(): scala.Tuple2[]` | Extra Utilities 1.2.12 (dropped, not patched): NEI and microblock material enumeration | Same ID-based Java enumeration | None: replaced by UtilitiesInExcess, whose migration uses the Java enumeration | Verify Extra Utilities is absent from the target pack before retiring this dependency |
| `TileMultipart.partList(): scala.collection.Seq` | ProjectRed `e173952e96a4`: illumination aggregation, packet indices and rendered-part lookup | `jPartList()` with unchanged indices, filters and aggregation | Source patch and release pending; Scala consumer code may remain Scala | No migrated pack version verified; retain the getter and external trait support | | `TileMultipart.partList(): scala.collection.Seq` | ProjectRed `e173952e96a4`: illumination aggregation, packet indices and rendered-part lookup | `jPartList()` with unchanged indices, filters and aggregation | Source patch and release pending; Scala consumer code may remain Scala | No migrated pack version verified; retain the getter and external trait support |
| `TileMultipart.partList(): scala.collection.Seq` | OpenComputers `2c00f79be24b`: cable/print/network searches and aggregation | `jPartList()` with the same search/aggregation semantics | Source patch and release pending | No migrated pack version verified; retain the getter | | `TileMultipart.partList(): scala.collection.Seq` | OpenComputers `2c00f79be24b`: cable/print/network searches and aggregation | `jPartList()` with the same search/aggregation semantics | Source patch and release pending | No migrated pack version verified; retain the getter |
| `TileMultipart.partList(): scala.collection.Seq` | AE2 `fdedc3a8f023`: `FMPPlacementHelper.getPart` and `removePart` | Iterate `jPartList()`; retain last-match lookup and removal/break behavior | Source patch and release pending; September host-binding fix does not migrate traversal | No migrated pack version verified; retain the getter | | `TileMultipart.partList(): scala.collection.Seq` | AE2 (inspected in AE2-Unofficial `fdedc3a8f023`; migrated in AE2-NH, which also patched `integration/modules/FMP.java`): `FMPPlacementHelper.getPart` and `removePart` | Iterate `jPartList()`; retain last-match lookup and removal/break behavior | Source patch and release pending; September host-binding fix does not migrate traversal | No migrated pack version verified; retain the getter |
| `TileMultipart.partList(): scala.collection.Seq` | Extra Utilities 1.2.12: multipart renderer iterators | Iterate `jPartList()` without adding detached-part filtering | Retirement/replacement pending | Confirm absence or migration in the target pack before retiring the getter | | `TileMultipart.partList(): scala.collection.Seq` | Extra Utilities 1.2.12 (dropped, not patched): multipart renderer iterators | Iterate `jPartList()` without adding detached-part filtering | None: dropped in favour of UtilitiesInExcess | Confirm absence or migration in the target pack before retiring the getter |
| `TileMultipart.partList(): scala.collection.Seq` and Scala loading | GuideNH `16f142417df1`: `Ae2ForgeMultipartBridge`, `ForgeMultipartHelpers` | `createPreviewTileFromNBT` for previews; `jPartList()` for remaining traversal | Direct calls replaced reflection in `4a0cd02e` (tags `1.3.33` onward); export/statistics use Java traversal, preview/AE2 paths still use Scala; setter call removed | Retain getter/loader for current source and setter for older supported jars; pack adoption unverified | | `TileMultipart.partList(): scala.collection.Seq` and Scala loading | GuideNH `16f142417df1`: `Ae2ForgeMultipartBridge`, `ForgeMultipartHelpers` | `createPreviewTileFromNBT` for previews; `jPartList()` for remaining traversal | Direct calls replaced reflection in `4a0cd02e` (tags `1.3.33` onward); export/statistics use Java traversal, preview/AE2 paths still use Scala; setter call removed | Retain getter/loader for current source and setter for older supported jars; pack adoption unverified |
| `TileMultipart.loadParts(scala.collection.Iterable)` exact reflection | Schematica `3b03ee937953`: `nbt.ForgeMultipart` | `MultipartHelper.createPreviewTileFromNBT`; [complete preview contract](../api/CLIENT_PREVIEW.md) | Source patch and release pending; replace the whole reconstruction chain rather than one reflected method | No migrated pack version verified; retain the Scala loader descriptor | | `TileMultipart.loadParts(scala.collection.Iterable)` exact reflection | Schematica `3b03ee937953`: `nbt.ForgeMultipart` | `MultipartHelper.createPreviewTileFromNBT`; [complete preview contract](../api/CLIENT_PREVIEW.md) | Source patch and release pending; replace the whole reconstruction chain rather than one reflected method | No migrated pack version verified; retain the Scala loader descriptor |
| Private `MultiPartRegistry$` Scala `typeMap` field and `Map.get` / `Option` | Schematica `3b03ee937953`: `nbt.ForgeMultipart.init` and `createPart` | `MultipartHelper.createPreviewTileFromNBT`; factories opt in through `createPartForClientPreview` | Source patch/release pending; all-or-nothing lookup, client construction and loading are implemented | No migrated pack version verified; retain the exact private live Scala-map field | | Private `MultiPartRegistry$` Scala `typeMap` field and `Map.get` / `Option` | Schematica `3b03ee937953`: `nbt.ForgeMultipart.init` and `createPart` | `MultipartHelper.createPreviewTileFromNBT`; factories opt in through `createPartForClientPreview` | Source patch/release pending; all-or-nothing lookup, client construction and loading are implemented | No migrated pack version verified; retain the exact private live Scala-map field |
| `MultipartGenerator$.generateCompositeTile(TileEntity, scala.collection.Iterable, boolean)` | Schematica `3b03ee937953` exact reflection; GuideNH `16f142417df1` direct companion call | `createPreviewTileFromNBT` for saved previews; static `MultipartGenerator.generateCompositeTile` for other staged reconstruction | Java API migration pending in both consumers; GuideNH removed reflection but still passes Scala parts | No migrated pack version verified; retain the companion and Scala descriptor | | `MultipartGenerator$.generateCompositeTile(TileEntity, scala.collection.Iterable, boolean)` | Schematica `3b03ee937953` exact reflection; GuideNH `16f142417df1` direct companion call | `createPreviewTileFromNBT` for saved previews; static `MultipartGenerator.generateCompositeTile` for other staged reconstruction | Java API migration pending in both consumers; GuideNH removed reflection but still passes Scala parts | No migrated pack version verified; retain the companion and Scala descriptor |
| `MicroblockGenerator$.create(MicroblockClass, int, boolean)` and encoded shape copy | GuideNH `16f142417df1`: `promoteMicroblockToClient` directly calls companion and `shape_$eq(byte)` | `createPreviewTileFromNBT` for whole previews; static `MicroblockGenerator.create` and `setShape` for individual unbound parts | Reflection/private shape write removed in source; static Java/preview migration pending; validate client traits and shape callback ordering | No migrated pack version verified; retain companion singleton and exact descriptor | | `MicroblockGenerator$.create(MicroblockClass, int, boolean)` and encoded shape copy | GuideNH `16f142417df1`: `promoteMicroblockToClient` directly calls companion and `shape_$eq(byte)` | `createPreviewTileFromNBT` for whole previews; static `MicroblockGenerator.create` and a raw `shape_$eq(source.shape())` copy for individual unbound parts (not `setShape(getSize(), getShape())`, which corrupts corner/edge shapes) | Reflection/private shape write removed in source; static Java/preview migration pending; validate client traits and shape callback ordering | No migrated pack version verified; retain companion singleton and exact descriptor |
| Private `BlockMicroMaterial.block` / `meta` accessor mixin and reflective material query | GuideNH `16f142417df1`: `resolvePrimaryMicroblockId`; mixin removed | Direct `jPartList()`, `Microblock.material()`, `getMaterial(int)`, `BlockMicroMaterial.block()` / `meta()`; [typed example and policy differences](../api/MATERIAL_ACCESS.md) | Upstream cleanup uses existing public getters since `4a0cd02e`, included in tags `1.3.33` onward; published artifacts, custom getter behavior and optional loading not validated here | No migrated pack version verified; retain private fields for older releases | | Private `BlockMicroMaterial.block` / `meta` accessor mixin and reflective material query | GuideNH `16f142417df1`: `resolvePrimaryMicroblockId`; mixin removed | Direct `jPartList()`, `Microblock.material()`, `getMaterial(int)`, `BlockMicroMaterial.block()` / `meta()`; [typed example and policy differences](../api/MATERIAL_ACCESS.md) | Upstream cleanup uses existing public getters since `4a0cd02e`, included in tags `1.3.33` onward; published artifacts, custom getter behavior and optional loading not validated here | No migrated pack version verified; retain private fields for older releases |
| Reflective mutation of `ButtonPart.metaSideMap` / `sideMetaMap` | Et Futurum Requiem `78a5744dfd33`: `compat.CompatMisc.runModHooksInit` | Two direct `ButtonPart.setOrientation(int, ForgeDirection)` calls; [mapping and lifecycle guide](../api/BUTTON_ORIENTATIONS.md) | FMP API/example complete; consumer source patch and first released version pending | Retain both public mutable arrays until the migrated release is in the target pack and a fresh scan confirms no legacy access | | Reflective mutation of `ButtonPart.metaSideMap` / `sideMetaMap` | Et Futurum Requiem `78a5744dfd33`: `compat.CompatMisc.runModHooksInit` | Two direct `ButtonPart.setOrientation(int, ForgeDirection)` calls; [mapping and lifecycle guide](../api/BUTTON_ORIENTATIONS.md) | FMP API/example complete; consumer source patch and first released version pending | Retain both public mutable arrays until the migrated release is in the target pack and a fresh scan confirms no legacy access |
| `MicroblockProxy$.MODULE$` saw access and reflective mutation of private `ItemSaw.harvestLevel` | IguanaTweaksTConstruct `2bc09889d3e2`: `ClientFMPProxy.updateSawRenderers`, `IguanaFMPCompat.postInit` | Use static `MicroblockProxy.sawStone()` / `sawIron()` / `sawDiamond()` / `useSawIcons()`; read `harvestLevel()` and call `setHarvestLevel(int)`; [state and lifecycle guide](../api/SAW_STRENGTH.md) | FMP Scala-free API example complete; consumer source/lifecycle patch and first released version pending | Retain the companion and private field until the migrated release is in the target pack; ensure Iguana runs before ForgeMicroblock post-init and rescan for legacy access | | `MicroblockProxy$.MODULE$` saw access and reflective mutation of private `ItemSaw.harvestLevel` | IguanaTweaksTConstruct `2bc09889d3e2`: `ClientFMPProxy.updateSawRenderers`, `IguanaFMPCompat.postInit` | Use static `MicroblockProxy.sawStone()` / `sawIron()` / `sawDiamond()` / `useSawIcons()`; read `harvestLevel()` and call `setHarvestLevel(int)`; [state and lifecycle guide](../api/SAW_STRENGTH.md) | FMP Scala-free API example complete; consumer source/lifecycle patch and first released version pending | Retain the companion and private field until the migrated release is in the target pack; Iguana's `after:*` post-init is early enough, because ForgeMicroblock recalculates the maximum on load complete; rescan for legacy access |
| `NormalOcclusionTest$.apply(Traversable, Traversable)` | OpenComputers `2c00f79be24b`: `common.block.Cable.canConnectFromSideFMP`, `server.network.Network.canConnectFromSideFMP` | `NormalOcclusionTest.testBoxes(ownBounds.asJava, otherBounds)`; `otherBounds` already comes from Java `getOcclusionBoxes()` | Source patch and release pending; retain side/color/face filtering | No migrated pack version verified; retain the companion and descriptor | | `NormalOcclusionTest$.apply(Traversable, Traversable)` | OpenComputers `2c00f79be24b`: `common.block.Cable.canConnectFromSideFMP`, `server.network.Network.canConnectFromSideFMP` | `NormalOcclusionTest.testBoxes(ownBounds.asJava, otherBounds)`; `otherBounds` already comes from Java `getOcclusionBoxes()` | Source patch and release pending; retain side/color/face filtering | No migrated pack version verified; retain the companion and descriptor |
| `NormalOcclusionTest$.apply(Traversable, Traversable)` | ForgeRelocationFMP `49a810b8c63b`: `FramePart.occlusionTest` | `NormalOcclusionTest.testBoxes(boxes.asJava, getOcclusionBoxes)`; retain combined normal/partial/collision boxes and caller order | Source patch and release pending; preserve temporary face bounds and replacement protocol | No migrated pack version verified; retain the companion and descriptor | | `NormalOcclusionTest$.apply(Traversable, Traversable)` | ForgeRelocationFMP `49a810b8c63b`: `FramePart.occlusionTest` | `NormalOcclusionTest.testBoxes(boxes.asJava, getOcclusionBoxes)`; retain combined normal/partial/collision boxes and caller order | Source patch and release pending; preserve temporary face bounds and replacement protocol | No migrated pack version verified; retain the companion and descriptor |
| `BlockMultipart.reduceMOP(MovingObjectPosition): scala.Tuple2` | GT5U `1a9469a13228`: `ColoredBlockContainer` ProjectRed wire branch, shipped in `5.09.54.205` | `BlockMultipart.hitPartIndex(hit)`, same index, `-1` when the hit carries none; [guide](../api/HIT_PART.md) | FMP API, example and regression coverage complete; consumer source patch and release pending, keeping its `ExtendedMOP` and coordinate guards | No migrated pack version verified; retain the exact static descriptor and boxed-`Integer` `_1()`; new in `2.9.0-RC-2` | | `BlockMultipart.reduceMOP(MovingObjectPosition): scala.Tuple2` | GT5U `1a9469a13228`: `ColoredBlockContainer` ProjectRed wire branch, shipped in `5.09.54.205` | `BlockMultipart.hitPartIndex(hit)`, same index, `-1` when the hit carries none; [guide](../api/HIT_PART.md) | FMP API, example and regression coverage complete; consumer source patch and release pending, keeping its `ExtendedMOP` and coordinate guards | No migrated pack version verified; retain the exact static descriptor and boxed-`Integer` `_1()`; new in `2.9.0-RC-2` |
@@ -813,8 +825,9 @@ all 386 full member/type/reflection rows from `+678`: 35 inherited types, 255 me
reflection strings. The `2.9.0-RC-2` rescan (240 jars, 28 consumers) keeps every `+678` member and type row and reflection strings. The `2.9.0-RC-2` rescan (240 jars, 28 consumers) keeps every `+678` member and type row and
adds 13 members and 4 other types. GuideNH `1.3.41` replaced 17 reflection strings with direct links, and adds 13 members and 4 other types. GuideNH `1.3.41` replaced 17 reflection strings with direct links, and
ThaumicEnergistics adds one. Source revisions above identify inspected checkouts, not guaranteed parity with newer jars. ThaumicEnergistics adds one. Source revisions above identify inspected checkouts, not guaranteed parity with newer jars.
GuideNH's upstream material-access cleanup ships in RC-2's `1.3.41`, but none of its pending Java API migrations do. No consumer has been verified to have completed the full Java API GuideNH's upstream material-access cleanup ships in RC-2's `1.3.41`, but none of its pending Java API migrations do. Source patches now exist for every blocking consumer (see the ledger status), but none is released, so no consumer has
migration; update artifact/adoption columns only with actual artifacts. been verified to have completed the full Java API migration in an artifact; update artifact/adoption columns only with
actual artifacts.
### Consumer-specific migration traps ### Consumer-specific migration traps
@@ -863,7 +876,8 @@ migration; update artifact/adoption columns only with actual artifacts.
- GuideNH's [typed material getters](../api/MATERIAL_ACCESS.md) likewise honor overrides that raw mixin fields - GuideNH's [typed material getters](../api/MATERIAL_ACCESS.md) likewise honor overrides that raw mixin fields
bypassed. Preserve first-usable-part order, export filtering and failure behavior; validate custom overrides and bypassed. Preserve first-usable-part order, export filtering and failure behavior; validate custom overrides and
optional-mod loading. Physical-client construction and GPU previews remain release checks. optional-mod loading. Physical-client construction and GPU previews remain release checks.
- Iguana must apply [saw strength](../api/SAW_STRENGTH.md) before ForgeMicroblock's post-init maximum calculation. - Iguana applies [saw strength](../api/SAW_STRENGTH.md) in its `after:*` post-init. ForgeMicroblock recalculates the
maximum on `FMLLoadCompleteEvent`, so no `before:ForgeMicroblock` ordering is needed (it would cycle with `after:*`).
Et Futurum's [orientation setter](../api/BUTTON_ORIENTATIONS.md) maintains both inverse maps; keep the legacy Et Futurum's [orientation setter](../api/BUTTON_ORIENTATIONS.md) maintains both inverse maps; keep the legacy
private field/public arrays until the respective released integrations are adopted. private field/public arrays until the respective released integrations are adopted.
+3 -2
View File
@@ -29,6 +29,7 @@ of the later upstream rename, not a divergence from the `1.7.12` reference.
| Scheduled ticks of moved tiles | `TileMultipart.onMoved` hands its parts' pending scheduled and random ticks to the chunk that now contains the tile, keeping their deadlines; moves requested from a tick callback apply after that tick's processing. The Scala implementation left them in the source chunk, so they were lost if it unloaded first, and were saved at the wrong position. Same-world moves only. This fixes a pre-existing Scala bug. | | Scheduled ticks of moved tiles | `TileMultipart.onMoved` hands its parts' pending scheduled and random ticks to the chunk that now contains the tile, keeping their deadlines; moves requested from a tick callback apply after that tick's processing. The Scala implementation left them in the source chunk, so they were lost if it unloaded first, and were saved at the wrong position. Same-world moves only. This fixes a pre-existing Scala bug. |
| World scheduler clock loading | Retains successfully loaded `schedTime` instead of overwriting it with total world time. Missing or unreadable files still fall back to world time. This fixes a pre-existing Scala bug and preserves the clock used by saved absolute tick deadlines; the file format is unchanged. | | World scheduler clock loading | Retains successfully loaded `schedTime` instead of overwriting it with total world time. Missing or unreadable files still fall back to world time. This fixes a pre-existing Scala bug and preserves the clock used by saved absolute tick deadlines; the file format is unchanged. |
| Converted tile loading | Copies the source tile coordinates to a replacement produced by `MultipartSaveLoad.loadTiles` before assigning its world and validating it. The Scala implementation left converted replacements at their default coordinates. | | Converted tile loading | Copies the source tile coordinates to a replacement produced by `MultipartSaveLoad.loadTiles` before assigning its world and validating it. The Scala implementation left converted replacements at their default coordinates. |
| Maximum saw strength | ForgeMicroblock recalculates `MicroMaterialRegistry.getMaxCuttingStrength()` on `FMLLoadCompleteEvent` as well as in its post-init. Saws added or re-tiered in a later post-init (Iguana's `after:*`) now count, so `MicroRecipe.canCut`'s cut-anything exemption goes to the actual strongest saw instead of a stale maximum (with Iguana: the Manyullyn Saw, not the Iron Saw). This fixes a pre-existing Scala bug; `canCut` is the only reader and runs only when crafting. |
| Placement-modifier player lifecycle | Removes cached control-key state when a player logs out and transfers it from the old player object to its replacement on clone. The Scala implementation retained entries until server shutdown. | | Placement-modifier player lifecycle | Removes cached control-key state when a player logs out and transfers it from the old player object to its replacement on clone. The Scala implementation retained entries until server shutdown. |
| `IDWriter` before `setMax` | `read`/`write` throw `IllegalStateException` instead of `NullPointerException`. Uninitialized use is unsupported. | | `IDWriter` before `setMax` | `read`/`write` throw `IllegalStateException` instead of `NullPointerException`. Uninitialized use is unsupported. |
| `PacketScheduler` invalid `maskWidth` | Throws `IllegalArgumentException` instead of `scala.MatchError`. Valid widths remain 1, 2, 4 and 8. | | `PacketScheduler` invalid `maskWidth` | Throws `IllegalArgumentException` instead of `scala.MatchError`. Valid widths remain 1, 2, 4 and 8. |
@@ -96,7 +97,7 @@ Other retained `$class` bridges and `MODULE$` companions are not covered by this
| `TileMultipart` | `hasDynamicParts` (false by default), `renderStatic`, `renderDynamic` and `randomDisplayTick` hooks for dispatching generated overrides through a stable superclass | | `TileMultipart` | `hasDynamicParts` (false by default), `renderStatic`, `renderDynamic` and `randomDisplayTick` hooks for dispatching generated overrides through a stable superclass |
| `MultipartMixinFactory` | Four additional static forwarders: `onCompiled`, `autoCompleteJavaTrait` and the two mangled `ASMMixinFactory` parent helpers. Scala emitted them when the base became Java with its original public JVM access; the Java facade retains them. Existing facade entries are unchanged. | | `MultipartMixinFactory` | Four additional static forwarders: `onCompiled`, `autoCompleteJavaTrait` and the two mangled `ASMMixinFactory` parent helpers. Scala emitted them when the base became Java with its original public JVM access; the Java facade retains them. Existing facade entries are unchanged. |
| `MultipartEventHandler` / `MultipartEventHandler$` | Public `playerLoggedOut(PlayerLoggedOutEvent)` and `playerCloned(PlayerEvent.Clone)` event handlers for placement-modifier state cleanup and transfer | | `MultipartEventHandler` / `MultipartEventHandler$` | Public `playerLoggedOut(PlayerLoggedOutEvent)` and `playerCloned(PlayerEvent.Clone)` event handlers for placement-modifier state cleanup and transfer |
| `MultipartHelper` | `createPreviewTileFromNBT(World, NBTTagCompound)` builds an uninstalled client composite directly from saved multipart NBT and rejects unsupported parts as a whole | | `MultipartHelper` | `createPreviewTileFromNBT(World, NBTTagCompound)` builds an uninstalled client composite directly from saved multipart NBT and rejects unsupported parts as a whole; with a null world it only loads and binds parts and recalculates stock microblock render bounds (2.0.0 also broadcast `onPartChanged`, which crashed parts that assume a world) |
Previously abstract JVM interface methods now have Java defaults, allowing inheritance without Scala forwarders: Previously abstract JVM interface methods now have Java defaults, allowing inheritance without Scala forwarders:
@@ -135,7 +136,7 @@ methods. Explicit forwarding is required where the implementation remains abstra
| --- | --- | | --- | --- |
| `TCuboidPart` | Extend `JCuboidPart`, or forward subparts, collision boxes and breaking rendering to its statics. | | `TCuboidPart` | Extend `JCuboidPart`, or forward subparts, collision boxes and breaking rendering to its statics. |
| `TNormalOcclusion` | Explicitly combine `NormalOcclusionTest.apply(this, other)` with the intended super chain. Audit existing `super.occlusionTest` calls too: they no longer route through the old trait. | | `TNormalOcclusion` | Explicitly combine `NormalOcclusionTest.apply(this, other)` with the intended super chain. Audit existing `super.occlusionTest` calls too: they no longer route through the old trait. |
| `TIconHitEffects` | Explicitly forward `addHitEffects` and `addDestroyEffects` to `IconHitEffects`. | | `TIconHitEffects` | Explicitly override `addHitEffects(hit, renderer)` and the two-argument `addDestroyEffects(hit, renderer)`, forwarding to `IconHitEffects`. Don't override the deprecated one-argument `addDestroyEffects(renderer)` that the old trait overrode. |
| `TItemMultiPart` | Explicitly forward `onItemUse` to `JItemMultiPart`; the inherited Item method otherwise wins. | | `TItemMultiPart` | Explicitly forward `onItemUse` to `JItemMultiPart`; the inherited Item method otherwise wins. |
| `TRandomUpdateTick` | Explicitly implement `onWorldJoin` with `TickScheduler.loadRandomTick(this)`. | | `TRandomUpdateTick` | Explicitly implement `onWorldJoin` with `TickScheduler.loadRandomTick(this)`. |
| `TScheduledPacketPart` | Explicitly forward `read` to `TScheduledPacketPart.readMask(this, packet)`. | | `TScheduledPacketPart` | Explicitly forward `read` to `TScheduledPacketPart.readMask(this, packet)`. |
+1
View File
@@ -78,6 +78,7 @@ entries complete.
| [ ] | Open a GuideNH scene containing a multipart tile and export its part/material data | GuideNH; use the same **ME Glass Cable + Stone Cover + Red Alloy Wire** composite | The preview, material data and part statistics are complete | `createPreviewTileFromNBT`, typed part/material traversal and `MultipartRenderer.renderWorldBlock` | | [ ] | Open a GuideNH scene containing a multipart tile and export its part/material data | GuideNH; use the same **ME Glass Cable + Stone Cover + Red Alloy Wire** composite | The preview, material data and part statistics are complete | `createPreviewTileFromNBT`, typed part/material traversal and `MultipartRenderer.renderWorldBlock` |
| [ ] | Place FMP buttons on every supported face with Et Futurum loaded | Convert a vanilla **Stone Button** by adding a **Stone Cover**; repeat its supported orientations with Et Futurum Requiem installed | Button orientation matches the fixed vanilla behavior | supported `ButtonPart.setOrientation`; legacy arrays until consumer adoption | | [ ] | Place FMP buttons on every supported face with Et Futurum loaded | Convert a vanilla **Stone Button** by adding a **Stone Cover**; repeat its supported orientations with Et Futurum Requiem installed | Button orientation matches the fixed vanilla behavior | supported `ButtonPart.setOrientation`; legacy arrays until consumer adoption |
| [ ] | With Iguana harvest-level tweaks enabled, inspect and use the Stone, Iron, Diamond, Ardite, Cobalt and Manyullyn saws against materials spanning their configured tiers | Forge Multipart supplies the first three saws; Iguana Tweaks for Tinkers' Construct supplies **Ardite**, **Cobalt** and **Manyullyn Saws** | Tooltips, saw textures and cutting recipes use the remapped tier; weaker saws do not gain the cached strongest-saw exemption | supported `ItemSaw.setHarvestLevel`; legacy field until consumer adoption | | [ ] | With Iguana harvest-level tweaks enabled, inspect and use the Stone, Iron, Diamond, Ardite, Cobalt and Manyullyn saws against materials spanning their configured tiers | Forge Multipart supplies the first three saws; Iguana Tweaks for Tinkers' Construct supplies **Ardite**, **Cobalt** and **Manyullyn Saws** | Tooltips, saw textures and cutting recipes use the remapped tier; weaker saws do not gain the cached strongest-saw exemption | supported `ItemSaw.setHarvestLevel`; legacy field until consumer adoption |
| [ ] | Load a world saved before the port that holds Galacticraft microblocks, then saw new ones | Before updating, save covers of one material per module: Galacticraft **Copper Block Cover**, **Moon Turf Cover**, **Mars Cobblestone Cover** and **Asteroid Rock Cover**; load with the migrated Galacticraft, then check NEI for all 20 Galacticraft materials | Saved covers keep their material and shape with no missing-material texture; every material still has microblock variants and no "already registered" log line appears | Galacticraft's direct `MicroMaterialRegistry.registerMaterial` calls by name in `init`; single public `registerMaterial` until consumer adoption |
| [ ] | Use OpenComputers **3D Printer** to make a **3D Print** with different off/on shapes that both fit beside a cover; place it with the cover and right-click to toggle | OpenComputers **3D Printer**, its resulting **3D Print**, and a Forge Multipart **Stone Cover** | Its slots are rebuilt without losing, hiding or disconnecting either part | external mutation of `TSlottedTile.v_partMap` plus `bindPart` | | [ ] | Use OpenComputers **3D Printer** to make a **3D Print** with different off/on shapes that both fit beside a cover; place it with the cover and right-click to toggle | OpenComputers **3D Printer**, its resulting **3D Print**, and a Forge Multipart **Stone Cover** | Its slots are rebuilt without losing, hiding or disconnecting either part | external mutation of `TSlottedTile.v_partMap` plus `bindPart` |
| [ ] | Move the same composite tile using a ProjectRed **Frame Motor** with MCFrames **Frame** blocks, then a **Matter Manipulator MKIII** in move mode | Move the **ME Glass Cable + Stone Cover + Red Alloy Wire** composite with the named ProjectRed, MCFrames and Matter Manipulator items | Coordinates, part-to-tile references, generated interfaces and rendering remain correct after `onMoved` | ForgeRelocationFMP / MatterManipulator live multipart move lifecycle | | [ ] | Move the same composite tile using a ProjectRed **Frame Motor** with MCFrames **Frame** blocks, then a **Matter Manipulator MKIII** in move mode | Move the **ME Glass Cable + Stone Cover + Red Alloy Wire** composite with the named ProjectRed, MCFrames and Matter Manipulator items | Coordinates, part-to-tile references, generated interfaces and rendering remain correct after `onMoved` | ForgeRelocationFMP / MatterManipulator live multipart move lifecycle |
| [ ] | Capture and rebuild a mixed multipart tile with a BuildCraft **Builder**, then with a **Matter Manipulator MKIII** copy/paste | Blueprint and copy the **ME Glass Cable + Stone Cover + Red Alloy Wire** composite plus a Stone Strip, Hollow Cover and FMP torch or button; rebuild it elsewhere, rotated | Every part returns once with its material, shape, orientation and connections; microblocks land before other parts and no extra description packet is needed | Part `save`/`loadPart`, core type IDs and microblock NBT read by BuildCraftCompat and MatterManipulator | | [ ] | Capture and rebuild a mixed multipart tile with a BuildCraft **Builder**, then with a **Matter Manipulator MKIII** copy/paste | Blueprint and copy the **ME Glass Cable + Stone Cover + Red Alloy Wire** composite plus a Stone Strip, Hollow Cover and FMP torch or button; rebuild it elsewhere, rotated | Every part returns once with its material, shape, orientation and connections; microblocks land before other parts and no extra description packet is needed | Part `save`/`loadPart`, core type IDs and microblock NBT read by BuildCraftCompat and MatterManipulator |
+15 -6
View File
@@ -21,10 +21,10 @@ artifact inventories should come from the reports for the revision being reviewe
## Remaining work ## Remaining work
1. **Migrate consumers.** Use the existing typed APIs, with optional integrations gated on presence/version. 1. **Migrate consumers.** Source patches against FMP 2.0.0 are prepared for every blocking consumer (see the
Preserve each consumer's state, ordering, failure policy and initialization timing. Record the source revision, [adoption ledger status](COMPATIBILITY.md#java-api-adoption-ledger)); next are their in-game checks, PRs, releases and
first released version, minimum FMP dependency and actual target-pack artifact for each legacy contract. pack adoption. Record the first released version, minimum FMP dependency and actual target-pack artifact for each
Consumer mods may remain Scala internally. Reference checkouts are not evidence of a shipped migration. legacy contract. Consumer mods may remain Scala internally. Prepared patches are not evidence of a shipped migration.
2. **Validate client and pack behavior.** Complete the manual checklist, including illuminated microblock 2. **Validate client and pack behavior.** Complete the manual checklist, including illuminated microblock
construction/halos, previews, rendering, particles, lighting, interactions, old worlds, multiplayer and movement. construction/halos, previews, rendering, particles, lighting, interactions, old worlds, multiplayer and movement.
Test optional dependencies both absent and present. The successful MCPC hook needs an actual patched World Test optional dependencies both absent and present. The successful MCPC hook needs an actual patched World
@@ -39,8 +39,8 @@ artifact inventories should come from the reports for the revision being reviewe
5. **Remove FMP's Scala requirement last.** Complete the gates below before retiring bridges, compiler support 5. **Remove FMP's Scala requirement last.** Complete the gates below before retiring bridges, compiler support
or dependencies. Other mods' independent Scala requirements are outside this target. or dependencies. Other mods' independent Scala requirements are outside this target.
Extra Utilities 1.2.12 remains an active supported consumer. Switching support to UtilitiesInExcess requires an Extra Utilities 1.2.12 is dropped, not patched; UtilitiesInExcess replaces it and its FMP migration is prepared.
explicit support decision and actual pack adoption, including migration of the replacement's FMP contracts. Confirming that Extra Utilities and Hodgepodge's Extra Utilities mixins are gone from the target pack is a removal gate.
GTNHLib/fastutil, Sponge Mixins and a replacement runtime generator are conditional choices, not migration tasks GTNHLib/fastutil, Sponge Mixins and a replacement runtime generator are conditional choices, not migration tasks
in themselves. Add them only for a demonstrated need. in themselves. Add them only for a demonstrated need.
@@ -48,10 +48,19 @@ in themselves. Add them only for a demonstrated need.
- Every affected adoption-ledger row is verified against the actual target-pack jars, including reflective fields, - Every affected adoption-ledger row is verified against the actual target-pack jars, including reflective fields,
mixin targets, compiler-generated helpers and external Scala traits. Unmodifiable consumers must be retained or replaced. mixin targets, compiler-generated helpers and external Scala traits. Unmodifiable consumers must be retained or replaced.
- Extra Utilities 1.2.12 (dropped, unmodifiable) and Hodgepodge's Extra Utilities mixins are absent from the target pack.
- A deprecation/removal window and a release permitted to break the old ABI are agreed. That window is still open; - A deprecation/removal window and a release permitted to break the old ABI are agreed. That window is still open;
adding a replacement or deprecation is not permission to delete a bridge. adding a replacement or deprecation is not permission to delete a bridge.
- FMP's own Scala storage, retained models, trait inputs and legacy callers are replaced or retired. In particular, - FMP's own Scala storage, retained models, trait inputs and legacy callers are replaced or retired. In particular,
ProjectRed's released Java extension alone does not eliminate FMP's internal need for Scala-signature decoding. ProjectRed's released Java extension alone does not eliminate FMP's internal need for Scala-signature decoding.
- Before deleting any `X$` companion, every static facade method that forwards to it keeps its own implementation and
descriptor. Migrated consumers call these statics directly: for example `MultipartGenerator.generateCompositeTile`,
`MicroblockGenerator.create`, `MultipartSaveLoad.loadingWorld`, `MultipartProxy.block`, `MicroblockProxy.itemMicro`
and the saw accessors, `FacePlacementGrid.getHitSlot` / `render`, `BlockMicroMaterial.createAndRegister`,
`MicroOcclusion.recalcBounds`, the shape-class bounds getters such as `FaceMicroClass.aBounds`,
`RedstoneInteractions.getPowerTo` / `connectionMask`, and `MultipartGenerator.registerPassThroughInterface`. Keep
`CommonMicroblock` as a type name (consumers test for it), or confirm consumers have moved to `Microblock`. Port
`JMicroShrinkRender` (still a Scala trait, all-abstract) with its five method descriptors unchanged: WR-CBE implements it.
- Shipped and generated FMP classes, descriptors and runtime loading paths contain no remaining Scala requirements; - Shipped and generated FMP classes, descriptors and runtime loading paths contain no remaining Scala requirements;
Scala compilation and compiler/runtime dependencies can then be removed. Scala compilation and compiler/runtime dependencies can then be removed.
- Migrated consumers pass old-world, packet, client and dedicated-server validation against the resulting artifact. - Migrated consumers pass old-world, packet, client and dedicated-server validation against the resulting artifact.
@@ -15,7 +15,8 @@ public final class MicroblockCreationExample {
int material = source.material(); int material = source.material();
byte shape = source.shape(); byte shape = source.shape();
Microblock created = MicroblockGenerator.create(microClass, material, client); Microblock created = MicroblockGenerator.create(microClass, material, client);
created.setShape(shape >> 4, shape & 0xF); // Copy the raw byte: corner/edge setShape(size, slot) expects getSlot(), not the stored nibble.
created.shape_$eq(shape);
return created; return created;
} }
} }
@@ -60,6 +60,7 @@ public final class ForgeMultipartFunctionalTestMod {
@Mod.EventHandler @Mod.EventHandler
public void init(FMLInitializationEvent event) { public void init(FMLInitializationEvent event) {
PartRegistrationFunctionalTest.registerDuringInit(); PartRegistrationFunctionalTest.registerDuringInit();
MultipartHelperFunctionalTest.registerDuringInit();
MultipartGenerator.registerPassThroughInterface(GeneratorPassThroughFixture.class.getName(), false, true); MultipartGenerator.registerPassThroughInterface(GeneratorPassThroughFixture.class.getName(), false, true);
CustomTileTraitExample.register(); CustomTileTraitExample.register();
externalScalaMicroblockTraitId = MicroblockGenerator externalScalaMicroblockTraitId = MicroblockGenerator
@@ -154,7 +154,7 @@ class HollowMicroblockClientFunctionalTest {
} }
/** Uses client helpers with real Forge factories; the dedicated server strips client factory creation. */ /** Uses client helpers with real Forge factories; the dedicated server strips client factory creation. */
private static final class ClientProbe extends Microblock implements HollowMicroblockClient { static final class ClientProbe extends Microblock implements HollowMicroblockClient {
Cuboid6 bounds; Cuboid6 bounds;
int mask; int mask;
@@ -96,7 +96,11 @@ class MicroblockGeneratorFunctionalTest {
@Test @Test
void javaExamplePreservesEveryShapeByteWithoutCopyingBindingsOrChangingTheSource() { void javaExamplePreservesEveryShapeByteWithoutCopyingBindingsOrChangingTheSource() {
Microblock source = MicroblockGenerator.create(FaceMicroClass$.MODULE$, 0, false); // Corners and edges override setShape with a slot offset, so every family must round-trip the raw byte.
MicroblockClass[] families = { FaceMicroClass$.MODULE$, HollowMicroClass$.MODULE$, CornerMicroClass$.MODULE$,
EdgeMicroClass$.MODULE$, PostMicroClass$.MODULE$ };
for (MicroblockClass family : families) {
Microblock source = MicroblockGenerator.create(family, 0, false);
TileMultipart sourceTile = new TileMultipart(); TileMultipart sourceTile = new TileMultipart();
source.bind(sourceTile); source.bind(sourceTile);
for (int shape = Byte.MIN_VALUE; shape <= Byte.MAX_VALUE; shape++) { for (int shape = Byte.MIN_VALUE; shape <= Byte.MAX_VALUE; shape++) {
@@ -106,12 +110,31 @@ class MicroblockGeneratorFunctionalTest {
assertSame(source.getClass(), created.getClass()); assertSame(source.getClass(), created.getClass());
assertSame(source.microClass(), created.microClass()); assertSame(source.microClass(), created.microClass());
assertEquals(source.material(), created.material()); assertEquals(source.material(), created.material());
assertEquals((byte) shape, created.shape()); assertEquals((byte) shape, created.shape(), family + " shape " + shape);
assertNull(created.tile()); assertNull(created.tile());
assertSame(sourceTile, source.tile()); assertSame(sourceTile, source.tile());
assertEquals((byte) shape, source.shape()); assertEquals((byte) shape, source.shape());
} }
} }
}
@Test
void setShapeTakesTheAbsoluteSlotSoGetShapeDoesNotRoundTripForCornersAndEdges() {
// Documents the trap in docs/api/MICROBLOCK_CREATION.md: pair setShape with getSlot(), not getShape().
Microblock corner = MicroblockGenerator.create(CornerMicroClass$.MODULE$, 0, false);
corner.shape_$eq((byte) 0x23);
Microblock copy = MicroblockGenerator.create(CornerMicroClass$.MODULE$, 0, false);
copy.setShape(corner.getSize(), corner.getShape());
assertFalse(copy.shape() == corner.shape());
copy.setShape(corner.getSize(), ((codechicken.microblock.CommonMicroblock) corner).getSlot());
assertEquals(corner.shape(), copy.shape());
Microblock edge = MicroblockGenerator.create(EdgeMicroClass$.MODULE$, 0, false);
edge.shape_$eq((byte) 0x45);
Microblock edgeCopy = MicroblockGenerator.create(EdgeMicroClass$.MODULE$, 0, false);
edgeCopy.setShape(edge.getSize(), ((codechicken.microblock.CommonMicroblock) edge).getSlot());
assertEquals(edge.shape(), edgeCopy.shape());
}
@Test @Test
void staticAndCompanionReflectionCreateFreshPartsBeforeCallerOwnedShapeLoading() throws Exception { void staticAndCompanionReflectionCreateFreshPartsBeforeCallerOwnedShapeLoading() throws Exception {
@@ -1,5 +1,6 @@
package codechicken.multipart.test; package codechicken.multipart.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertSame;
@@ -7,6 +8,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import codechicken.microblock.ItemSaw;
import codechicken.microblock.MicroMaterialRegistry; import codechicken.microblock.MicroMaterialRegistry;
import codechicken.microblock.handler.MicroblockMod; import codechicken.microblock.handler.MicroblockMod;
import codechicken.microblock.handler.MicroblockMod$; import codechicken.microblock.handler.MicroblockMod$;
@@ -34,4 +36,23 @@ class MicroblockModFunctionalTest {
assertTrue(MicroMaterialRegistry.getMaxCuttingStrength() >= 3); assertTrue(MicroMaterialRegistry.getMaxCuttingStrength() >= 3);
assertNull(MicroblockMod.angelicaCompat()); assertNull(MicroblockMod.angelicaCompat());
} }
@Test
void loadCompleteRecalculatesMaxCuttingStrengthAfterLateSawRetiering() {
ItemSaw saw = (ItemSaw) MicroblockProxy.sawDiamond();
int originalLevel = saw.harvestLevel();
int cached = MicroMaterialRegistry.getMaxCuttingStrength();
try {
// A later post-init (Iguana's after:*) raises a saw above the cached maximum.
saw.setHarvestLevel(cached + 4);
assertEquals(cached, MicroMaterialRegistry.getMaxCuttingStrength());
MicroblockMod$.MODULE$.loadComplete(null);
assertEquals(cached + 4, MicroMaterialRegistry.getMaxCuttingStrength());
} finally {
saw.setHarvestLevel(originalLevel);
MicroMaterialRegistry.calcMaxCuttingStrength();
}
assertEquals(cached, MicroMaterialRegistry.getMaxCuttingStrength());
}
} }
@@ -13,6 +13,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Supplier;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagList;
@@ -23,7 +24,13 @@ import net.minecraft.world.chunk.Chunk;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import codechicken.lib.data.MCDataInput;
import codechicken.lib.packet.PacketCustom; import codechicken.lib.packet.PacketCustom;
import codechicken.lib.vec.Cuboid6;
import codechicken.microblock.FaceMicroClass$;
import codechicken.microblock.HollowMicroblockClient;
import codechicken.microblock.MicroblockGenerator;
import codechicken.microblock.PostMicroblockClient;
import codechicken.multipart.MultiPartRegistry; import codechicken.multipart.MultiPartRegistry;
import codechicken.multipart.MultipartHelper; import codechicken.multipart.MultipartHelper;
import codechicken.multipart.TMultiPart; import codechicken.multipart.TMultiPart;
@@ -44,6 +51,36 @@ import scala.collection.JavaConversions;
*/ */
class MultipartHelperFunctionalTest { class MultipartHelperFunctionalTest {
private static final String WORLD_DEPENDENT_PART = "test:preview_world_dependent";
private static final String PREVIEW_SERVER_FACE = "test:preview_server_face";
private static final String PREVIEW_HOLLOW_PROBE = "test:preview_hollow_probe";
private static final String PREVIEW_POST_PROBE = "test:preview_post_probe";
static void registerDuringInit() {
MultiPartRegistry.registerPartFactory(new MultiPartRegistry.IPartFactory2() {
@Override
public TMultiPart createPart(String name, NBTTagCompound nbt) {
return new WorldDependentPart();
}
@Override
public TMultiPart createPart(String name, MCDataInput packet) {
return new WorldDependentPart();
}
@Override
public TMultiPart createPartForClientPreview(String name, NBTTagCompound nbt) {
return new WorldDependentPart();
}
}, WORLD_DEPENDENT_PART);
registerPreviewFactory(
PREVIEW_SERVER_FACE,
() -> MicroblockGenerator.create(FaceMicroClass$.MODULE$, 0, false));
registerPreviewFactory(PREVIEW_HOLLOW_PROBE, () -> new HollowMicroblockClientFunctionalTest.ClientProbe(0));
registerPreviewFactory(PREVIEW_POST_PROBE, () -> new PostMicroblockClientFunctionalTest.ClientProbe(0));
}
@Test @Test
void buildsATileAroundTheGivenParts() { void buildsATileAroundTheGivenParts() {
TMultiPart torch = MultiPartRegistry.loadPart("mc_torch", null); TMultiPart torch = MultiPartRegistry.loadPart("mc_torch", null);
@@ -105,6 +142,53 @@ class MultipartHelperFunctionalTest {
assertEquals(37, part.value()); assertEquals(37, part.value());
} }
/** Parts may assume a world in onPartChanged, as ProjectRed gates do; worldless previews must not call it. */
@Test
void worldlessPreviewDoesNotCallPartChangeCallbacks() {
NBTTagCompound part = new NBTTagCompound();
part.setString("id", WORLD_DEPENDENT_PART);
NBTTagCompound tag = previewTag(37);
tag.getTagList("parts", 10).appendTag(part);
TileMultipart tile = MultipartHelper.createPreviewTileFromNBT(null, tag);
assertNotNull(tile);
assertEquals(2, tile.jPartList().size());
WorldDependentPart worldDependent = assertInstanceOf(WorldDependentPart.class, tile.jPartList().get(1));
assertSame(tile, worldDependent.tile());
}
/**
* Stock microblocks only compute render bounds in part callbacks, which worldless previews skip. The dedicated test
* server strips the generated client microblock traits, so the client parts here are the hand-written probes.
*/
@Test
void worldlessPreviewInitializesMicroblockRenderBounds() {
NBTTagList parts = new NBTTagList();
parts.appendTag(microblockTag(PREVIEW_SERVER_FACE, 1 << 4)); // bottom cover
parts.appendTag(microblockTag(PREVIEW_HOLLOW_PROBE, 1 << 4 | 2)); // north hollow cover
parts.appendTag(microblockTag(PREVIEW_POST_PROBE, 2 << 4)); // Y-axis post
NBTTagCompound tag = new NBTTagCompound();
tag.setString("id", "savedMultipart");
tag.setTag("parts", parts);
TileMultipart tile = MultipartHelper.createPreviewTileFromNBT(null, tag);
assertNotNull(tile);
HollowMicroblockClient hollow = assertInstanceOf(HollowMicroblockClient.class, tile.jPartList().get(1));
PostMicroblockClient post = assertInstanceOf(PostMicroblockClient.class, tile.jPartList().get(2));
assertNotNull(hollow.renderBounds());
assertEquals(hollow.getHollowSize(), hollow.renderMask() >> 8);
assertNotNull(post.renderBounds1());
// Clipped by the bottom cover, so the bounds were computed against the bound tile.
assertEquals(0.125, post.renderBounds1().min.y, 1e-12);
Cuboid6 postBounds = post.renderBounds1().copy();
// The world-backed path computes the same post bounds through onPartChanged.
tile.internalPartChange(null);
assertBounds(postBounds, post.renderBounds1());
}
@Test @Test
void rejectsServerWorldsBeforeConstructingPreviewParts() { void rejectsServerWorldsBeforeConstructingPreviewParts() {
assertThrows( assertThrows(
@@ -196,6 +280,56 @@ class MultipartHelperFunctionalTest {
return tile; return tile;
} }
private static void registerPreviewFactory(String name, Supplier<TMultiPart> previewPart) {
MultiPartRegistry.registerPartFactory(new MultiPartRegistry.IPartFactory2() {
@Override
public TMultiPart createPart(String name, NBTTagCompound nbt) {
return null;
}
@Override
public TMultiPart createPart(String name, MCDataInput packet) {
return null;
}
@Override
public TMultiPart createPartForClientPreview(String name, NBTTagCompound nbt) {
return previewPart.get();
}
}, name);
}
private static NBTTagCompound microblockTag(String id, int shape) {
NBTTagCompound part = new NBTTagCompound();
part.setString("id", id);
part.setByte("shape", (byte) shape);
part.setString("material", "minecraft:stone");
return part;
}
private static void assertBounds(Cuboid6 expected, Cuboid6 actual) {
assertEquals(expected.min.x, actual.min.x, 1e-12);
assertEquals(expected.min.y, actual.min.y, 1e-12);
assertEquals(expected.min.z, actual.min.z, 1e-12);
assertEquals(expected.max.x, actual.max.x, 1e-12);
assertEquals(expected.max.y, actual.max.y, 1e-12);
assertEquals(expected.max.z, actual.max.z, 1e-12);
}
private static final class WorldDependentPart extends TMultiPart {
@Override
public String getType() {
return WORLD_DEPENDENT_PART;
}
@Override
public void onPartChanged(TMultiPart part) {
world().getTotalWorldTime();
}
}
/** Matches only its own tile class, so registering it cannot affect any real chunk load. */ /** Matches only its own tile class, so registering it cannot affect any real chunk load. */
private static final class MarkerTile extends TileEntity { private static final class MarkerTile extends TileEntity {
} }
@@ -97,7 +97,7 @@ class PostMicroblockClientFunctionalTest {
/** /**
* Executes client geometry with real Forge factories without requesting the stripped client factory entry point. * Executes client geometry with real Forge factories without requesting the stripped client factory entry point.
*/ */
private static final class ClientProbe extends Microblock implements PostMicroblockClient { static final class ClientProbe extends Microblock implements PostMicroblockClient {
private Cuboid6 first; private Cuboid6 first;
private Cuboid6 second; private Cuboid6 second;
@@ -28,8 +28,10 @@ public class ItemSaw extends Item implements Saw {
/** /**
* Changes the cutting strength used by recipes and the saw renderer. This does not change the durability selected * Changes the cutting strength used by recipes and the saw renderer. This does not change the durability selected
* when the saw was constructed. Startup integrations that change saw tiers must finish before ForgeMicroblock * when the saw was constructed. Startup integrations that change saw tiers must finish before
* post-initialization, when {@link MicroMaterialRegistry#getMaxCuttingStrength()} is calculated. * {@code FMLLoadCompleteEvent}, when ForgeMicroblock recalculates
* {@link MicroMaterialRegistry#getMaxCuttingStrength()} (it is also calculated during its post-initialization), so
* any post-init phase works.
* *
* @param harvestLevel the new cutting strength * @param harvestLevel the new cutting strength
*/ */
@@ -8,6 +8,7 @@ import codechicken.multipart.Tags;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
@@ -47,6 +48,15 @@ public final class MicroblockMod$ {
MicroblockProxy$.MODULE$.postInit(); MicroblockProxy$.MODULE$.postInit();
} }
/**
* Recomputes the cached maximum saw strength once every mod's post-init has run, so saws created or re-tiered in a
* later post-init (Iguana Tweaks' {@code after:*}) are counted. The post-init value is kept until then.
*/
@Mod.EventHandler
public void loadComplete(FMLLoadCompleteEvent event) {
MicroMaterialRegistry.calcMaxCuttingStrength();
}
@Mod.EventHandler @Mod.EventHandler
public void beforeServerStart(FMLServerAboutToStartEvent event) { public void beforeServerStart(FMLServerAboutToStartEvent event) {
MicroMaterialRegistry.setupIDMap(); MicroMaterialRegistry.setupIDMap();
@@ -5,6 +5,7 @@ import codechicken.multipart.Tags;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent; import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent; import cpw.mods.fml.common.event.FMLServerAboutToStartEvent;
@@ -35,6 +36,11 @@ public final class MicroblockMod {
MicroblockMod$.MODULE$.postInit(event); MicroblockMod$.MODULE$.postInit(event);
} }
@Mod.EventHandler
public static void loadComplete(FMLLoadCompleteEvent event) {
MicroblockMod$.MODULE$.loadComplete(event);
}
@Mod.EventHandler @Mod.EventHandler
public static void beforeServerStart(FMLServerAboutToStartEvent event) { public static void beforeServerStart(FMLServerAboutToStartEvent event) {
MicroblockMod$.MODULE$.beforeServerStart(event); MicroblockMod$.MODULE$.beforeServerStart(event);
@@ -12,6 +12,8 @@ import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk; import net.minecraft.world.chunk.Chunk;
import codechicken.lib.packet.PacketCustom; import codechicken.lib.packet.PacketCustom;
import codechicken.microblock.PostMicroblockClient;
import codechicken.microblock.TMicroOcclusionClient;
import codechicken.multipart.handler.MultipartProxy; import codechicken.multipart.handler.MultipartProxy;
import codechicken.multipart.handler.MultipartSPH; import codechicken.multipart.handler.MultipartSPH;
import codechicken.multipart.handler.MultipartSaveLoad; import codechicken.multipart.handler.MultipartSaveLoad;
@@ -60,7 +62,10 @@ public final class MultipartHelper {
* A non-null world must be client-side. The tile receives its saved coordinates, binds every part, then runs * A non-null world must be client-side. The tile receives its saved coordinates, binds every part, then runs
* {@link TMultiPart#onWorldJoin()} and local {@link TMultiPart#onPartChanged(TMultiPart)} callbacks before * {@link TMultiPart#onWorldJoin()} and local {@link TMultiPart#onPartChanged(TMultiPart)} callbacks before
* rebuilding its render state. It is not validated, placed in a chunk, or announced to neighboring blocks. A null * rebuilding its render state. It is not validated, placed in a chunk, or announced to neighboring blocks. A null
* world creates a worldless staged preview; render caches initialize lazily when a renderer uses the tile. * world creates a worldless staged preview that only loads and binds its parts, like
* {@link TileMultipart#loadPartList(java.util.Collection)} without a world: no part callbacks run, because parts
* may assume a world in them. Stock microblocks still get their client render bounds, which they otherwise only
* compute in those callbacks. Render caches initialize lazily when a renderer uses the tile.
* *
* @param world client preview world, or null for worldless staging * @param world client preview world, or null for worldless staging
* @param tag saved multipart NBT; it is read but not mutated * @param tag saved multipart NBT; it is read but not mutated
@@ -104,14 +109,26 @@ public final class MultipartHelper {
tile.setWorldObj(world); tile.setWorldObj(world);
if (world != null) { if (world != null) {
tile.forEachPart(TMultiPart::onWorldJoin); tile.forEachPart(TMultiPart::onWorldJoin);
}
tile.internalPartChange(null); tile.internalPartChange(null);
if (world != null) {
tile.markRender(); tile.markRender();
} else {
tile.forEachPart(MultipartHelper::initWorldlessPreviewRenderState);
} }
return tile; return tile;
} }
/**
* Computes the client render bounds that stock microblocks otherwise only set in part callbacks. It needs the bound
* tile, not a world, and gives the same bounds as a world-backed part change.
*/
private static void initWorldlessPreviewRenderState(TMultiPart part) {
if (part instanceof TMicroOcclusionClient) {
((TMicroOcclusionClient) part).recalcBounds();
} else if (part instanceof PostMicroblockClient) {
((PostMicroblockClient) part).recalcBounds();
}
}
/** /**
* Note. This method should only be used to send tiles that have been created on the server mid-game via an NBT load * Note. This method should only be used to send tiles that have been created on the server mid-game via an NBT load
* to clients. * to clients.
@@ -21,7 +21,7 @@ import cpw.mods.fml.common.Mod;
class MicroblockModCharacterizationTest { class MicroblockModCharacterizationTest {
private static final Set<String> EVENT_METHOD_NAMES = new TreeSet<>( private static final Set<String> EVENT_METHOD_NAMES = new TreeSet<>(
Arrays.asList("beforeServerStart", "handleIMC", "init", "postInit", "preInit")); Arrays.asList("beforeServerStart", "handleIMC", "init", "loadComplete", "postInit", "preInit"));
private static final Set<String> PUBLIC_METHODS = new TreeSet<>( private static final Set<String> PUBLIC_METHODS = new TreeSet<>(
Arrays.asList( Arrays.asList(
@@ -30,6 +30,7 @@ class MicroblockModCharacterizationTest {
"beforeServerStart(Lcpw/mods/fml/common/event/FMLServerAboutToStartEvent;)V", "beforeServerStart(Lcpw/mods/fml/common/event/FMLServerAboutToStartEvent;)V",
"handleIMC(Lcpw/mods/fml/common/event/FMLInterModComms$IMCEvent;)V", "handleIMC(Lcpw/mods/fml/common/event/FMLInterModComms$IMCEvent;)V",
"init(Lcpw/mods/fml/common/event/FMLInitializationEvent;)V", "init(Lcpw/mods/fml/common/event/FMLInitializationEvent;)V",
"loadComplete(Lcpw/mods/fml/common/event/FMLLoadCompleteEvent;)V",
"postInit(Lcpw/mods/fml/common/event/FMLPostInitializationEvent;)V", "postInit(Lcpw/mods/fml/common/event/FMLPostInitializationEvent;)V",
"preInit(Lcpw/mods/fml/common/event/FMLPreInitializationEvent;)V")); "preInit(Lcpw/mods/fml/common/event/FMLPreInitializationEvent;)V"));