Skip to content

0.3.2

Choose a tag to compare

@matthewperiut matthewperiut released this 27 Jul 02:02
· 29 commits to main since this release

Shared component state, and the IDE storm.

Two bugs that only showed up once mods started leaning on 0.3.x. Update if you use data components, or if your IDE has started demanding you implement methods you never wrote.

  • Fixed: every item shared one set of components. RetroComponentType.getDefault() returned the exact instance passed at registration, so RetroComponents.get(stack, TYPE) on any stack that had not set a value handed back the same object every time. Mutating it — get(stack, LIST).add(x) — wrote into the value every other stack reads, so the data appeared on every item in the game at once, and deleting one item's value looked like it worked only sometimes. Only mutable components could show it. List/Set/Map defaults are now copied per read, so existing mods are fixed with no code change, and RetroComponents.registerSupplied(id, supplier, serializer) covers a mutable default of a type RetroAPI cannot copy for you.
  • Fixed: mods inherited 56 unimplemented methods. RetroItemAccess and RetroBlockAccess declared their methods abstract, and 0.3.0 made interface injection actually work — so Item and Block genuinely implement them, and from an IDE's point of view every class extending either had to implement all 56. javac never complained, because it does not re-verify a binary superclass, which is why it looked like an IDE-only hallucination and only surfaced once the class implemented some interface of its own. Every method is now a default that throws; the mixin's implementation is a method on the class, and a class method always wins over an interface default, so runtime behavior is unchanged.
  • Fixed: the client no longer tries to load dedicated-server classes. Thirteen mixins targeting net.minecraft.server.* sat in the mixin config's common list, so every client launch attempted each one and logged Cannot load class ... in environment type CLIENT. b1.7.3 has no integrated server — singleplayer is the client — so none could ever apply there. A client launch now logs no mixin warnings at all.

Reminder for anyone storing block state as an integer: RetroBlockState.getIndex() is 12 bits, not 4. The low nibble rides vanilla metadata and bits 4–11 live in the sidecar, so world.setBlockMeta(x, y, z, state.getIndex()) silently truncates for any block with more than 16 states. Use RetroStates.set(...).

Full feature set: https://matthewperiut.github.io/retroapi/features-0.3.0.html

Built and validated with -Pstationapi on Ornithe (b1.7.3): all four launch smoke suites pass (client, server, and both with StationAPI), plus the headless populate self-check and the vanilla↔StationAPI conversion round-trip.