Cross-Platform Compatibility
Unified APIs that work identically across Fabric, Forge, and NeoForge platforms
Write once, run everywhere - Unified APIs for Fabric, Forge, and NeoForge
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.
With Amber's unified APIs, you can write your mod once and it will work on all major mod loaders without platform-specific code.
Built for Minecraft 1.21.11 with modern Java practices, Amber provides clean, intuitive APIs that reduce boilerplate and speed up development.
From registry management to networking, events to configuration, Amber provides all the tools you need for modern mod development.
Open source and community-focused, Amber is designed to evolve with the needs of mod developers.
repositories {
maven { url = 'https://raw.githubusercontent.com/iamkaf/modresources/main/maven/' }
}
dependencies {
implementation "com.iamkaf:amber-common:9.0.2+1.21.11"
// Platform-specific dependencies
implementation "com.iamkaf:amber-fabric:9.0.2+1.21.11"
// OR implementation "com.iamkaf:amber-forge:9.0.2+1.21.11"
// OR implementation "com.iamkaf:amber-neoforge:9.0.2+1.21.11"
}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!");
}
}// 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;
});Ready to get started? Check out the Getting Started Guide to begin using Amber in your mod development projects.