0.3.4
Tinted item layers, on any item.
Blocks could already tint an overlay. Items could not, and the reason was structural: RetroItemAccess.overlay(id) flattens its sprite into the atlas at stitch time, so by the time anything could apply a color the layers are one image. The only tinted path was implementing RetroLayeredTexture on the item class, which is impossible when wrapping a subclass the mod does not own - which is exactly what RetroItemAccess.of(id -> new MyItem(id, ...)) is for.
RetroItemAccess.of(id -> new MyOreItem(id, material))
.texture(id("ore_reg/raw"))
.overlay(id("ore_reg/raw_overlay"), material.color)
.register(id("raw_" + material.id));overlay(textureId, tint)draws as a separate render-time pass, so the0xRRGGBBmultiply survives. It is declared, not implemented, so it needs no interface and no subclass of yours.- The overlay texture no longer has to be registered separately. It goes through
getOrAddItemTexture, so the same overlay declared across twenty items costs one atlas slot, and the handle resolves its index at draw time - naming a texture before the atlas is stitched still points at the right sprite. layer(RetroTextureLayer)appends a fully specified layer (a tinted base, or one built from a sprite index you already hold), andgetDeclaredLayers()reads them back.- An item that implements
RetroLayeredTexturestill wins, so a component-driven per-stack look keeps overriding the declared one.
Layer 0 is seeded from the item's own texture, preferring the tracked RetroTexture handle so the base resolves at draw time too.
Built and validated with -Pstationapi on Ornithe (b1.7.3): all four launch smoke suites, plus the four-stage conversion pipeline (populate, forward and reverse convert, runtime verify). The client suite asks the renderer the same question it asks every frame, so a declaration that never reaches the screen fails the build rather than rendering untinted in game; it passes under StationAPI too, which has its own atlas.
Full feature set: https://matthewperiut.github.io/retroapi/features-0.3.4.html