Skip to content

AmberA comprehensive multiloader library for Minecraft mod development

Write once, run everywhere - Unified APIs for Fabric, Forge, and NeoForge

Amber

What is Amber?

Amber is a powerful foundation library that provides unified APIs for common modding tasks across Fabric, Forge, and NeoForge platforms. Built with cross-platform compatibility in mind, Amber eliminates the complexity of managing platform-specific code while offering modern, easy-to-use APIs for Minecraft mod development.

Why Amber?

🎯 Write Once, Run Everywhere

With Amber's unified APIs, you can write your mod once and it will work on all major mod loaders without platform-specific code.

🚀 Modern Design

Built for Minecraft 1.21.10 with modern Java practices, Amber provides clean, intuitive APIs that reduce boilerplate and speed up development.

🔧 Comprehensive Toolkit

From registry management to networking, events to configuration, Amber provides all the tools you need for modern mod development.

🌟 Community Driven

Open source and community-focused, Amber is designed to evolve with the needs of mod developers.

Quick Start

1. Add Amber to Your Project

gradle
repositories {
    maven { url = 'https://raw.githubusercontent.com/iamkaf/modresources/main/maven/' }
}

dependencies {
    implementation "com.iamkaf:amber-common:8.3.2+1.21.10"
    // Platform-specific dependencies
    implementation "com.iamkaf:amber-fabric:8.3.2+1.21.10"
    // OR implementation "com.iamkaf:amber-forge:8.3.2+1.21.10"
    // OR implementation "com.iamkaf:amber-neoforge:8.3.2+1.21.10"
}

2. Initialize Amber

java
public class YourMod {
    public static final String MOD_ID = "yourmod";
    
    public static void init() {
        // Initialize with Amber - automatically detects mod name and version
        AmberInitializer.initialize(MOD_ID);
        
        // Your mod initialization code here
        System.out.println("YourMod initialized with Amber!");
    }
}

3. Start Building

java
// Register items
public static final DeferredRegister<Item> ITEMS = 
    DeferredRegister.create(MOD_ID, Registries.ITEM);

public static final RegistrySupplier<Item> MY_ITEM = ITEMS.register("my_item", 
    () -> new Item(new Item.Properties()));

// Handle events
PlayerEvents.ENTITY_INTERACT.register((player, level, hand, entity) -> {
    // Your interaction logic here
    return InteractionResult.PASS;
});

Core Features

🌐 Platform Abstraction

  • Environment Detection: Automatically detect client/server environments
  • Platform Information: Get details about the current mod loader
  • Path Management: Cross-platform access to game directories

📋 Registry System

  • Deferred Registration: Queue objects for registration at the right time
  • Cross-Platform: Works identically on all mod loaders
  • Type Safety: Full type safety for registered objects

🎪 Event System

  • Fabric-Inspired: Clean, familiar event API
  • Cross-Platform Events: Events work consistently across platforms
  • Performance Optimized: Efficient event dispatching

🌐 Networking

  • Type-Safe Packets: Compile-time safety for network messages
  • Simple API: Easy to send and receive packets
  • Platform Abstracted: Same API works on all platforms

⚙️ Configuration

  • JSON-Based: Simple JSON configuration files
  • Automatic Serialization: No manual serialization needed
  • Hot Reloading: Runtime configuration updates

Documentation

Version Information

  • Current Version: 8.3.2+1.21.10
  • Minecraft Version: 1.21.10
  • Supported Platforms: Fabric, Forge, NeoForge
  • License: MIT

Ready to get started? Check out the Getting Started Guide to begin using Amber in your mod development projects.

Released under the MIT License.