Skip to main content
Version: GeckoLib5

Adding the Dependency

Once you've added your GeckoLib version reference, and the maven repository, you can add the dependency.

Adding the dependency​

  1. Find the dependencies block in your build.gradle file. If one doesn't exist, create it.
  2. Inside the dependencies block, add the below dependency line:
implementation "com.geckolib:geckolib-neoforge-${minecraftVersion}:${geckolibVersion}"

Optional: Interface Injections​

GeckoLib provides compile-time interface injections for users of ModDevGradle

If you are using ModDevGradle, it's recommended that you also add the below injection data to your dependencies block:

interfaceInjectionData "com.geckolib:geckolib-neoforge-${minecraftVersion}:${geckolibVersion}"

Finally​

Once you're done, refresh Gradle by opening the Gradle tool window and clicking the refresh button.

Gradle Refresh Button

And you should be good to go!