Skip to content

Installation (Geckolib4)

Tslat edited this page Aug 20, 2023 · 26 revisions

GeckoLib is lightweight and easy to install - requiring only a few things to insert into your build.gradle file.

Templates

Fabric

Add the following to your build.gradle file, then refresh gradle for your project

// This is the repositories block in your build.gradle. NOT the one in publishing, or in buildscript. If it does not exist already, create it.
repositories {
    maven {
        name = 'GeckoLib'
        url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' 
    }
}

dependencies {
        modImplementation 'software.bernie.geckolib:geckolib-fabric-1.20:4.2'
}
Forge

Add the following to your build.gradle file

// This is the repositories block in your build.gradle. NOT the one in publishing, or in buildscript. If it does not exist already, create it.
repositories {
    maven {
        name = 'GeckoLib'
        url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' 
    }
}

dependencies {
        implementation fg.deobf('software.bernie.geckolib:geckolib-forge-1.20.1:4.2.2')
}

Then add the mixins plugin to your project's buildscript repositories (either in the top of your build.gradle, or in settings.gradle file)

buildscript {
        repositories {
                maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
        }
}

And apply the mixins plugin in your build.gradle file

plugins {
        id 'org.spongepowered.mixin' version '0.7.+'
}

Then refresh your gradle project, and regenerate your run configs

Other Versions

GeckoLib is also available on numerous versions other than the above templated options. To utilise these, simply follow the usual mod dependency instructions for your given modloader, using the latest GeckoLib version for the Minecraft version.

The dependency block below can be used in all cases irrespective of version:

// This is the repositories block in your build.gradle. NOT the one in publishing, or in buildscript. If it does not exist already, create it.
repositories {
    maven {
        name = 'GeckoLib'
        url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/' 
    }
}

Multiloader:

GeckoLib does not explicitly support a multiloader setup, as it does not have a common sources to publish. To use GeckoLib in a multiloader environment, simply add GeckoLib's Forge or Fabric sources as your dependency in common

An example of this can be found here

Installing the Blockbench Plugin

If you have not yet installed the Blockbench plugin for Geckolib, follow the steps outlined here

Table of Contents

Geckolib 3
Geckolib 4

Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith.

Cloudsmith is the only fully hosted, cloud-native, universal package management solution that enables your organization to create, store and share packages in any format, to any place, with total confidence.

Clone this wiki locally