x4ui

Is a UI framework for my mods.
Back to Files

x4ui-r1.0b7.jar

File namex4ui-r1.0b7.jar
Uploader
X4yiiX4yii
Uploaded
Nov 19, 2026
Downloads
56
Size
2.4 MB
Mod Loaders
Forge
File ID
9703801
Type
B
Beta
Supported game versions
  • 1.12.2

Curse Maven Snippet

Forge

implementation fg.deobf("curse.maven:x4ui-1656104:9703801")

Learn more about Curse Maven

What's new

Screen Architecture & Side Panels (ScreenHost & GuiBaseContainer)

  • New ScreenHost: Extracts and unifies the shared controller behind GuiBaseScreen and GuiBaseContainer (component tree, overlays, RPCs, toasts, input routing, and lifecycle).
  • Full GuiBaseContainer parity:
    • Native support for attachSidePanel(DockSide, ...) (requestSidePanelLayout(), layoutSidePanelsAndSync()), createCenteredWindow(maxWidth, maxHeight), hasClickedOutside(...) (clean JEI and side-panel hit-testing), removeComponent(...), and setAnimateOpen(boolean).
  • New fluent GuiBuilder: Rewritten non-generic declarative builder (replacing the old GuiBuilder<T>) with modern helpers for windows, panels, buttons, and reactive bindings.

Layout Engine, Geometry & New Containers

  • Constraints & Flexbox in GuiComponent + FlexLayout:
    • GuiComponent adds minWidth, maxWidth, minHeight, maxHeight, baseWidth/baseHeight, flexGrow, flexShrink, and fluent setters (withMinWidth, withMaxWidth, withMinSize, withMaxSize, withFlexGrow, withFlexShrink, withFlex), plus add(child, Consumer<T>), invalidateAbs(), isClippedBy(IGraphics), and onBoundsChanged().
    • FlexLayout implements water-filling distribution for flexGrow/flexShrink respecting min/max constraints and fixing bounds and padding calculations.
  • CornerRadii, BorderSides & DockSide primitives:
    • IGraphics and GLGraphics add per-corner rounding (CornerRadii) and selective border rendering (BorderSides).
    • GuiPanel supports CornerRadii, BorderSides, suppressChrome, and themed cards.
  • GuiGridPanel: New grid container with autoColumns for responsive card or slot grids.
  • GuiUnionPanel: New container that visually merges docked panels (DockSide) with continuous corners and borders.

Components, Rendering & Themes

  • GuiDropdown: Full keyboard navigation (onKeyPress with arrow keys, Enter, and Escape), highlightedIndex, static GuiDropdown.of(State<T>, List<T>), and hit-testing/overlay fixes.
  • Widget & Render Fixes: Clipping, focus, state, and rendering fixes across GuiAnimator, GuiToastManager, GuiOverlayManager, GuiVideo, GuiAudio, GuiVirtualList, GuiModelRender, GuiMarkdown, GuiTextInput, GuiButton, GuiImage, GuiLabel, GuiScrollPanel, GuiSlot, GuiToggle, DefaultTheme, and typed sliders (GuiSlider*).

Security, Networking, Media & Runtime

  • Security & Network Hardening (SecurityUtils, ActionGuard, Packet*, UIChannels):
    • SecurityUtils hardens SSRF checks (blocking private, loopback, link-local, and multicast IPv4/IPv6 ranges), unsafe redirects, and path-traversal attempts.
    • ActionGuard, PacketGuiAction, PacketGuiRpc, PacketHandshake, and StateContainerListener enforce stricter payload, bounds, and session checks.
    • UIChannels, UINetwork, ClientSessionTracker, ClientProxy, and CommonProxy streamline channel management and session cleanup.
  • Reactive State & Media Pipeline:
    • State<T> isolates per-listener exceptions during set(T) delivery, and UIStateBus enforces scope (SCREEN/SESSION/GLOBAL) and type safety.
    • MediaPipeline, OpenALAudioSink, DirectMemoryVideoDecoder, FFmpegAudioDecoder, and JCodecVideoDecoder fix native buffer/process leaks, A/V sync edge cases, and idempotent cleanup.
    • PlatformBridge (Java 8 & Java 21) improves native resource cleanup and CleanroomMC compatibility.

Breaking Changes & Beta Cleanup

  • Dead/Legacy Code Removal: removed IMediaService, MediaService, IMediaAsset, AssetCallback, RemoteResourceManager, DownloadManager, FFmpegProcessDecoder, IGuiActionSender, GuiCard, GuiTooltip, GuiBaseScreen.drawTitle()/drawBackground(), legacy static helpers in GuiComponent, and the old GuiBuilder<T>.
  • Migrated cleanCache(modId, daysOld) to MediaPipeline.getInstance().cleanCache(modId, daysOld).
  • Simplified GuiPanel.spacer() to operate directly via flexGrow = 1.0f.
  • Recommended Maven Distribution: Modrinth Maven (https://api.modrinth.com/maven with rfg.deobf("maven.modrinth:x4ui:r1.0b7")) is now the official recommended repository for consumer mods.

This mod has no additional files