Ladysnake/LadyLib


Ladysnake's library mod for minecraft modding

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.Ladysnake:Ladylib:2.6.5'
	}
	dependencies {
		implementation("com.github.Ladysnake:Ladylib:2.6.5")
	}
	<dependency>
	    <groupId>com.github.Ladysnake</groupId>
	    <artifactId>Ladylib</artifactId>
	    <version>2.6.5</version>
	</dependency>

                            
    libraryDependencies += "com.github.Ladysnake" % "Ladylib" % "2.6.5"
        
        

                            
    :dependencies [[com.github.Ladysnake/Ladylib "2.6.5"]]
        
        

Readme


LadyLib

Ladysnake's library mod for minecraft modding

Goals

This library aims to alleviate some pains of modding as well as to provide utilities for various things.

Installation

To use this library in your workspace, the main way is to declare it as a gradle dependency with jitpack. You are encouraged to use Forge's contained dependencies feature to ship the library in your mod's jar.

Sample code to add to your buildscript:

repositories {
    maven {
        url 'https://jitpack.io'
    }
}

configurations {
    contained
    contained.transitive = false
}

dependencies {
    deobfCompile 'com.github.Ladysnake:Ladylib:2.3.0' // replace with latest ladylib version (even better, put it in gradle.properties)
    contained 'com.github.Ladysnake:Ladylib:2.3.0'
}

jar {
    from(configurations.contained.files) {
        include '*'
        into 'META-INF/libraries'
    }
    manifest {
        attributes([
                'ContainedDeps': configurations.contained.files.collect { it.name }.join(" "),
                'Maven-Artifact': "${project.group}:${project.archivesBaseName}:${project.version}",
                'Timestamp'     : System.currentTimeMillis()
        ])
    }
}

Main features

  • Annotation-based registration
  • Helper methods for registration (because the two aren't mutually exclusive)
  • Generation of stub model files
  • NBT Serialization based on Gson
  • Built-in methods to interact with online JSON APIs
  • Simplified capabilities
  • Extremely customizable particles
  • A framework for shaders usage
  • Programmatic overriding of vanilla resources
  • Actual documentation (yes, I count that as a feature)

ModWinder

ModWinder is an integrated installer for Ladysnake approved mods. It works as a child mod of LadyLib, and allows players to easily install and update mods from inside the game.

Milksnake

Milksnake is a sub-project distributed on curseforge containing LadyLib and adding a few cosmetic features.