← Volver a ChangelogsBack to Changelogs

X4UI HistorialHistory

Registro completo de actualizaciones de este proyecto.Complete update log for this project.

X4UI Framework r1.0b7

11/18/2026

X4UI r1.0b7

Arquitectura de Pantallas y Paneles Laterales (ScreenHost & GuiBaseContainer)

  • Nuevo ScreenHost: Extrae y unifica el controlador común entre GuiBaseScreen y GuiBaseContainer (árbol de componentes, overlays, RPCs, toasts, entrada y ciclo de vida).
  • GuiBaseContainer con paridad completa:
    • Soporte nativo de attachSidePanel(DockSide, ...) (requestSidePanelLayout(), layoutSidePanelsAndSync()), createCenteredWindow(maxWidth, maxHeight), hasClickedOutside(...) (integración limpia con paneles laterales y JEI), removeComponent(...) y setAnimateOpen(boolean).
  • Nuevo GuiBuilder fluido: Reescritura del constructor declarativo (reemplaza al antiguo GuiBuilder<T>) con helpers modernos para ventanas, paneles, botones y bindings reactivos.

Motor de Layout, Geometría y Nuevos Contenedores

  • Restricciones y Flexbox en GuiComponent + FlexLayout:
    • GuiComponent añade minWidth, maxWidth, minHeight, maxHeight, baseWidth/baseHeight, flexGrow, flexShrink y setters fluidos (withMinWidth, withMaxWidth, withMinSize, withMaxSize, withFlexGrow, withFlexShrink, withFlex), además de add(child, Consumer<T>), invalidateAbs(), isClippedBy(IGraphics) y onBoundsChanged().
    • FlexLayout implementa distribución water-filling para flexGrow/flexShrink respetando límites min/max y corrigiendo cálculo de bounds y padding.
  • Primitivas CornerRadii, BorderSides y DockSide:
    • IGraphics y GLGraphics incorporan renderizado de esquinas independientes (CornerRadii) y bordes selectivos (BorderSides).
    • GuiPanel añade soporte de CornerRadii, BorderSides, suppressChrome y tarjetas temáticas.
  • GuiGridPanel: Nuevo contenedor en grilla con autoColumns para distribuir tarjetas o slots de forma adaptable.
  • GuiUnionPanel: Nuevo contenedor que fusiona visualmente paneles acoplados (DockSide) con esquinas y bordes continuos.

Componentes, Renderizado y Temas

  • GuiDropdown: Soporte de navegación por teclado (onKeyPress con flechas, Enter y Escape), highlightedIndex, constructor estático GuiDropdown.of(State<T>, List<T>) y mejoras de hit-testing/overlay.
  • Correcciones en Widgets y Render: Mejoras de clipping, foco, estado y renderizado en GuiAnimator, GuiToastManager, GuiOverlayManager, GuiVideo, GuiAudio, GuiVirtualList, GuiModelRender, GuiMarkdown, GuiTextInput, GuiButton, GuiImage, GuiLabel, GuiScrollPanel, GuiSlot, GuiToggle, DefaultTheme y sliders (GuiSlider*).

Seguridad, Red, Multimedia y Runtime

  • Endurecimiento de Seguridad y Red (SecurityUtils, ActionGuard, Packet*, UIChannels):
    • SecurityUtils refuerza la protección contra SSRF (bloqueo de IPv4/IPv6 privadas, loopback, link-local y multicast), redirecciones inseguras y path-traversal.
    • ActionGuard, PacketGuiAction, PacketGuiRpc, PacketHandshake y StateContainerListener añaden validaciones estrictas de payload, rangos y sesión.
    • UIChannels, UINetwork, ClientSessionTracker, ClientProxy y CommonProxy optimizan la gestión de canales y limpieza de sesiones.
  • Estado Reactivo y Multimedia:
    • State<T> aísla excepciones entre listeners durante set(T) y UIStateBus refuerza la seguridad de tipos y alcances (SCREEN/SESSION/GLOBAL).
    • MediaPipeline, OpenALAudioSink, DirectMemoryVideoDecoder, FFmpegAudioDecoder y JCodecVideoDecoder corrigen fugas de buffers/procesos nativos, sincronización A/V y limpieza idempotente.
    • PlatformBridge (Java 8 y Java 21) mejora la limpieza de recursos nativos y compatibilidad con CleanroomMC.

Breaking Changes y Limpieza Beta

  • Eliminación de código muerto/legacy: se eliminaron IMediaService, MediaService, IMediaAsset, AssetCallback, RemoteResourceManager, DownloadManager, FFmpegProcessDecoder, IGuiActionSender, GuiCard, GuiTooltip, GuiBaseScreen.drawTitle()/drawBackground(), los métodos estáticos legacy de GuiComponent y el antiguo GuiBuilder<T>.
  • cleanCache(modId, daysOld) se migró a MediaPipeline.getInstance().cleanCache(modId, daysOld).
  • GuiPanel.spacer() ahora opera directamente sobre flexGrow = 1.0f.
  • Distribución Maven recomendada: se adopta Modrinth Maven (https://api.modrinth.com/maven con rfg.deobf("maven.modrinth:x4ui:r1.0b7")) como canal oficial para mods consumidores.

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.

X4UI Framework r1.0b6

11/13/2026

X4UI r1.0b6

Compatibilidad Dual Oficial (Forge 1.12.2 + CleanroomMC)

  • Soporte oficial Java 8 (Forge 1.12.2 + LWJGL 2) y Java 25 (CleanroomMC + LWJGL 3): PlatformBridge implementado como Multi-Release JAR (META-INF/versions/21/) para usar Cleaner y virtual threads en JVMs modernas con fallback seguro en Java 8.
  • Abstracciones de Entrada y Gráficos:
    • KeyCodes desacopla constantes de teclado de org.lwjgl.input.Keyboard.
    • UIInput normaliza deltas de rueda del mouse (LWJGL 2 ±120 y LWJGL 3/GLFW) y protege coordenadas del mouse ante displayWidth == 0 / displayHeight == 0.
    • IGraphics incorpora clearDepthBuffer() y carga de texturas BGRA sin llamadas directas a GL11/GL12 en componentes.

Framework Flexible Servidor ↔ Cliente (Con o Sin Container)

  • Nuevo UINetwork + ScreenRegistry + PacketHandshake: Registro y apertura remota de pantallas desde servidor (openScreen), cierre remoto (closeScreen), toasts (sendToast), handshake automático y modo server-optional (isServerSupported(), hasClient(player)).
  • RPC Request–Response (PacketGuiRpc + RpcResult): Consultas asíncronas cliente → servidor desde GuiBaseScreen/GuiBaseContainer con request(...), timeout configurable, cancelación automática al cerrar la pantalla y NO_SERVER_SUPPORT en servidores sin x4ui.
  • Estado por Pantalla y Lotes (UIStateBus.Scope.SCREEN + PacketStateBatch): syncedState(key, valor) se limpia automáticamente en onGuiClosed(); UIStateBus.scopedKey(ns, key) y clearNamespace(ns) evitan colisiones.
  • Canales Multi-Jugador (UIChannels + ClientSessionTracker): Suscripción automática por canal (openChannelScreen), broadcastState, broadcastBatch y broadcastToast con desuscripción al cerrar pantalla o desconectarse.
  • Seguridad en Red (ActionGuard + Rate-Limiting): Guardas componibles (opLevel, withinDistance, withinEntityDistance, require) y cooldown por jugador/acción (50ms por defecto).

Diseño Minimalista y Motor de Layout

  • Tema sólido minimalista por defecto: Paleta oscura limpia en DefaultTheme y variantes de GuiButton.
  • Primitivas de GuiPanel y FlexAlign: GuiPanel.row, GuiPanel.column, GuiPanel.card, GuiPanel.spacer(), FlexAlign (START, CENTER, END, STRETCH), createCenteredWindow y GuiScrollPanel.vertical.
  • Correcciones de Layout: Fix de percentWidth respecto a padding y reserva automática de barra en GuiScrollPanel.

Multimedia, Seguridad y Limpieza

  • FFmpeg en el OS del usuario (MediaManager): Descubrimiento automático de ffmpeg en Linux, macOS y Windows 10/11 (en lugar de descargarlo en .minecraft/), con fallback automático a JCodec cuando no está disponible.
  • Manejo de errores en GuiVideo: Estado de error visible con diagnóstico, barra de estado, limpieza segura de recursos y recuperación ante fallos de red o códec.
  • Seguridad y Sincronización: SecurityUtils para validación SSRF y path traversal; StateContainerListener atómico de 32-bit; migración de logs a Log4j2; eliminación total de shims @Deprecated.

Official Dual Runtime Support (Forge 1.12.2 + CleanroomMC)

  • Official Java 8 (Forge 1.12.2 + LWJGL 2) & Java 25 (CleanroomMC + LWJGL 3) support: PlatformBridge implemented as a Multi-Release JAR (META-INF/versions/21/) using Cleaner and virtual threads on modern JVMs with safe Java 8 fallbacks.
  • Input & Graphics Abstractions:
    • KeyCodes decouples key constants from org.lwjgl.input.Keyboard.
    • UIInput normalizes mouse wheel deltas (LWJGL 2 ±120 and LWJGL 3/GLFW) and guards mouse coordinates against displayWidth == 0 / displayHeight == 0.
    • IGraphics adds clearDepthBuffer() and BGRA texture upload without direct GL11/GL12 calls in components.

Flexible Server ↔ Client Framework (With or Without Container)

  • New UINetwork + ScreenRegistry + PacketHandshake: Remote screen registration and opening (openScreen), remote closing (closeScreen), toast notifications (sendToast), automatic handshake, and server-optional mode (isServerSupported(), hasClient(player)).
  • Request–Response RPC (PacketGuiRpc + RpcResult): Asynchronous client → server queries from GuiBaseScreen/GuiBaseContainer via request(...) with configurable timeout, automatic cancellation on screen close, and NO_SERVER_SUPPORT on vanilla/client-only servers.
  • Screen-Scoped State & Batching (UIStateBus.Scope.SCREEN + PacketStateBatch): syncedState(key, initialValue) is automatically cleared in onGuiClosed(); UIStateBus.scopedKey(ns, key) and clearNamespace(ns) prevent key collisions.
  • Multi-Player Channels (UIChannels + ClientSessionTracker): Automatic channel subscription (openChannelScreen), broadcastState, broadcastBatch, and broadcastToast with cleanup on screen close or disconnect.
  • Network Security (ActionGuard + Rate-Limiting): Composable guards (opLevel, withinDistance, withinEntityDistance, require) and per-player/action cooldown (50ms default).

Minimalist Design & Layout Engine

  • Solid minimalist default theme: Clean dark palette in DefaultTheme and GuiButton variants.
  • GuiPanel & FlexAlign primitives: GuiPanel.row, GuiPanel.column, GuiPanel.card, GuiPanel.spacer(), FlexAlign (START, CENTER, END, STRETCH), createCenteredWindow, and GuiScrollPanel.vertical.
  • Layout fixes: Fixed percentWidth box-model padding calculation and automatic scrollbar width reservation in GuiScrollPanel.

Media, Security & Cleanup

  • OS-level FFmpeg discovery (MediaManager): Automatically locates ffmpeg on Linux, macOS, and Windows 10/11 (instead of bundling inside .minecraft/), with automatic fallback to JCodec when unavailable.
  • GuiVideo error handling: Visible error state with diagnostics, status bar, safe resource cleanup, and graceful recovery on network or codec failures.
  • Security & Sync: SecurityUtils for SSRF and path traversal protection; atomic 32-bit StateContainerListener; Log4j2 logger migration; complete removal of @Deprecated shims.

X4UI Framework r1.0b5

9/10/2026

X4UI r1.0b5

Abstracción Gráfica (IGraphics)

  • Capa Gráfica Inmediata: Introducción de IGraphics y GLGraphics. Desacopla el renderizado de componentes de llamadas directas a OpenGL y LWJGL.
  • Pila de Estados: Gestión jerárquica de transformaciones matriciales, opacidad global (pushAlpha/popAlpha), tinte de color (pushColorTint/popColorTint), tipografía activa y recorte por tijera (pushClip/popClip) mediante save() y restore().
  • Primitivas de Dibujo: Métodos para rectángulos planos y redondeados, bordes, líneas, círculos y gradientes.

Sistema de Tipografía (IFont, FontRegistry)

  • Abstracción IFont: Interfaz unificada de renderizado y métricas de texto independiente de FontRenderer.
  • Motor TrueTypeFont: Rasterización acelerada por hardware para fuentes vectoriales (.ttf/.otf) y del sistema con anti-aliasing y soporte completo de códigos de formato vanilla (§0-§f).
  • FontRegistry: Registro centralizado para carga, resolución y recarga dinámica de fuentes ante eventos de recursos (F3 + T).
  • Integración: Soporte de fuentes personalizadas propagado mediante IGraphics.setFont() y GuiComponent.withFont().

Arquitectura de Componentes y Ciclo de Vida (GuiComponent)

  • Ciclo de Vida Estandarizado: Introducción de hooks onAttached(), onDetached(), onDestroy() y método de actualización por fotograma update(float deltaTime).
  • Dimensionamiento y Posición Porcentual: Métodos withPercentWidth(), withPercentHeight() y withPercentPosition() calculados dinámicamente respecto al contenedor padre.
  • API Fluida Directa: Configuración encadenable de posición, tamaño, márgenes, padding, capas visuales (withLayer), tipografía y temas directamente en GuiComponent.
  • Gestión de Estados Reactivos: Desvinculación automática de escuchadores de State<T> al destruir componentes para prevenir retención de memoria.

Componentes Visuales

  • GuiImage (9-Slice): Soporte nativo para escalado de bordes 9-slice mediante NineSliceConfig.
  • GuiSprite: Motor de animación 2D basado en fuentes de fotogramas (SpriteSheetSource, SequenceSource), control de FPS y modos de reproducción (LoopMode).
  • GuiSlider: Reestructuración modular tipada (GuiSliderInt, GuiSliderFloat, GuiSliderDouble) con soporte para orientación horizontal y vertical.
  • GuiTextInput: Desplazamiento horizontal para textos largos, selección por arrastre de ratón y atajos de teclado para navegación y borrado por palabras (Ctrl+Backspace, Ctrl+Delete).

Superposiciones en GUI (GuiOverlayManager)

  • Inyección no Intrusiva: Pipeline para acoplar componentes e interfaces a pantallas vanilla (GuiContainer) o de otros mods sin sustituir la clase de pantalla original.
  • Acoplamiento (OverlayDockManager): Anclaje a bordes de contenedor (ContainerAnchor) con apilamiento dinámico entre paneles.

Integración con JEI (Just Enough Items)

  • Compatibilidad JEI: Registro automático de rectángulos de exclusión para contenedores y superposiciones activas de X4UI, evitando solapamiento con la interfaz de JEI.
  • Interacción: Soporte para atajos de consulta de recetas (R) y usos (U) sobre componentes GuiSlot.

Buses y Registros Globales

  • UIStateBus: Bus centralizado para comunicación desacoplada y reactiva entre interfaces y módulos independientes.
  • ThemeRegistry: Registro centralizado para registrar, consultar y alternar instancias de ITheme.

Arquitectura de Red y Sidedness

  • Aislamiento por Proxies (@SidedProxy): Separación estricta en ClientProxy y CommonProxy, garantizando cero carga de clases gráficas o multimedia en servidores dedicados.
  • Conexión Server-Optional (@NetworkCheckHandler): Compatibilidad cliente-servidor asimétrica que permite conectar clientes con X4UI a servidores sin el mod instalado.

Multimedia y Reproducción de Video/Audio Zero-Copy

  • Streaming de Video Zero-Copy (FFmpeg): Decodificación y volcado directo de fotogramas desde pipes del sistema operativo hacia buffers directos fuera del heap (DirectByteBuffer) mediante canales NIO (ReadableByteChannel).
  • Eliminación de Asignaciones en Heap: Supresión de arrays byte[] intermedios, llamadas asIntBuffer() y DynamicTexture, garantizando cero consumo de heap de Java durante la reproducción en régimen permanente.
  • Renderizado Directo OpenGL: Carga directa a texturas OpenGL con glTexSubImage2D utilizando punteros nativos de memoria directa.
  • Eliminación de Ruido VRAM: Pestillo de sincronización de primer fotograma (hasUploadedFirstFrame) que evita mostrar memoria gráfica no inicializada al pulsar reproducir.
  • Audio Sincronizado OpenAL: Motor OpenALAudioSink y decodificador FFmpegAudioDecoder para transmisión estéreo PCM a 48 kHz con control de ganancia, muteo y reloj maestro de sincronización A/V.
  • Controles de Reproducción (IVideoControlsLayout): Interfaz modular para superposiciones de control sobre GuiVideo. Implementación estándar DefaultVideoControlsLayout con botones de Play/Pause, barra de progreso interactiva, estampas temporales (00:15 / 02:45), botón de muteo y auto-hide fade tras 2.5s.
  • Pipeline Unificado de Medios (MediaPipeline): Descarga secuencial en segundo plano y optimización mediante FFmpeg oficial fijado en x4ui/bin/. Recodificación universal a H.264 Baseline Level 3.1 compatible con el fallback JCodecVideoDecoder.
  • Descubrimiento Declarativo de Medios: Detección automática en preInit mediante manifiestos assets/<modid>/x4ui/media.json y registro por lotes vía MediaRegistry.registerMedia().
  • Integración con Forge SplashScreen (ProgressManager): Barra de progreso nativa durante la fase loadComplete de Forge.
  • Carga Dinámica In-Game: Soporte para URLs solicitadas en tiempo de ejecución con spinner animado dentro de GuiVideo.

Motor de Layouts Flexbox No Destructivo (hugContent)

  • Comportamiento No Destructivo por Defecto: FlexLayout ya no muta destructivamente las dimensiones fijas o porcentuales de los contenedores padre.
  • Propiedad hugContent: Introducción de hugContent(boolean) para ajustar automáticamente el tamaño del contenedor padre a sus hijos visibles.
  • Integración en Paneles: Métodos fluidos setHugContent() y withHugContent() en GuiPanel.

Optimización Gráfica, Ciclo de Vida y Seguridad

  • Caché de Textura OpenGL (lastUploadedPts): Eliminación de transferencias innecesarias a la GPU cuando el fotograma decodificado no ha cambiado.
  • Registro en el Bus de Forge: Suscripción explícita a MinecraftForge.EVENT_BUS en ClientProxy.init().
  • Aislamiento por Mod ID: Sandboxing estricto de caché bajo .minecraft/x4ui/cache/<modid>/.

Graphics Abstraction (IGraphics)

  • Immediate Graphics Layer: Introduced IGraphics and GLGraphics, decoupling component rendering from direct OpenGL and LWJGL calls.
  • State Stack: Hierarchical management for matrix transformations, global alpha (pushAlpha/popAlpha), color tint (pushColorTint/popColorTint), active font, and scissor clipping (pushClip/popClip) via save() and restore().
  • Drawing Primitives: Built-in methods for flat and rounded rectangles, borders, lines, circles, and gradients.

Typography System (IFont, FontRegistry)

  • IFont Abstraction: Unified text rendering and metrics interface decoupled from vanilla FontRenderer.
  • TrueTypeFont Engine: Hardware-accelerated rasterization for vector fonts (.ttf/.otf) and system fonts with anti-aliasing and full vanilla format code support (§0-§f).
  • FontRegistry: Centralized registry for loading, resolving, and hot-reloading fonts on resource reload events (F3 + T).
  • Integration: Custom font support propagated through IGraphics.setFont() and GuiComponent.withFont().

Component Architecture & Lifecycle (GuiComponent)

  • Standardized Lifecycle: Added onAttached(), onDetached(), onDestroy() hooks and per-frame updates via update(float deltaTime).
  • Percentage Sizing and Positioning: withPercentWidth(), withPercentHeight(), and withPercentPosition() dynamically resolved against parent bounds.
  • Direct Fluent API: Chainable builder methods for position, size, margins, padding, layer ordering (withLayer), font, and theme directly on GuiComponent.
  • Reactive State Lifecycle: Automatic unbinding and cleanup of State<T> listeners upon component destruction to eliminate memory retention.

Visual Components

  • GuiImage (9-Slice): Native 9-slice border scaling support configured via NineSliceConfig.
  • GuiSprite: 2D frame animation engine supporting sprite sheets (SpriteSheetSource) and image sequences (SequenceSource) with FPS control and playback loop modes (LoopMode).
  • GuiSlider: Typed modular refactor (GuiSliderInt, GuiSliderFloat, GuiSliderDouble) with full horizontal and vertical orientation support.
  • GuiTextInput: Long text horizontal scrolling, mouse-drag text selection, and word-level navigation/deletion shortcuts (Ctrl+Backspace, Ctrl+Delete).

Non-Intrusive GUI Overlays (GuiOverlayManager)

  • Screen Injection: Pipeline to mount X4UI components onto vanilla (GuiContainer) or third-party screens without replacing the original screen class.
  • Docking Engine (OverlayDockManager): Border anchoring (ContainerAnchor) with collision-free multi-panel stacking.

JEI (Just Enough Items) Integration

  • JEI Compatibility: Automatic registration of exclusion areas for active X4UI containers and overlays, preventing visual overlap with the JEI item grid.
  • Interaction: Support for recipe (R) and usage (U) lookup hotkeys over GuiSlot components.

Global Buses & Registries

  • UIStateBus: Decoupled central bus for reactive state and event communication between independent UI modules.
  • ThemeRegistry: Centralized registry to store, look up, and switch ITheme instances across mods.

Sidedness & Network Architecture

  • Proxy Sidedness Separation (@SidedProxy): Strict separation into ClientProxy and CommonProxy, preventing client, rendering, and media classes from loading on dedicated servers.
  • Server-Optional Handshake (@NetworkCheckHandler): Asymmetric network handshake allowing clients with X4UI to connect to vanilla and modded servers without requiring X4UI on the server.

Multimedia & Zero-Copy Video/Audio Playback

  • Zero-Copy Video Streaming (FFmpeg): Raw video frames streamed directly from OS pipes into off-heap direct buffers (DirectByteBuffer) via NIO channels (ReadableByteChannel).
  • JVM Heap Allocation Elimination: Removed intermediate byte[] heap arrays, asIntBuffer() conversions, and DynamicTexture heap arrays, keeping steady-state Java Heap consumption completely flat during video playback.
  • Direct OpenGL Texture Upload: Direct DMA-like upload of off-heap buffers into OpenGL VRAM textures via glTexSubImage2D with direct native memory pointers.
  • VRAM Noise & Glitch Elimination: Added first-frame synchronization latch (hasUploadedFirstFrame) preventing uninitialized VRAM display before the first decoded frame is uploaded.
  • Synchronized OpenAL Audio: OpenALAudioSink and FFmpegAudioDecoder streaming 48 kHz stereo PCM audio with real-time volume, mute controls, and master clock synchronization.
  • Video Controls Overlay (IVideoControlsLayout): Modular overlay abstraction for GuiVideo. Includes DefaultVideoControlsLayout featuring Play/Pause toggling, interactive timeline seekbar, formatted timestamps (00:15 / 02:45), mute toggle, and smooth 2.5s auto-hide fade.
  • Unified Media Pipeline (MediaPipeline): Sequential background downloading and optimization using pinned official FFmpeg in x4ui/bin/. Universal recoding to strict JCodec specification (H.264 Baseline Level 3.1) for seamless fallback playback.
  • Declarative Media Manifests: Automatic discovery during preInit via assets/<modid>/x4ui/media.json and batch registration via MediaRegistry.registerMedia().
  • Forge SplashScreen Integration (ProgressManager): Native progress bar tracking in Forge’s loading splashscreen during loadComplete.
  • In-Game Dynamic Loading: Runtime URL playback requests automatically route through MediaPipeline with an animated loading spinner inside GuiVideo.

Non-Destructive Flexbox Engine (hugContent)

  • Default Non-Destructive Sizing: FlexLayout no longer destructively overrides fixed or percentage-based parent container dimensions.
  • hugContent Property: Added hugContent(boolean) to automatically resize the parent container to hug the total bounds of its visible children.
  • Panel Integration: Fluent setHugContent() and withHugContent() methods on GuiPanel.

Video Performance, Lifecycle & Security

  • OpenGL Texture Upload Caching (lastUploadedPts): Eliminated redundant off-heap DMA texture transfers when the decoded video frame has not changed.
  • Forge EventBus Subscription: Explicitly registered ClientProxy to MinecraftForge.EVENT_BUS during init().
  • Mod ID Cache Sandboxing: Strict per-mod asset isolation under .minecraft/x4ui/cache/<modid>/.

X4UI Framework r1.0b4

9/2/2026

X4UI r1.0b4

Arquitectura y Seguridad (Client/Server)

  • Separación Estricta Cliente/Servidor: Reestructuración de la jerarquía de paquetes. Interfaces en api.client.*, implementaciones en impl.client.*. Previene ClassNotFoundException en Servidores Dedicados.
  • State<T>: Reubicado en com.x4yi.x4ui.common para uso seguro en servidores. Employa CopyOnWriteArrayList y deduplicación de valores por Objects.equals().
  • NetworkSyncHelper: Permite vincular propiedades de Container (vía IContainerListener) a objetos State<Integer>, State<Boolean> y State<Float> con escala configurable.

Assets y Multimedia

  • RemoteResourceManager: Sistema de descarga asíncrona de recursos multimedia (imágenes, audio, vídeo) desde URLs HTTP/HTTPS. Caché local aislada por Mod ID con hash SHA-256.
  • DownloadManager: Singleton con executor de 2 hilos. Transferencias NIO zero-copy en subprocesos de fondo sin penalizar rendimiento.
  • Motor de Audio (OpenAL): OpenALAudioSink para reproducción de audio con 8 buffers streaming y tracking de tiempo de reproducción por muestra. Integrado al ciclo de vida de la GUI.
  • GuiVideo - Decoder Dual: FFmpegProcessDecoder (nativo) como decodificador primario. JCodecVideoDecoder (pure-Java) como respaldo automático para Android (PojavLauncher) y sistemas sin ejecución de procesos.
  • GuiImage/GuiVideo: Soporte para canal alfa (setAlpha()) y tintes de color (setColor(r, g, b)).

Interfaz y Componentes

  • Rediseño de la API Pública: Métodos renombrados para desvinculación de Mojang: update() → tick(float), drawSelf() → renderSelf(int, int, float), mouseClicked → onMouseClick.
  • Sistema de Layout Optimizado: Flags requestLayout() y requestRender() para evitar recálculos costosos al mutar propiedades puramente visuales.
  • Insets: Clase inmutable para padding/margin con soporte asimétrico: new Insets(top, right, bottom, left).
  • ITheme / DefaultTheme: Sistema de temas inyectable por componente. Estilos no son globales. DefaultTheme提供 tema oscuro con colores Material Design.
  • GuiBuilder<T>: API fluent para construcción declarativa de componentes con chainable setters.
  • Tooltips Nativos: Sistema de tooltips reescrito utilizando GuiPanel directamente. Resolución por cadena de padres. Soporte para texto y componentes personalizados.
  • GuiDropdown<T>: Selector genérico con popup, enlace reactivo a State<T>, y renderizado fuera de scissor.
  • GuiVirtualList<T>: Lista virtualizada que solo instancía componentes visibles en el viewport. Ventana/reciclaje automático al hacer scroll.

Layout y Eventos

  • FlexLayout: Motor de layout tipo CSS Flexbox. Direcciones VERTICAL, HORIZONTAL, ABSOLUTE. Soporte para gap, flexWrap, padding y margin.
  • Propagación de Eventos: Iteración en orden inverso de render (componente de mayor capa primero). Retorno true detiene la propagación.
  • Gestión de Foco: Modelo de foco único almacenado en el componente raíz. requestFocus(), clearFocus(), isFocused().
  • Sistema de Capas: Componente layer entero para orden Z. Los hijos se renderizan en orden ascendente de capa.

Multimedia y Decodificación

  • FFmpegProcessDecoder: Subproceso FFmpeg con pipes NIO. Probes de metadatos vía ffmpeg -i. DecoderThread con RingBuffer para frames BGRA.
  • JCodecVideoDecoder: Decodificador pure-Java usando H264Decoder de JCodec. Demuxing MP4, decodificación de NALs H.264, conversión YUV420 a ARGB.
  • MediaPlayer: Orquestador de reproducción con reloj maestro de audio y fallback a reloj del sistema.

Estado de Desarrollo

  • GuiModelRender, GuiVideo, Sincronización Servidor-Cliente: Estos componentes se encuentran en una fase muy temprana de desarrollo. Su API es inestable y puede cambiar sin previo aviso en futuras versiones.

Architecture & Security (Client/Server)

  • Strict Client/Server Separation: Refactored package hierarchy. Interfaces in api.client.*, implementations in impl.client.*. Prevents ClassNotFoundException on Dedicated Servers.
  • State<T>: Relocated to com.x4yi.x4ui.common for safe server-side usage. Uses CopyOnWriteArrayList and value deduplication via Objects.equals().
  • NetworkSyncHelper: Binds Container properties (via IContainerListener) to State<Integer>, State<Boolean>, and State<Float> objects with configurable scale.

Assets & Multimedia

  • RemoteResourceManager: Asynchronous media downloading from HTTP/HTTPS URLs. Local cache isolated by Mod ID with SHA-256 hashing.
  • DownloadManager: Singleton with 2-thread executor pool. NIO zero-copy transfers on background threads without impacting game performance.
  • Audio Engine (OpenAL): OpenALAudioSink for audio playback with 8-buffer streaming and per-sample playback time tracking. Integrated with GUI lifecycle.
  • GuiVideo - Dual Decoder: FFmpegProcessDecoder (native) as primary decoder. JCodecVideoDecoder (pure-Java) as automatic fallback for Android (PojavLauncher) and systems without process execution.
  • GuiImage/GuiVideo: Alpha channel support (setAlpha()) and color tinting (setColor(r, g, b)).

Interface & Components

  • Public API Redesign: Renamed methods for Mojang decoupling: update() → tick(float), drawSelf() → renderSelf(int, int, float), mouseClicked → onMouseClick.
  • Optimized Layout System: requestLayout() and requestRender() flags to avoid expensive recalculations when mutating purely visual properties.
  • Insets: Immutable class for padding/margin with asymmetric support: new Insets(top, right, bottom, left).
  • ITheme / DefaultTheme: Injectable theming system per component. Styles are no longer global. DefaultTheme provides a dark theme with Material Design colors.
  • GuiBuilder<T>: Fluent API for declarative component construction with chainable setters.
  • Native Tooltips: Tooltip system rewritten using GuiPanel directly. Resolution via parent chain. Support for text and custom component tooltips.
  • GuiDropdown<T>: Generic selector with popup, reactive binding to State<T>, and rendering outside scissor bounds.
  • GuiVirtualList<T>: Virtualized list that only instantiates components visible in the viewport. Windowing/recycling during scroll.

Layout & Events

  • FlexLayout: CSS Flexbox-like layout engine. VERTICAL, HORIZONTAL, ABSOLUTE directions. Supports gap, flexWrap, padding, and margin.
  • Event Propagation: Reverse render order iteration (highest-layer component first). Returning true stops propagation.
  • Focus Management: Single-focus model stored on root component. requestFocus(), clearFocus(), isFocused().
  • Layer System: Integer layer property for Z-ordering. Children render in ascending layer order.

Multimedia & Decoding

  • FFmpegProcessDecoder: FFmpeg subprocess with NIO pipes. Metadata probing via ffmpeg -i. Background DecoderThread with RingBuffer for BGRA frames.
  • JCodecVideoDecoder: Pure-Java decoder using JCodec’s H264Decoder. MP4 demuxing, H.264 NAL decoding, YUV420 to ARGB conversion.
  • MediaPlayer: Playback orchestrator with audio master clock and system clock fallback.

Development Status

  • GuiModelRender, GuiVideo, Server-Client Sync: These components are in a very early stage of development. Their API is unstable and may change without notice in future versions.

X4UI Framework r1.0b3a

8/28/2026

X4UI r1.0b3a

Bug Fixes

  • Sliders: Corregido un bug donde hacer click en el campo de texto de un slider antes del primer frame renderizado no permitía editar el valor. Adicionalmente se ha solucionado el problema de pérdida de foco y escritura cuando existen múltiples sliders en pantalla (ahora sólo puede haber un campo de texto activo globalmente).
  • Scroll Panels (Estructural): Se arregló un bug severo en GuiScrollPanel donde los eventos de teclado (keyTyped) y el arrastre prolongado del ratón (mouseClickMove y mouseReleased) nunca se propagaban a los hijos del panel interno debido a una lista de renderizado vacía. Esto soluciona por completo la imposibilidad de usar el teclado en los campos de texto o arrastrar correctamente los sliders fuera de los márgenes del scroll.

Bug Fixes

  • Sliders: Fixed a bug where clicking a slider’s text field before the first rendered frame prevented value editing. Additionally, resolved an issue where multiple slider text fields could be focused simultaneously, causing typing input to be redirected to off-screen sliders. Focus is now managed globally.
  • Scroll Panels (Structural): Fixed a severe bug in GuiScrollPanel where keyboard events (keyTyped) and prolonged mouse dragging (mouseClickMove and mouseReleased) were never propagated to the internal panel’s children due to an empty render list. This completely resolves the inability to use the keyboard in text fields or drag sliders correctly outside the scroll margins.

X4UI Framework r1.0b3

8/26/2026

X4UI r1.0b3

Resumen de Cambios

Actualización de la arquitectura interna de renderizado y eventos, introduciendo soporte nativo de Z-Index, interpolaciones basadas en DeltaTime, y gestión segura de recortes OpenGL anidados, además de una gran cantidad de nuevos componentes interactivos.

Arquitectura y Núcleo

  • Soporte Z-Index: Implementada la propiedad layer para componentes, proporcionando un ordenamiento determinista para el renderizado y la propagación de eventos (bubbling).
  • Animaciones DeltaTime: Integrada lógica de DeltaTime en todo el framework para lograr animaciones e interpolaciones independientes de los FPS.
  • Seguridad de Memoria: Implementado FontWidthCache con política de limpieza LRU para mitigar fugas de memoria durante el análisis de textos complejos (ej. Markdown).
  • Recorte OpenGL Anidado: Implementado ScissorHelper para gestionar de manera robusta el uso de GL_SCISSOR_TEST en componentes anidados.
  • Construcción Fluida: Añadida la clase de utilidad GuiBuilder que proporciona una API fluida (Fluent API) para facilitar la construcción de interfaces.
  • Reactividad: Integrado un sistema de gestión de estado reactivo (State).

Componentes y Funcionalidades

  • Arrastrar y Soltar (Drag & Drop): Añadida capacidad de arrastre nativa a GuiComponent con límites configurables (DragConstraint.NONE, DragConstraint.PARENT_BOUNDS).
  • Tooltips Integrados: Añadido soporte nativo de renderizado de Tooltips en GuiBaseScreen y GuiBaseContainer mediante setTooltip().
  • Diseños FlexWrap: Añadida la funcionalidad flexWrap a GuiPanel para el ajuste automático y multilínea de elementos en diseños horizontales y verticales.
  • Nuevos Componentes:
    • GuiDropdown para menús desplegables.
    • GuiImage y GuiSprite para la renderización flexible de texturas.
    • GuiTextInput para campos de entrada de texto avanzados.
    • GuiSlot para gestionar inventarios y stacks de ítems dentro del DOM.
    • GuiSlider y sus variantes (GuiSliderDouble, GuiSliderFloat, GuiSliderInt).
    • GuiModelRender para soporte de renderizado de entidades 3D e ítems.
    • GuiVideo para reproducción de vídeo in-game.

Mejoras y Correcciones

  • Refactorización de GuiScrollPanel:
    • Migración a ScissorHelper para la resolución adecuada de recortes anidados.
    • Implementado descarte de componentes (culling) para omitir la renderización y procesamiento de eventos de elementos fuera del área visible.
    • Resueltos los problemas de jerarquía de propagación de eventos, permitiendo que los paneles de scroll anidados funcionen correctamente y de manera independiente.
  • Solucionada la fuga de memoria en GuiBaseContainer causada por la adición duplicada de áreas en jeiRecipeAreas al redimensionar la ventana.
  • Refactorizado GuiMarkdown para utilizar FontWidthCache, mejorando notablemente el rendimiento.
  • Estandarizadas las animaciones en GuiButton, GuiToggle y GuiScrollPanel para escalar con DeltaTime en lugar de ticks en crudo.
  • Expuestos los métodos getGuiLeft() y getGuiTop() en GuiBaseContainer.
  • Reestructurada y completada la documentación técnica en el directorio Docs/ (Disponible en inglés y español).

Changelog Summary

Core rendering and event architecture update, introducing native Z-Index support, DeltaTime-based interpolations, and safe management of nested OpenGL clipping, along with a massive batch of new interactive components.

Architecture & Core

  • Z-Index Support: Implemented the layer property for components, providing deterministic sorting for rendering and event bubbling priorities.
  • DeltaTime Animations: Integrated DeltaTime logic throughout the framework for FPS-independent animations and transitions.
  • Memory Safety: Implemented FontWidthCache incorporating an LRU eviction policy to mitigate memory leaks during intensive text parsing tasks (e.g. Markdown rendering).
  • Nested OpenGL Clipping: Implemented ScissorHelper to robustly manage nested GL_SCISSOR_TEST applications.
  • Fluent Construction: Added GuiBuilder utility class providing a fluent API to streamline interface construction.
  • Reactivity: Integrated a reactive State management system.

Components & Features

  • Drag & Drop: Added native drag-and-drop capability to GuiComponent with flexible boundaries (DragConstraint.NONE, DragConstraint.PARENT_BOUNDS).
  • Native Tooltips: Added internal Tooltip rendering support to GuiBaseScreen and GuiBaseContainer via setTooltip().
  • FlexWrap Layouts: Added flexWrap functionality to GuiPanel for automatic multi-line wrapping of elements in horizontal and vertical configurations.
  • New Components:
    • GuiDropdown for standard dropdown menu structures.
    • GuiImage and GuiSprite components for flexible texture and sprite rendering.
    • GuiTextInput for advanced text input fields.
    • GuiSlot component to integrate and manage item stacks and inventories within the DOM.
    • GuiSlider architecture with specific implementations (GuiSliderDouble, GuiSliderFloat, GuiSliderInt).
    • GuiModelRender to support 3D entity and item rendering directly inside the user interface.
    • GuiVideo for in-game video playback support.

Fixes & Improvements

  • GuiScrollPanel Refactor:
    • Migrated from raw GL calls to ScissorHelper for proper nested clipping resolution.
    • Implemented strict component culling to skip rendering and event processing for elements outside the visible viewport.
    • Resolved event bubbling hierarchy issues, enabling nested scroll panels to function correctly independently of parent containers.
  • Resolved memory leak in GuiBaseContainer caused by duplicate instances appending to jeiRecipeAreas upon window resize.
  • Refactored GuiMarkdown to utilize FontWidthCache for significantly improved parsing and rendering performance.
  • Standardized animations in GuiButton, GuiToggle, and GuiScrollPanel to scale consistently with DeltaTime instead of raw ticks.
  • Exposed getGuiLeft() and getGuiTop() within GuiBaseContainer for external utility consumption.
  • Restructured and populated the Docs/ directory with comprehensive technical documentation in English (en-us) and Spanish (es-latam).

X4UI Framework r1.0b2

8/22/2026

X4UI r1.0b2

Cambios

  • Añadidos métodos getHeight() y getWidth() en GuiComponent para permitir acceso externo a sus atributos de dimensión que estaban protegidos, facilitando la interpolación y creación de animaciones personalizadas desde implementaciones externas.

X4UI Framework r1.0b1

8/16/2026

X4UI r1.0b1

Resumen de Cambios

El primer lanzamiento público del framework X4UI, extraído de Hammers Unbound para proveer una base robusta y moderna para el diseño de interfaces en Minecraft 1.12.2.

Características

  • Arquitectura DOM de Componentes: Introducido un árbol de componentes totalmente orientado a objetos (GuiComponent) con relaciones padre-hijo, imitando la estructura DOM web.
  • Layouts FlexBox: Añadido GuiPanel con FlexDirection (Absolute, Vertical, Horizontal) para posicionamiento y espaciado automático de componentes.
  • Paneles de Scroll y Recorte: Implementado GuiScrollPanel con soporte nativo de OpenGL GL_SCISSOR_TEST para enmascarar de forma segura la renderización fuera de los límites.
  • Analizador Nativo de Markdown: Añadido GuiMarkdown, un componente especializado que lee cadenas de markdown puro y las renderiza en nodos de UI interactivos (Soporta encabezados, negrita, cursiva, enlaces, citas, viñetas e imágenes web/locales).
  • Elementos Interactivos: Incluidas implementaciones listas para usar de GuiButton, GuiToggle, GuiSlider y GuiLabel.
  • Propagación de Eventos: Sistema avanzado para clics, pulsaciones de teclas y desplazamientos de ratón. Los eventos respetan el índice Z, asegurando que los componentes superpuestos se comporten de forma natural.

Rendimiento y Optimizaciones

  • Renderizado por Bandera (Dirty Flag): Implementado un gestor robusto de estado needsLayout. El motor UI ahora solo recalcula posiciones y tamaños cuando es matemáticamente necesario, reduciendo drásticamente la sobrecarga de CPU en pantallas complejas.
  • Análisis Regex Estático: GuiMarkdown compila sus expresiones de análisis de texto estáticamente al cargar, reduciendo fuertemente los picos de RAM y CPU al abrir manuales o guías.
  • Correcciones de Memoria en Scroll: Eliminados los tirones del recolector de basura al calcular el factor de escala ScaledResolution una sola vez por redimensionamiento de ventana, en lugar de cientos de veces por segundo.

Corrección de Errores

  • Solucionado un problema donde el desplazamiento de la rueda del ratón no respetaba las coordenadas reales en pantalla del puntero, permitiendo ahora un desplazamiento preciso a través de múltiples paneles activos.

Changelog Summary

The first public release of the X4UI Framework, extracted from Hammers Unbound to provide a robust foundation for modern Minecraft 1.12.2 interfaces.

Features

  • Component DOM Architecture: Introduced a fully object-oriented component tree (GuiComponent) with parent-child relationships, mimicking web DOM structures.
  • FlexBox Layouts: Added GuiPanel with FlexDirection (Absolute, Vertical, Horizontal) for automatic component positioning and spacing.
  • Scroll Panels & Clipping: Implemented GuiScrollPanel with native OpenGL GL_SCISSOR_TEST support to safely mask out-of-bounds rendering.
  • Native Markdown Parser: Added GuiMarkdown, a specialized component that reads raw markdown strings and renders them into interactive UI nodes (Supports headings, bold, italics, links, blockquotes, bullets, and web/local images).
  • Interactive Elements: Included ready-to-use implementations of GuiButton, GuiToggle, GuiSlider, and GuiLabel.
  • Event Bubbling: Advanced event propagation for clicks, keystrokes, and mouse scrolls. Events bubble down the Z-index correctly, ensuring overlapping components behave naturally.

Performance & Optimizations

  • Dirty Flag Rendering: Implemented a robust needsLayout state manager. The UI engine will now only recalculate positions and sizes when mathematically necessary, drastically reducing CPU overhead on complex screens (like manuals or heavily populated lists).
  • Static Regex Parsing: GuiMarkdown compiles its text-parsing expressions statically on load, heavily reducing RAM and CPU spikes when opening books or guides.
  • Scroll Memory Fixes: Eliminated garbage collector stuttering by calculating the ScaledResolution scaling factor once per window resize, rather than hundreds of times per second during frame renders.

Bug Fixes

  • Fixed an issue where the mouse wheel scroll event did not respect the pointer’s actual screen coordinates, allowing targeted scrolling across multiple active panels.
Buscar en XHubSearch XHub