All versions
0.0.3
Release
SLib 0.0.34 months ago 33
Compatibility
Minecraft: Java Edition
1.20.1–1.20.6
Platform
Forge
Supported environments
Client and server
Changes
Fixes
- Fixed
AnimationRunner.valueOrdropping finished animations back to the fallback. Open state for Modal, Drawer, Toast slide-in and similar held values no longer snaps to zero after the open animation completes. Finished values are retained in a last-value map until cancel or clear. - Fixed nested
ScissorClip. Afterpush, the parent clip was read withpeek()on the child that had just been pushed, so nested regions never intersected the real parent. Intersect now runs against the true parent before the child is stacked. - Fixed OpenGL scissor Y origin. Clip rectangles are converted with
window.getHeight() - (y + h) * guiScaleso nested rounded panels and dropdown lists clip on the correct vertical axis. - Fixed empty / non-overlapping scissor pushes leaving unbalanced stack state. Zero-area clips are still pushed as empty markers so every
pushhas a matchingpop. - Fixed
Tooltip.tickremoving entries exactly when the show delay expired, so tooltips never became visible. Entries now wait for delay, render for a duration, then expire. - Fixed
Toastqueue growth. Expired and dismissed toasts stayed in the queue forever. Entries auto-dismiss after duration, animate out, dispose animation ids and leave the queue. Queue size is capped atMAX_QUEUED(24). - Fixed
Toast.rendercallingAnimationRunner.tick()per dismissed entry, which double-stepped every active animation on the client. - Fixed
RippleEffectregisteringAnimation.of(0, 0, 1, ...)so the ripple radius never expanded. Ripples now animate0 -> 1over the style / duration window and dispose their animation ids on finish. - Fixed horizontal
ScrollContainerscrollbar thumb: position and size used the vertical layout (track X / full track width) instead of thumb X / thumb width along the track. - Fixed
SearchBarstealing outside clicks. Unfocus on click outside no longer returnstrue, so other widgets can receive the same click. - Fixed
FocusManager.unregisterwhen removing an item before the active index: focus no longer jumps to the wrong widget, and the removed focusable is blurred when it was active. - Fixed
Modal.isOpen/Drawer.isOpenusingAnimationRunner.isActive, which becomes false the moment the open animation finishes even when the panel should stay open. Open state is now based on the held animation value. - Fixed
RoundedSDF draw path multiplying GUI coordinates bypixelScalefor both vertices and uniforms, which mis-scaled rounded geometry at GUI scale 2x / 3x / 4x. Vertices and rect uniforms stay in GUI space; feather and pixel scale remain for AA. - Fixed
BlurBackground.resetStatedropping tracked resources without closing them. Reset now closes allocated resources, then clears disposed state.
Improvements
AnimationTickernow advances Toast, Tooltip and RippleEffect on client tick end alongsideAnimationRunner, so consumers do not need a separate host tick for feedback widgets.AnimationRunner.has(id)reports whether an active or last-value entry exists for an id.Toastadds queue caps, animation dispose on clear/remove, and stable slide-out based on the held slide-in value.Tooltipaddsduration(ms),moveAnchor(x, y),size(),MAX_PENDING, and live cursor tracking forFOLLOW_CURSORwhile rendering.RippleEffectaddstrigger(..., durationMs),tick(deltaMs), active cap, scissor-awarerenderAlland dispose of runner ids on removal.ScrollContaineraddscontentSize(int),deceleration(float),isDragging(), corrected wheel direction (scroll up moves content up) and kinetic step scaled by frame delta.Modalbackdrop usesBlurBackground.renderDimOverlay, panel uses a short scale-in, body text wraps to the dialog width, and panel alpha tracks the open progress.Drawercontent is scissored to the visible panel;isVisiblematchesisOpen.Binding.firesnapshots listeners so observers can register/unregister during notify without concurrent modification.EventBus.emitdispatches to handlers registered on superclasses and interfaces of the event type, not only the exact class.Dropdownhandles empty option lists safely (selectedIndex = -1) and always pairs scissor push/pop withtry/finally.Sliderhover animation can reverse mid-flight instead of waiting for the previous tween to finish.Togglethumb travel uses horizontal padding so the knob does not sit flush on the track edge.
UI / Sync
RoundedButtondraws a true SDF outline ring plus a soft hover glow instead of a solid enlarged fill behind the button body.SearchBarclips the text field (selection, caret, string) so long queries no longer paint over the magnifier icon; caret blink interval is stable from first focus.ScissorClip.isActive()exposes whether a clip stack is currently applied.- Additive API only inside
0.0.x. Consumer mods should keepdependencies.slibrange[0.0.1, 0.1.0)(or pin0.0.3if they want this patch explicitly).
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:CfkGe24d:z6Bm0sGV"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:CfkGe24d:z6Bm0sGV"
}

