AvalonBase Mod supplies a shared core library of themed menus, live TOML config tools, cross-platform networking, and platform checks for Minecraft mods. This mod holds zero gameplay content of its own and instead packs 5 low-level systems that other mods require to run smoothly. Mods built on it share 2 code-drawn UI themes, matching settings screens with permission checks, automatic config hot-reloading, and unified client-server packet sync. By keeping common code inside one lightweight library, dependent mods stay lean, avoid duplicated menus, and behave the same across mod loaders. Players normally add it when another utility, command, or multiplayer mod lists it as a required dependency.

AvalonBase Mod

Features:

  • Pure Code Themed GUI System: Draws clean menus entirely through code with zero texture files required, letting dependent mods switch between a classic Vanilla-style theme and a sleek Ender-purple modern theme.
  • Ready-Made Base Config Screen: Supplies a full settings screen template where subclasses only need to write their save logic to get working buttons, scrollable lists, and permission checks.
  • Live TOML Config Hot-Reloading: Wraps night-config to create missing config files automatically, keep file comments intact, and watch for external edits so settings reload live.
  • Unified Cross-Platform Networking: Offers one shared API to register, encode, decode, and handle packets between clients and servers without writing separate loader branches.
  • Platform Service Helpers: Hides loader-specific code behind one helper interface that checks the active runtime loader, detects other loaded mods, and tells development runs apart from production.
  • Contains zero gameplay-specific logic so dependent mods stay small and focused solely on their own features.
  • Keeps styling and controls uniform across every mod that relies on this library, giving players familiar settings screens every time.
  • Lets mods run one single common codebase across different mod loaders, cutting out repeated boilerplate for menus, config files, and packet syncing.
  • Works cleanly as a mandatory prerequisite dependency for any functional mod that needs visual menus or client-server data sync.

Themed GUI Widgets and Styles:

  • Two built-in visual styles: includes a Vanilla-style theme and an Ender-purple modern theme (MODERN_THEME) that apply automatically to every widget on screen.
  • Interactive controls: ships with themed buttons, radio selectors, and toggle switches ready out of the box.
  • Layout and visual parts: renders panels, cards, scrollbars, and icons with pure code and minimal setup.
  • Smooth visual feedback: pairs hover easing animations with state-aware color palettes that adapt to the chosen theme.

Config Screen Tools:

  • Save and Cancel helper: adds standard Save and Cancel buttons with a single call to addSaveCancelButtons().
  • Access control: handles automatic permission checks and read-only mode so unauthorized players cannot change locked server settings.
  • Menu polish: builds in scrollable item lists, cursor state switching, click sounds, a status hint bar, and consistent layout helpers.

TOML Config Framework:

  • Auto-generation: creates default TOML config files automatically whenever a file is missing via ensureExists().
  • Full file editing: handles reading, writing, sub-list edits, and standardized parsing and saving while preserving comments inside the file.
  • Hot-reload watcher: detects external file changes on disk and reloads updated values automatically.

Networking and Platform Services:

  • Packet registration: provides one unified interface via AvalonNetwork.registerMessage() for channel registration, encoding, decoding, and handling.
  • Targeted packet delivery: sends packets from client to server, broadcasts to every online player, or targets a single player directly.
  • Shared thread scheduling: handles cross-platform thread scheduling so common code runs safely without loader-specific checks.
  • Runtime inspection: queries the active loader, verifies if another mod is loaded, and checks Services.PLATFORM.isDevelopmentEnvironment() for dev-only behavior.

Suitable Dependent Mod Types:

  • Utility mods that need clean visual settings menus without drawing custom GUI textures.
  • Server-side permission and command manager mods that rely on read-only checks and synced screens.
  • Multiplayer mods that pass live data back and forth between clients and servers.
  • Cross-platform mods that need identical menus, configs, and network behavior across different mod loaders.

How to Use:

  1. For players, place this library alongside any mod that requires it; no in-game setup is needed because dependent mods load its menus and tools automatically.
  2. For mod projects adding a local jar dependency, include the dev jar with compileOnly in the common source set for compile-time access, add the runtime jar with modImplementation in the platform-specific module, and mark the library as a mandatory required dependency in the mod metadata.
  3. For multi-mod setups, publish the library artifacts to a private Maven repository and reference them with standard Maven coordinates.
  4. Keep night-config available for the TOML framework; some mod loaders bundle it by default, while others require packaging it inside your mod jar.
  5. Create and initialize a TOML config file using AvalonToml and call toml.ensureExists(Config.inMemory()) so a default file generates when missing.
  6. Build a custom settings screen by extending AvalonConfigScreen, picking a theme with setTheme(MODERN_THEME), adding buttons with addSaveCancelButtons(), and overriding saveConfig() with your save logic.
  7. Register cross-platform packets through AvalonNetwork.registerMessage(channel, clazz, encode, decode, handler) and check Services.PLATFORM.isDevelopmentEnvironment() whenever you need development-only code.
// 1. Initialize TOML config
AvalonToml toml = new AvalonToml("mymod", Path.of("config", "mymod.toml"));
toml.ensureExists(Config.inMemory());

// 2. Custom config screen extending base screen
public class ModConfigScreen extends AvalonConfigScreen {
    public ModConfigScreen() {
        super(Component.translatable("gui.mymod.title"));
        setTheme(MODERN_THEME);
        addSaveCancelButtons();
    }
    @Override
    protected void saveConfig() {
        // Add your own save logic here
    }
}

// 3. Register cross-network packet
AvalonNetwork.registerMessage(channel, clazz, encode, decode, handler);

// 4. Check runtime environment
if (Services.PLATFORM.isDevelopmentEnvironment()) {
    // Development-only logic
}

AvalonBase Mod Download Links

Filter by

For Minecraft 26.3

For Minecraft 26.2, 26.1.2, 26.1.1

For Minecraft 1.21.11, 1.21.10, 1.21.9

For Minecraft 1.21.8, 1.21.7, 1.21.6

For Minecraft 1.21.5, 1.21.4, 1.21.3

For Minecraft 1.20.1, 1.20

For Minecraft 1.18.2

Click to rate this post!
[Total: 0 Average: 0]
QUICK MINECRAFT SURVEY · ONE TAP
Mods & Modpacks

How often do you play pre-made modpacks instead of making your own?

23 responses · See the full results →