Additions
Cross-referencing in UI models
When instantiating templates in a UI model, you can use the new <template-name>@<ui-model-id> syntax to reference a template from a different UI model. This allows much greater flexibility than before in modularizing and re-using templates across different screens.
Along with this change, the <components> element in UI model definitions is no longer required.
UI
- The
blur()surface now supports parsing from UI models BaseOwo*Screenimplementations now provide thecomponent(...)shorthand forthis.adapter.rootComponent.childById(...)- Layers can now align their components relative to Minecraft's handled screen coordinates using
alignComponentToHandledScreenCoordinates(...)on the instance Surface.PANEL_INSETwas added, which renders an inset area to be used insideSurface.PANEL- this looks very similar to the vanilla recipe book panel- Two new components,
smallCheckbox(...)andslimSlider(...), were added - they function mostly identically to the already existing counterparts, but (as the name implies) take up less space and offer more customizability TextAreaComponent, a third new component, is an extension of vanilla's newEditBoxWidgetfor general-purpose use and optimized to play nicely within an owo-ui contextItemComponentoffers a new property,setTooltipFromStack, which always keeps the component's tooltip in sync with the item stack it's displaying- The height of each line a
LabelComponentcan now be configured using the newlineHeightproperty, which allows properly supporting non-standard fonts - Components can now be placed at fixed percentage across their parent without respecting the components own size using
Positioning.across() StackLayoutrespects much the same layout rules asFlowLayout, but doesn't place components next to each other - instead it places them on top of each other, thus creating a stack of componentsContainers.ltrTextFlow(...)creates a new type of FlowLayout, which works just likeComponents.horizontalFlow(...)but wraps when it exceeds its own width - just like how left-to-right text is laid out in a document- Block, item, and entity components now support NBT (and in the case of blocks, block state data) when being parsed from a UI model
Config
Server-sided retrieval of a client's config options has been made more ergonomic. For this purpose, the generated config wrapper now exposes the key of each individual option through the .keys object. Further, ConfigSynchronizer.getClientOptions received a new override which directly accepts the config wrapper, enabling the following API:
var optionValue = ConfigSynchronizer.getClientOptions(player, MyMod.CONFIG).get(MyMod.CONFIG.keys.someOption);
Misc
- owo-sentinel now lists the mod which included it in addition to all mods that depend on owo, in an effort to reduce confusion when mod authors don't declare their dependency (BasiqueEvangelist, #123)
AutoRegistryContainerprovides two new convenience functions:.register(...), which is simply an alias forFieldRegistrationHandler.register(...).conform(...), which forcefully casts aClass<?>to aClass<T>for implementinggetTargetFieldType()for parametrized classes
Changes
UI
HUDnow processes removal requests before add requests, allowing HUD components to be properly reloaded within the same frame- When the inspector draws slot indices in a handled screen, it now uses
H:to denote the slot index in the handler andI:to indicate that slot's index into its respective inventory - The
file(...)UI model data source is now deprecated in favor of a new, configurable hot reload system which is only active in development. This way, you cannot accidentally ship your mod with the file data source enabled, causing it to crash in production NinePatchRendererwas renamed toNinePatchTextureand reworked to function in a data-driven manner. No old functionality has been removed yet, it was however deprecated. More details on how to use the new implementation will be added to the documentation shortly
Fixes
UI
ItemComponents once again use correct lighting on side-lit models and apply lighting properly when non-side-lit models are scaled downLabelComponentnow properly fetches the text style under the cursor when determining which hover and click events to executeTextFieldWidgetandEditBoxWidgetnow have theirtick()function called when wrapped by owo-ui, making their cursors blink properlyScrollContainer.scrollTo(...)now works properly on horizontal containers and has a new overload for directly specifying the target scroll offset without supplying a component
Config
- owo-config screen providers are now once again properly listed in Mod Menu
Misc
ParticleSystemControllers no longer forcefully require handshaking when merely mentioned, fixing optional handshaking (BasiqueEvangelist, #123)- By utilizing new API within Roughly Enough Items, handled screens built with owo-ui now properly layer with the REI overlay - there should be no more over- and underdraw
Finally, the following previously deprecated API elements have been removed:
VerticalFlowLayoutandHorizontalFlowLayout, which have been replaced by instantiatingFlowLayoutwith the respective AlgorithmOptionComponentandOptionComponents.createSlider, which were replaced byOptionValueProviderandOptionComponents.createRangeControlsrespectivelSliderComponent#onChanged, replaced by the respective event stream
Continuing the spirit of the last two releases, this build brings another very important fix - this time to config synchronization. The previous implementation had a bug where all synced options would be lost upon death of the player, which caused crashes specifically in conjunction with YIGD and Numismatic Overhaul
This should ideally be the last build that backports fixes from the 0.11 prereleases and therefor the last release for 1.19.4 before we move onto 1.20
Similarly to 0.10.3, this build contains more changes to the core shader loading system.
The immediate effect of this is proper compatibility with the QSL implementation of Fabric's Core Shader API, although it should also make such incompatibilities much more unlikely to occur in the future
This build is indentical feature-wise to 0.10.3 for 1.19.3
This release primarily fixes compatibility with Fabric API's latest core shader registry addition. As such, Fabric API >=0.76.0 is now required.
Along with this, parsing order in owo-ui's text-box has been corrected to set max-length before reading text (#110)
Changes
The vertical and horizontal layout algorithms that were previously implemented in the respective subclasses of FlowLayout have been factored out into two implementations of the new Algorithm interface. The subclasses are temporarily preserved for backwards-compatibility but are deprecated and will be removed in the next major version.
Ideally you should already migrate your code to use the generic FlowLayout class to prepare for the move
Fixes
- The injections into
ShaderProgramare no longer required, which should fix compatibility with Satin on Quilt (#83) - Entity name tags are now rendered by default again, whereas before they would only appear after seeing an owo-ui entity component for the first time (#84)
- Vanilla text fields (and thereby owo text boxes) are once again
GreedyInputComponents - Yet another situation in which a scroll container could achieve a scroll value of
NaNhas been resolved
This build fixes a crash that would occur when Satin is installed alongside owo by allowing Satin's shader identifier fixin to take precedence of owo's very similar implementation
Additions
UI
- The new
ColorPickerComponentpresents an easy-to-use, self-contained way to choose a color. It visually presents a standard HSV picker, with a hue (and optionally alpha) slider and picker for value and saturation. The picker itself shows neither a color preview nor hex field - these can easily be added externally via the color selection event stream supplied by the picker - UI overlays like popup dialogs can now be easily realized via the new
OverlayContainer, accessible viaContainers.overlay(...). This component, when added to some parent (in most cases the root), renders an overlay covering the entire parent and places its child in the center. By default, it automatically closes itself when a click event is received outside the child ItemComponentfeatures the newtooltipFromItemutility method, which can be used to gather the full tooltip of an item stack, including extra tooltip data- Rendering of nametags in
EntityComponentcan now be toggled on a per-component basis - The new
openAsContextMenufunction onDropdownComponentenables easy integration of context menus into any screen - Animations on component properties now provide the
finished()event stream which emits every time the animation finishes a full run in either direction RenderEffectWrapper, accessible viaContainers.renderEffectoffers a hassle-free way to apply arbitrary rendering effects to its children. Check out the component's javadoc for a more complete overview
Config
- owo-ui's
Colortype is now supported in configs. This means it will be properly serialized as a string representing the color in#AARRGGBBformat and displayed that way in the config screen. With this also comes an optional color picker, allowing your users to easily pick a color (optionally with alpha as well) - The Jankson serializer instance used by any given config wrapper can now be customized through the new, optional constructor parameter. This enables non-standard serialization of existing types and also allows serializing completely custom types
- The
@RangeConstraintannotation has gained the newdecimalPlacesparameter which controls how many decimal places are shown when this option is edited as a slider
Rendering
The Drawer class has gained a few new rendering functions to fill in missing functionality:
- drawCircle and drawRing can be used to draw either a filled circle or ring with specific inner and outer radius respectively
- drawLine draws an arbitrary line as a quad instead of using OpenGL's line mode, which allows more correct control over thickness
Additionally, the new GlProgram class and corresponding infrastructure enables usage of custom core shaders from mod namespaces. Two default programs are provided, although they are not currently part of stable public API:
- OwoClient.BLUR_PROGRAM applies an approximate gaussian blur to the area it draws over
- OwoClient.HSV_PROGRAM works much the same as the standard position-color program, but accepts the color attribute in HSVA format instead of RGBA
Changes
UI
- The HSV interface of
Colorhas been improved: Constructing a color with a hue of 1 no longer causes it to become yellow instead of red and the newhsv()getter can be used to convert from RGB to HSV easily - The REI exclusion zone provider now gathers the components directly from the UI adapter instead of simply assuming that it's available as the first drawable child of the screen - this should fix some edge cases in which the exclusion zones were broken due to a different widget somehow being inserted into the screen before the UI adapter
- The
RenderablePlayerEntityinner class ofEntityComponentis now publically accessible - this makes it easier to call methods on such entities and allows easily extending the class if so desired DropdownComponent.requiresHoverhas been renamed tocloseWhenNotHoveredto more clearly communicate its purpose. The entire dropdown system has been slightly overhauled in general to be more visually pleasing and easier to use
Config
OptionComponentFactory.Resultnow features two type parameters to more cleanly carry information about the contained components- All numeric, range-constrained config options can now be edited with either a slider or text field, at the discretion of the user
Fixes
UI
- Sprite components with ticked sprites should now properly animate with Sodium's "Only animate visible textures" option enabled (BasiqueEvangelist, #78)
- When cycling UI component focus with the Tab key, the first component no longer get skipped and the children of a grid layout are no longer focused in reverse order (#77)
- Fire and the nametags of entities are now properly aligned in
EntityComponent - Buttons and checkboxes in dropdown can now be properly clicked on the entire width of the dropdown
- Layers now handle event parameters in a different way that works around a memory present in Fabric API's event system. This previously caused owo screen instances to be leaked, which is no longer the case (#81)
Misc
- Items from
OwoItemGroupsub-tabs which are not the first one are now properly indexed for search in the creative inventory - owo-sentinel now one again has full functionality when running on the Quilt Loader
Refer to 0.9.3+1.19.3
This build primarily constitutes the first public release for 1.19.3. It also fixes a bug introduced in 0.9 which caused text field event listeners to break in production.
This build reverts a change made to the Item Group API when porting to 1.19.3 which caused the creative tabs of mods which use an owo Item Group without owo item settings to be empty. This affected primarily Conjuring (for which a separate update was released) and Numismatic Overhaul
This build fixes an NPE that would occur when config search focuses an option inside 2+ collapsed containers
Additions
UI
- Cursor styling functionality from
OwoUIAdapteris now available globally via the new CursorAdapter abstraction, which also provides the implementation for owo-ui - The new configure method on
Componentenables inline configuration of component properties which don't return the component itself. Due to limitations with Java's generic parameters, it is required to manually specify the type of component you're configuring when calling this method, like so:Components.label(...).<LabelComponent>configure(label -> label.mouseDown().subscribe(...)).
Additionally, any state change events emitted during execution of such a configuration closure are delayed until the closure has completed - this enables large performance improvements when configuring multiple properties of a mounted component, including adding/removing children, as everything is consolidated into a single layout pass - The flow layout has gained the new gap property, which adds the specified amount of dead space between each child
- Collapsible containers now expose the
onToggledevent stream as well as their current state - All components can now easily look up the root component in their respective tree using the new
root()method - Text box max length can now be defined in XML with the
max-lengthelement - The new popFramesAndDraw method on
ScissorStack, allows escaping up to the given amount of clipping frames and execute the supplied draw call - owo-ui colors can now generate a hex color string via the asHexString method
- Entity components can now have an additional dynamic transform applied before rendering the entity
Components#textBox(...)no longer creates and returns aTextFieldWidget, instead it creates a TextBoxComponent. This is owo-ui's extension of the vanilla text field, which properly sizes itself if the background is disabled and provides the onChanged event stream. This stream only emits events when the text in the box actually changes, unlike the vanilla change listener
Config
- The config screen now includes a search bar which allows searching through all options and sections by name and value. This search function acts like search in a text editor - you enter your query, then press enter, after which you can inspect all matches individually by pressing enter again
- The new client-side
/owo-configcommand can open all config screens for which a provider is registered, even when modmenu is not installed Set<T>is now a supported type for config options
UI - Layers
Built on top of owo-ui, a new system called Layers has been introduced. This generic API allows adding, or layering if you will, owo-ui components onto arbitrary existing screens. It comes with a helper system that allows easily locating existing vanilla widgets on the screen, as well as the option to align your own components relative to them
Screen Handler Properties and Messages
The new createProperty along with addServerboundMessage and addClientboundMessage methods injected into ScreenHandler allow for a significant simplification of screen networking. Everything owo can serialize by default is supported out of the box for properties, which automatically get synchronized to the client, and for messages the same rules apply as for standard packets in an OwoNetChannel. As always, if a serializer is missing you can add your own via PacketBufSerializer.register(...)
This system should completely eliminate the need for externally defined networking, everything can be done directly inside the screen handler
Changes
ItemGroup API
- Existing item groups can now be extended with additional sub-tabs and buttons via mod data
- The name of a sub-tab is now displayed after the name of the item group, given that the tab does not have the new
primaryattribute - Each sub-tab can now declare its contained items more rigorously, as they now define a callback which gets executed to populate the group
- [1.19.3 only]
OwoItemGroups now define their icon in terms of an owoIcon, meaning you are no longer restricted to just item stacks
UI
- Sliders have been migrated to use event streams just like other input events and gained the new
slideEndevent stream which gets invoked when the user releases the slider handle apply_ContentSizinginBaseComponenthas been replaced bydetermnine_ContentSizingwhich now returns the content size instead of applying it directly
Moreover, the layout algorithm has received a major optimization that improves layout times in complex screens by up to 560%
Config
- Additionally to the existing method, enum config options can now be translated on a per-config instead of a per-option level
- When adding a new entry to a list config option while it isn't expanded, the list now opens itself and focuses the new entry (#68)
- The previously private mechanism for registering config screen providers used by the
@Modmenuannotation has been made public asConfigScreen#registerProvider. This means that any potential custom config screen implementations can now be easily registered without needing an additional dependency on modmenu
Misc
- The
owo.forceDisableDebugsystem property is now deprecated and superseded by simply settingowo.debugtofalse
Fixes
UI
- Scrollbars can no longer exceed the size of the container
- When dragging the scrollbar in a precisely filled scroll container, the content no longer becomes invisible
- All button renderers now properly draw with depth testing enabled
- Text boxes, more specifically
TextFieldWidget, now properly respond to focus events - The UI Interaction sound event is no longer added to the respective registry, which means that client-side mods which use owo no longer cause registry sync to fail (#72)
- Animations on parent components no longer update twice per frame
Config
- Section headers applied to
@Nestoptions now show up properly - The config screen no longer attempts to apply constraints placed on
Listconfig options to that lists elements (#69) - owo is inherently funny
Misc
- owo no longer crashes when run on a dev server
Removed deprecated elements
TexturedButtonComponent, superseded byButtonComponent.Renderer#texture(...)- All methods in
Componentswhich returnedButtonWidget, superseded byButtonComponent ScreenUtils#generateSlotGridandScreenUtils#generatePlayerSlots, superseded bySlotGeneratorScrollContainer.scrollbarColor, superseded byScrollContainer.Scrollbar#color(...)
Changes
- The slot management methods on
BaseOwoHandledScreennow have overloads which directly accept a slot instance instead of just and ID - The Z-Offset of the inspector can now be customized in OwoUIAdapter
- The new ReiUIAdapter#wrap(WidgetWithBounds) allows embedding most if not all of REI's existing Widgets in an owo-ui-based REI display category
Fixes
- Mouse coordinates are now passed with proper offsets when propagating mouse events to the focused component
Changes
- Texture components have a new property -
blend. When this is enabled, OpenGL alpha blending is properly set up and you can use translucent textures - All synced config options are now synced in
INFORM_SERVERfashion even when playing singleplayer
Fixes
- The client-only
renderdoccommand is no longer registered on the server, allowing you to start servers with owo in debug mode again - The
visible-areadeclaration in the UI Model XML schema no longer requires all values to be specified - The intersection comparisons used for mouse events and component visibility checks no longer over-account by one pixel
- String config options can now contain backslashes (#59)
Changes
Component customization
- Button rendering can now be completely customized, with a new flat renderer available among the defaults. This also means
TexturedButtonComponentis now deprecated and superseded by thetexturebutton renderer - Scrollbar rendering is now fully customizable as well. By default, this includes the two types of vanilla scrollbar used in game menus and the creative inventory screen as well as the default flat owo-ui scrollbar. Scroll containers can now also define an increment by which they are scrolled and the length of the scrollbar can be set to a fixed value
- owo-ui now features the
NinePatchRendererutility, which can draw a nine-patch style texture in both tiled and stretched mode with next to no performance impact. This is used to enable the new scrollbar rendering and also allows buttons to scale to arbitrary sizes, contrary to the vanilla implementation. As it is also used to draw the panel surface, performance on all screens that use panels should be improved
RenderDoc integration
When RenderDoc is injected into a game instance with owo installed, you can now take advantage of comprehensive bindings to RenderDoc API. In-game this enables the new /renderdoc client command which opens a screen that lets you configure the RenderDoc overlay as well as take captures and launch the Replay UI. Additionally, when in an owo screen, CTRL+ALT+R can create a capture of only the draw calls relevant to screen - check out the docs over at https://docs.wispforest.io/owo/renderdoc/
Fixes
owo-ui
- Scroll containers now properly account for their child's margins and mount it with the current scroll position already applied
- Named text colors no longer need to be intentionally misspelled to get parsed properly
- The inspector can no longer go offscreen
- Vanilla widgets now properly propagate the focus events
- Component visiblity is now checked with the model view transform applied
- Labels no longer cause unnecessary state updates
- Tooltips now properly respect overflow clipping and component visibility
- Checkboxes now properly emit all checked/unchecked events
Other
@Nestconfig entries can now have the same name as their class (#52)- sentinel now always runs in console-mode on macOS (#51)
Changes
- The biggest change in this release is the addition of the SlotComponent, a simple wrapper for handled screen slots. You can obtain the instance for a given slot via the
slotAsComponent(int)method onBaseOwoHandledScreen. It will then always move the linked slot to where the component gets placed by the layout and apply clipping properly - Config wrappers now create the full file path of a config - this allows properly grouping multiple configs in a directory
Fixes
- The Modrinth item group icon now matches current branding
- Status effects in the creative inventory now properly shift when there are item group buttons in the way
- Pressing tab in an owo item group with buttons or tabs no longer renders a tooltip whereever the cursor is
Fixes
- The config Annotation Processor no longer crashes when you have a config model without any nested objects
The 0.8 Update
This release marks the first public beta of owo-lib 0.8, the UI and Config update. As that name suggests the primary new features in this release are the owo-ui GUI framework and the owo-config configuration and screen generation library. You can find their respective documentation here:
- owo-ui: https://docs.wispforest.io/owo/ui/
- owo-config: https://docs.wispforest.io/owo/config/
Both of these additions are highly complex and introduce potential bugs. There has been extensive testing to try and ensure a smooth start, but of course we cannot guarantee that everything has been squashed. So while we consider it more than safe enough to use, keep this in mind and please report any bugs you may find.
Other changes
There have also been a number of smaller refactors and new deprecations across the entire library, notably ScreenUtils#generatePlayerSlots has been deprecated and replaced with the more flexible and powerful SlotGenerator utility. owo-sentinel has finally been fixed to work properly in 1.19 environments and the rich translations feature is now fully compatible with Server Translations API.
Another small new feature, courtesy of Blodhgarm, is the Recipe-specific Remainders API which, as the name suggests, enables recipe remainders to be defined and applied on a per-recipe level instead of globally.
Deprecated APIs
As this is a large release, the majority if not all previously deprecated APIs have been stripped and/or partly refactored. The majority of mods should be fine, although if you haven't updated in a while there's potential you need to fix some things.



