Skip to content

Installation

Mystery2099 edited this page Sep 18, 2026 · 3 revisions

Installation

VoxLib publishes a separate JAR for each loader and Minecraft version. Start by matching your game version on the version matrix, then use the setup for your loader below. Mixing the Fabric and NeoForge artifacts will not work.

Every example uses VERSION as a placeholder for a release such as 1.8.0+1.21.1. Copy an exact version from the Modrinth versions page.

Modrinth Maven (recommended)

Every VoxLib release on Modrinth is available through Modrinth's Maven repository. It needs no username or token.

repositories {
    exclusiveContent {
        forRepository {
            maven {
                name = "Modrinth"
                url = "https://api.modrinth.com/maven"
            }
        }
        filter {
            includeGroup "maven.modrinth"
        }
    }
}

dependencies {
    modImplementation "maven.modrinth:voxlib:VERSION"
}

The Maven coordinate above resolves to the Fabric JAR. Do not use it in a NeoForge project. For NeoForge on 1.20.6 and 1.21.1, use the GitHub Packages artifact below or download the NeoForge JAR from its Modrinth version page and add it as a local files() dependency.

GitHub Packages

GitHub Packages hosts the loader-specific artifacts, including NeoForge. GitHub requires authentication even for public packages, which is annoying but unavoidable here.

repositories {
    maven {
        name = "GitHubPackages"
        url = "https://maven.pkg.github.com/Mystery2099/VoxLib"
        credentials {
            username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
            password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
        }
    }
}

dependencies {
    modImplementation "com.github.mystery2099:voxlib:VERSION"
}

Provide the token in one of two ways:

  1. Set gpr.user and gpr.key in ~/.gradle/gradle.properties.
  2. Set the GITHUB_ACTOR and GITHUB_TOKEN environment variables.

The token needs the read:packages scope. Do not commit it to your project.

Artifact coordinates by loader:

Loader Coordinate Available for
Fabric com.github.mystery2099:voxlib:VERSION All versions
NeoForge com.github.mystery2099:voxlib-neoforge:VERSION 1.20.6, 1.21.1
Forge com.github.mystery2099:voxlib-forge:VERSION 1.20.1

With ModDevGradle on NeoForge, use modImplementation:

dependencies {
    modImplementation "com.github.mystery2099:voxlib-neoforge:VERSION"
}

With ForgeGradle or Loom's legacy Forge plugin on 1.20.1, use implementation for Forge builds, as shown in the 1.20.1 examples on the NeoForge and Forge setup page.

CurseForge Maven

repositories {
    maven {
        name = "CurseForge"
        url = "https://cursemaven.com"
    }
}

dependencies {
    modImplementation "curse.maven:voxlib-PROJECT_ID:FILE_ID"
}

Replace PROJECT_ID and FILE_ID with the numbers from the file page of the release you want on CurseForge.

mavenLocal

If you are working on VoxLib itself, ./gradlew publishToMavenLocal publishes both loader artifacts to your local Maven repository. Add only the dependency for your loader:

dependencies {
    // Fabric
    modImplementation "com.github.mystery2099:voxlib:VERSION"

    // NeoForge: use this instead of the Fabric coordinate
    // modImplementation "com.github.mystery2099:voxlib-neoforge:VERSION"
}

Runtime dependencies by version

VoxLib Kotlin runtime Other runtime deps Optional
1.8.0+1.21.1 (Fabric) Fabric Language Kotlin 1.14.1, Kotlin 2.4.20 Fabric API Mod Menu 11.0.4
1.8.0+1.21.1 (NeoForge) Bundled Caffeine bundled none
1.7.0+1.20.6 (NeoForge) Bundled Caffeine bundled none
1.6.1+1.20.1 (Fabric) Fabric Language Kotlin Fabric API Mod Menu 10.0.0
1.6.1+1.20.1 (Forge) Bundled Caffeine bundled none
1.2.0 to 1.6.0+1.19.4 (Fabric) Fabric Language Kotlin Fabric API 0.87.2+1.19.4 or newer Mod Menu

NeoForge and Forge JARs bundle the Kotlin standard library and Caffeine, so you install only the VoxLib JAR on those loaders. On Fabric, install Fabric API and a Fabric Language Kotlin version compatible with your VoxLib release; the Modrinth page for each release lists the tested version.

Building from source

./gradlew build

Distributable JARs land in fabric/build/libs/voxlib-fabric-VERSION.jar and neoforge/build/libs/voxlib-neoforge-VERSION.jar. Sources JARs are included for both loaders.

There are two Java versions involved here. Loom 1.18 needs JDK 25 to run the Gradle build, while the mod toolchain and compiled JARs still target Java 21.

Mappings note

The wiki's code samples use Mojang (official) mappings, which VoxLib has used since the 1.20.1 port. Example names: net.minecraft.world.phys.shapes.VoxelShape, net.minecraft.core.Direction, net.minecraft.core.BlockPos.

Your own project can use Yarn, Mojang, or other mappings. Loom remaps VoxLib's published Fabric JAR to your project's mappings at build time, and NeoForge ships Mojang-mapped classes that match its own toolchain. Only the names you read in these docs change between mapping sets; the VoxLib function names stay the same. Older VoxLib releases (up to 1.6.0 for 1.19.4) were developed under Yarn mappings, but that only affects VoxLib's own sources, not yours.

Clone this wiki locally