The Best Resource for Minecraft
The Best Resource for Minecraft

OwO Lib Mod Wiki

OwO Lib is a comprehensive utility library for Minecraft modding that provides advanced UI frameworks, annotation-driven configuration systems, and streamlined networking tools for Fabric and NeoForge.

7 sections · 806 words

Overview#

OwO Lib (Open Worthwhile Operations) is a foundational library mod designed to simplify complex modding tasks. It is primarily known for its powerful declarative UI system (owo-ui) and its automated configuration framework (owo-config). By providing a standardized set of tools for registration, networking, and visual effects, it allows developers to focus on content while ensuring a consistent and high-quality user experience.

The mod is compatible with Fabric, Quilt, and NeoForge, serving as a backbone for numerous popular mods. It includes owo-sentinel, a safety mechanism that ensures players have the library installed before attempting to run dependent mods.

UI System (owo-ui)#

The owo-ui framework is a declarative UI library that allows for the creation of dynamic, high-performance screens using either XML-like layouts or a code-driven builder API. It replaces the traditional, verbose Minecraft screen rendering with a component-based architecture.

Core Components

Component Description
Label Displays text with support for rich formatting and shadows.
Button Interactive clickable element with customizable textures and sizing.
Box A simple colored rectangle used for backgrounds or borders.
Text Box An input field for user text, featuring improved cursor behavior and event streams.
Checkbox A toggleable component for boolean settings.
Slider Allows users to select a value from a range, supporting discrete steps.
Dropdown A collapsible menu for selecting one option from many.
Color Picker A full HSV picker for selecting colors with optional alpha support.
Item Component Renders an ItemStack with full tooltip support.
Entity Component Renders a live entity model within the UI.

Layout Containers

  • Flow Layout: Arranges children horizontally or vertically with support for alignment and spacing.
  • Grid Layout: Positions components in a structured grid of rows and columns.
  • Scroll Container: Provides a scrollable view for content that exceeds the screen size.
  • Collapsible Container: A layout that can be expanded or hidden by the user.
  • Overlay Container: Displays content as a modal popup over the rest of the UI.

Configuration System (owo-config)#

The owo-config system is an annotation-driven framework that automatically generates graphical configuration screens. It supports advanced features like server-client synchronization and real-time validation.

Key Features

  • Automatic Screen Generation: Config screens are built using owo-ui and can be customized via XML without changing code.
  • Synchronization: Options can be marked for automatic syncing from the server to the client, preventing gameplay inconsistencies.
  • Search Functionality: Built-in search bar allows users to quickly find specific options by name or value.
  • Constraints: Developers can define ranges, regex patterns, or custom predicates to validate user input.
  • Restart Requirements: Options can be flagged to notify the user if a game restart is required to apply changes.

Supported Data Types

Standard primitives (int, float, boolean, String), Enums, Lists, Sets, and custom objects. It also natively supports the Color type with an integrated picker.

Mechanics & Features#

Item Group Extensions

OwO Lib enhances the creative inventory by allowing mods to create tabbed item groups. This prevents clutter by grouping related items into sub-tabs within a single main category. These groups support custom buttons, textures, and dynamic item variant handling.

Networking & Endecs

The library includes a networking layer built on Endecs (Encoder/Decoder). This system provides:

  • Automatic Serialization: Complex data structures are converted to network packets automatically.
  • Handshaking: Ensures that the client and server have compatible mod versions before connection.
  • Particle Events: A side-agnostic system for triggering complex particle effects from the server with minimal overhead.

Particle System

OwO Lib provides a wrapper for Minecraft's particle system, making it easier to spawn geometric patterns or random distributions. It includes client-side helpers for composing multi-layered particle effects without manual coordinate math.

Sentinel#

owo-sentinel is a specialized sub-mod included within mods that depend on OwO Lib. Its sole purpose is to improve the user experience when the library is missing.

  • Function: If a player launches the game with a mod that requires OwO Lib but the library is not present, Sentinel stops the launch process.
  • User Interface: It opens a custom window explaining the missing dependency.
  • Installation: It provides a one-click button to automatically download and install the correct version of OwO Lib or a button to open the official download page.
  • Safety: It never connects to the internet or modifies files without explicit user consent via a labeled button.

Commands#

OwO Lib adds administrative and debug commands to assist both players and developers.

Command Description
/owo-config Opens the configuration screen for any registered mod, even if ModMenu is not installed.
/owo-ui debug (Developer only) Toggles the UI inspector to debug layout boundaries and component properties.

Technical Setup#

For developers integrating OwO Lib into their projects, the following configurations are required in the build environment.

Repository Configuration

repositories {
 maven { url 'https://maven.wispforest.io/releases/' }
 maven { url 'https://jitpack.io' }
}

Dependency Declaration

Fabric:

dependencies {
 modImplementation "io.wispforest:owo-lib:${project.owo_version}"
 include "io.wispforest:owo-sentinel:${project.owo_version}"
}

NeoForge:

dependencies {
 implementation "io.wispforest:owo-lib-neoforge:${project.owo_version}"
 accessTransformer "io.wispforest:owo-lib-neoforge:${project.owo_version}"
 interfaceInjectionData "io.wispforest:owo-lib-neoforge:${project.owo_version}"
}