Repository navigation
Strata 0.1.4
Strata 0.1.4
Strata 0.1.4 adds a general scale-to-fit modifier for fixed design-space layouts.
It also preserves committed frame-layer order on deferred Fabric GUI renderers when fractional transforms make native overlap inference incomplete.
Install
Compile application UI source against the API, then install exactly one Fabric runtime matching the active Minecraft version together with Fabric Language Kotlin:
dependencies {
compileOnly("dev.s7a.strata:strata-api:0.1.4")
modRuntimeOnly("dev.s7a.strata:strata-runtime-minecraft-fabric-<minecraft-version>:0.1.4")
modRuntimeOnly("net.fabricmc:fabric-language-kotlin:<compatible-version>")
}The consuming Mod must require Strata in fabric.mod.json:
{
"depends": {
"strata": ">=0.1.4"
}
}Fixed design-space scaling
Modifier.scaleToFit(contentSize, contentAlignment, allowUpscaling) measures its component subtree once at the strictly positive fixed contentSize and uniformly contains that complete design surface in the modifier's outer bounds without cropping or distortion.
The smaller width or height ratio determines the scale, and contentAlignment positions any remaining space.
The default keeps the scale at or below one; set allowUpscaling = true when a filled outer viewport should also enlarge the design surface.
Place outer viewport modifiers before scaleToFit and design-space modifiers after it:
val modifier = Modifier.Empty
.fillMaxSize()
.scaleToFit(
contentSize = IntSize(640, 360),
allowUpscaling = true,
)The retained runtime applies the same accumulated transform to descendant geometry, portable painting, clips, pointer input, focus visibility, semantics, and root-overlay anchors.
This lets one screen keep its layout and interaction model while the host viewport or GUI density changes.
Zero-sized outer bounds leave the design subtree unplaced for that pass rather than producing an invalid scale.
Pointer event positions remain in tree space; local positions are inverse-mapped and floored, drag deltas inverse-scale, and scroll units remain unchanged.
Root-overlay commands remain in root space while only their anchors cross the child transform.
Fabric frame-layer ordering
Fractional transforms can make two visible layers overlap even when their transformed integer bounds do not express the last shared row or column.
Deferred Minecraft GUI renderers may otherwise keep those layers in one native node and reorder them by texture or pipeline state.
Deferred Fabric runtimes now advance the native ordering stratum between every adjacent resolved Strata frame layer.
Portable fills, direct sampled images, fallbacks, and platform draws therefore retain their committed display-list order without depending on native overlap inference.
Adapters for immediate-rendering Minecraft versions keep the same shared sequence through a no-op ordering boundary.
Compatibility with 0.1.3
The public API change is additive: existing modifiers remain available, and custom retained nodes can implement the new child-transform SPI only when they need equivalent subtree behavior.
A child transform applies to the provider node's child subtree, not to the provider node's own paint.
Custom implementations must invalidate layout whenever their reported transform can change without remeasurement because the runtime may retain that transform until layout invalidation.
Opaque platform draw commands, including native item rendering, still require unit scale and exact integer translation because their payload cannot be transformed generically.
Painting fails before adapter output when such a command appears below an unsupported transform.
Keep all Strata artifacts aligned on 0.1.4.
Minecraft compatibility
The supported matrix remains Minecraft 1.20 through 1.20.6, Minecraft 1.21 through 1.21.11, 26.1, and 26.2.
Minecraft 1.20 through 1.20.4 use Java 17, Minecraft 1.20.5 through 1.21.11 use Java 21, and 26.1 through 26.2 use Java 25.
Distribution
- Maven Central contains the five common artifacts and 21 exact versioned Fabric runtimes.
- GitHub Releases contains 21 runtime JARs, 21 detached signatures, and
SHA256SUMS. - Modrinth contains one 0.1.4 version entry for each of the 21 exact Minecraft versions after project review.