HomeJavaModsChromosome Lib
Chromosome Lib
ModsJava

Chromosome Lib

by Viola-Siemens · on Modrinth

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.20–1.20.1 · Fabric⬇ Download for 1.20–1.20.1 · Forge
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Abstract

This is a library mod that introduces chromosome-based genetic mechanisms for entities, such as villagers, sheeps, cows, in Minecraft. It does not provide any actual functionality on its own, but serves as a powerful and compatible library that integrates traits and genetic systems for dependents.

For developers to create dependents of this mod, please read the following sections.

Architecture

Architecture

Core capabilities

Registration

Chromosomes, Gene Loci, Genes, Traits and Trait Types can be registered through this mod.

We also provide some built-in chromosomes for vanilla animals such as sheep, cows, polar bears, humans, to prevent conflicts between different mods by registering different chromosomes to the same entity.

Inheritance

Automatic chromosome inheritance, including gene recombination and mutation, default gene selectors, are reusable to any mobs, which is managed by chromosome lib. So there's no need for developers to understand how it's implemented - they can code in a really easy way.

Debug Commands

We also provide several commands for players to show and modify genes of entities easily, and reassign traits of them based on their genes.

Use Cases

This library is perfect for:

Get Started

Add Viola Siemens's Maven to repository in your build.gradle.

repositories {
    maven {
        name = 'Maven from Viola Siemens'
        url = "https://viola-siemens.github.io/pages/maven/"
    }
}

Declare Chromosome Lib as your dependency.

Forge:

implementation fg.deobf("com.hexagram2021:chromosomelib-forge:${chromosomelib_version}")

Fabric:

modImplementation group: 'com.hexagram2021', name: 'chromosomelib-fabric', version: chromosomelib_version

NeoForge:

implementation group: 'com.hexagram2021', name: 'chromosomelib-neoforge', version: chromosomelib_version

MultiLoader:

// ^common/build\.gradle$
modImplementation group: 'com.hexagram2021', name: 'chromosomelib-common', version: chromosomelib_version
 
// ^forge/build\.gradle$
modImplementation group: 'com.hexagram2021', name: 'chromosomelib-forge', version: chromosomelib_version
 
// ^fabric/build\.gradle$
modImplementation group: 'com.hexagram2021', name: 'chromosomelib-fabric', version: chromosomelib_version
 
// ^neoforge/build\.gradle$
modImplementation group: 'com.hexagram2021', name: 'chromosomelib-neoforge', version: chromosomelib_version

Example Mods

Inheritable Coat Color

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more