LineageCore is a mod I made specifically to create Species that work with all kinds of things.
Whether you want to use Java or purely JSON, you can make a species with either.
Here's some basic guides in the form of an example json file that you should put into ".minecraft/lineages/template.json" or ".minecraft/lineages/template/template.json"
NOTE: The artDirectory searches ONLY in the lineages folder, nowhere else.
- Display Name: Changes the title of your Species/Subspecies
- Species Description: Your Description
- Species ID: Your Species ID, "id" denotes a core species and "id_sub" denotes a subspecies,.
- Order [OPTIONAL]: Changes the order of where your species appears, 100 is default and will make it appear right-most.
- Has Subspecies [OPTIONAL]: True of False, should be able to be used with subspecies as well.
- Is Subspecies Of [OPTIONAL]: Denotes what species it is a subspecies of, please do not use this if your species is a core species. "human" and "normal_human" are the base core species.
- Art Directory [OPTIONAL, BUT RECOMMENDED]: Denotes where the art is, searches the Lineage Folder and any Subfolders.
- On Select [OPTIONAL]: In Java, it only supports Java Code, obviously. In Json, it only supports commands as shown below (For Safety Reasons).
{
"displayName": "Template Species",
"speciesDescription": "This is an example species loaded dynamically from the lineages folder.",
"speciesID": "template_species_sub",
"order": 100,
"hasSubspecies": false,
"isSubspeciesOf": "human",
"artDirectory": "template/template_art.png",
"onSelect": {
"type": "command",
"command": [
"/give @s minecraft:bow 1",
"/give @s minecraft:arrow 64"
]
}
}
Java Code Example:
public static final RegistryObject<Species> ELF = SPECIES.register(
"elf",
() -> new Species(
"Elf",
"Agile archers attuned with nature.",
"elf",
true,
player -> {
// Example 1: Add potion effects directly
player.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 999999, 0, false, false));
// Example 2: Give an item directly
player.getInventory().add(new ItemStack(Items.BOW));
// Example 3: Send a message or play a sound
player.sendSystemMessage(Component.literal("You have attuned with nature!"));
},
null,
-1
)
);

