Download OtterLib — Minecraft Mods — MetaMods
OtterLib

OtterLib

Active

Downloads

4

Last update

2 months ago

Versions

1.20 — 1.21.8
Server
Fabric
Quilt
Libraries
Control
Utils

OtterLib

OtterLib is a versatile library for Minecraft, originally created to simplify the development of custom modifications but now available to all developers. The mod supports several popular loaders: Fabric, Spigot, and Paper.

Integration Capabilities

To connect OtterLib to your project, add the following lines to your build.gradle file:

repositories {
    maven {
        name "oth3rMavenSnapshots"
        url "https://maven.oth3r.one/snapshots"
    }
}

Dependencies for various loaders (where ${project.otterlib_version} is the current library version):

// for Fabric
modImplementation "one.oth3r:otterlib:${project.otterlib_version}-fabric"
// for Spigot
implementation "one.oth3r:otterlib:${project.otterlib_version}-spigot"
// for Paper
implementation "one.oth3r:otterlib:${project.otterlib_version}-paper"

Main Features

💬 Convenient Chat Builder

The library provides a simple tool for creating formatted chat messages:

player.sendMessage(new CTxT("Hello").color(Color.BLUE).bold(true).strikethrough(true)
    .append(new CTxT("World!!!!!!!!!").rainbow(new Rainbow(true)).underline(true).italic(true)).b());

In-game example

📜 Localization System

OtterLib includes an advanced language file reading mechanism that makes it easy to implement server-side localization on all supported loaders. It also supports additional storage locations for locales, simplifying user customizations.

🗃️ Reliable File Management

The library interface simplifies the creation of configuration files with support for saving, loading, and easy version updates:

@Override
public void update(JsonElement jsonElement) {
    JsonObject file = jsonElement.getAsJsonObject();
    if (file.get("version").getAsDouble() == 1.0) {
        this.version = 1.1;
        this.test = file.get("test-bool").getAsBoolean();
    }
}

⚙️ Customizable Configuration Screen

OtterLib offers a flexible configuration screen system that can be adapted for editing multiple settings files, adding social media links, or creating multi-level interfaces:

client.setScreen(new ConfigScreen(client.currentScreen, Text.of("test"),
    new CustomImage(Identifier.of(FabricTest.MOD_ID, "textures/gui/banner.png"),240, 60),
    // list of buttons to display in the center
    List.of(
            SimpleButton.Templates.fileEditor(new CTxT("Test File"), FabricTest.testFile, new CustomImage(Identifier.of(FabricTest.MOD_ID, "button/server_button"),246,26)).build(),
            SimpleButton.Templates.fileEditor(new CTxT("Test File No Image"), FabricTest.testFile).build(),
            SimpleButton.Templates.wiki(new CTxT("Help")).openLink("https://oth3r.one").size(30,30).build(),
            SimpleButton.Templates.wiki(new CTxT("Help")).openLink("https://oth3r.one").size(30,30).build(),
            SimpleButton.Templates.warning(new CTxT("Help")).openLink("https://oth3r.one").size(150,15).hideText(false).build()
    ),
    // bottom buttons can be customized!
    List.of(
            new SimpleButton.Builder(new CTxT("Donate"))
                    .miniIcon(new CustomImage(Identifier.of(Assets.ID, "icon/donate"),15,15)).build(),
            SimpleButton.Templates.donate(new CTxT("Donate")).openLink(URI.create("https://ko-fi.com/oth3r")).build(),
            SimpleButton.Templates.done(new CTxT("Done")).build(),
            SimpleButton.Templates.wiki(new CTxT("Wiki")).openLink("https://oth3r.one").build()
    )));

Main settings screen

File editor

Note: Individual entry editor is currently in development, the current version provides basic functionality.

Project members
Oth3r

Oth3r

Developer

Created: 8 May 2025

ID: 87528