Links
Tags
Creators
Details
0.3.4
Compatibility
Required content
Changes
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
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:iFaqJ8QH:dRjycP5g"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:iFaqJ8QH:dRjycP5g"
}


