Skip to content

AnvilLib

MinecraftMaven CentralNeoForgeLicense

AnvilLib is a NeoForge mod library developed by Anvil Dev, providing a collection of practical utilities and frameworks for Minecraft mod developers.

Features

AnvilLib adopts a modular design with the following functional modules:

ModuleDescription
ConfigAnnotation-based configuration system
CodecData codec and network serialization utilities
IntegrationMod compatibility integration framework
NetworkNetwork communication and automatic packet registration framework
RecipeIn-world recipe system
Moveable Entity BlockPiston-movable block entity support
MultiblockDynamic multiblock system
RegistrumSimplified registration system
UtilShareable utility methods
WheelRadial menu client API
RenderingLightweight rendering library
SyncDeclarative field synchronization system
FontSDF font rendering system
CollisionAABB/Triangle SAT collision detection
Space SelectVisual space selection system
MainAggregate module (includes all submodules)
Version DiffVersion-to-version API changes and migration guide

Dependency Setup

Gradle

groovy
repositories {
    mavenCentral() // This project has been published to Maven Central
    maven { url = "https://server.cjsah.net:1002/maven/" } // Use this if you need the latest builds
    // If your module uses interface injection, NeoForge's MavenCentral mirror is incomplete;
    // you need to use the exclusiveContent format below:
    exclusiveContent {
        forRepositories(
                // Choose one of the following:
                mavenCentral()
                maven { // Anvil Lib
                    name = "Cjsah Maven"
                    url = "https://server.cjsah.net:1002/maven/"
                }
        )
        filter {
            includeGroup "dev.anvilcraft.lib"
        }
    }
}

dependencies {
    // Full library
    implementation "dev.anvilcraft.lib:anvillib-neoforge-26.1:2.0.0"

    // Or include individual modules as needed
    implementation "dev.anvilcraft.lib:anvillib-config-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-codec-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-integration-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-moveable-entity-block-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-multiblock-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-network-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-recipe-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-registrum-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-util-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-wheel-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-rendering-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-sync-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-font-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-collision-neoforge-26.1:2.0.0"
    implementation "dev.anvilcraft.lib:anvillib-space-select-neoforge-26.1:2.0.0"
}
kotlin
repositories {
    mavenCentral() // This project has been published to Maven Central
    maven("https://server.cjsah.net:1002/maven/") // Use this if you need the latest builds
}

dependencies {
    implementation("dev.anvilcraft.lib:anvillib-neoforge-26.1:2.0.0")

    // Example: include only what you need
    implementation("dev.anvilcraft.lib:anvillib-config-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-codec-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-integration-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-moveable-entity-block-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-multiblock-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-network-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-recipe-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-registrum-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-util-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-wheel-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-rendering-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-sync-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-font-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-collision-neoforge-26.1:2.0.0")
    implementation("dev.anvilcraft.lib:anvillib-space-select-neoforge-26.1:2.0.0")
}

TIP

It is recommended to keep the version number consistent with the project release version (the current project configuration is mod_version=2.0.0).

Building the Project

bash
# Clone the repository
git clone https://github.com/Anvil-Dev/AnvilLib.git
cd AnvilLib

# Build on macOS / Linux
./gradlew build

# Build on Windows PowerShell / CMD
gradlew.bat build

License

This project is licensed under the MIT License.

Portions of the Registrum module are based on Registrate, licensed under the Mozilla Public License 2.0.

Author

  • Gugle - Primary Developer
  • QiuShui1012 - Multiblock, Util, Network Module Contributor
  • ZhuRuoLing - Rendering Module Contributor
  • LouisQuepierts - Rendering Module Contributor
  • MercuryGryph - Wheel Module Contributor

Released under the CC-BY-NC-SA 4.0 License.