SilentChaos512/SilentLib


A common library for mods to use, to making updating and creating new mods easier. https://www.curseforge.com/minecraft/mc-mods/silent-lib

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.silentchaos512:silentlib:2.3.4'
	}
	dependencies {
		implementation("com.github.silentchaos512:silentlib:2.3.4")
	}
	<dependency>
	    <groupId>com.github.silentchaos512</groupId>
	    <artifactId>silentlib</artifactId>
	    <version>2.3.4</version>
	</dependency>

                            
    libraryDependencies += "com.github.silentchaos512" % "silentlib" % "2.3.4"
        
        

                            
    :dependencies [[com.github.silentchaos512/silentlib "2.3.4"]]
        
        

Readme


SilentLib

A common library for my Minecraft mods to use, to make updating and creating new mods easier and reducing code duplication.

Downloads

If you downloaded the mod from somewhere other than Curseforge or Modrinth (or as part of a modpack in some cases), I cannot make any guarantees about the file or its contents, as it may have been uploaded without my permission.

Other Links

Developers

To use Silent Lib in your project, add the following to your build.gradle.

You alse need to generate a GitHub token and add it along with your GitHub username to your personal gradle.properties file in C:\Users\YOUR_USERNAME\.gradle or ~/.gradle/gradle.properties. This file may not exist, and you would have to create it yourself.

GitHub tokens can be generated here. Click Generate New Token and click the checkmark for read:packages

Example of gradle.properties file in C:\Users\YOUR_USERNAME\.gradle or ~/.gradle/gradle.properties

//Your GitHub username
gpr.username=SilentChaos512

// Your GitHub generated token (bunch of hex digits) with read permission
gpr.token=paste_your_token_here

Code to add to build.gradle

repositories {
    maven {
        url = uri("https://maven.pkg.github.com/silentchaos512/silentlib")
        credentials {
            username = property('gpr.username')
            password = property('gpr.token')
        }
    }
    maven {
        url = uri("https://maven.pkg.github.com/silentchaos512/silent-utils")
        credentials {
            username = property('gpr.username')
            password = property('gpr.token')
        }
    }
}
dependencies {
    // Replace VERSION with the version you need, in the form of "MC_VERSION-MOD_VERSION"
    // Example: compile fg.deobf("net.silentchaos512:silentlib:1.16.3-4.+")
    // Available builds can be found here: https://github.com/SilentChaos512/silentlib/packages
    compile fg.deobf("net.silentchaos512:silent-lib:VERSION") {
        exclude module: "forge"
    }
}