Genetics: Resequenced

Genetics: Resequenced

202k Downloads

Trouble adding custom mob genetics entries

MuteTiefling opened this issue ยท 5 comments

commented

Following the instructions for adding entity genetics, I have created a kubejs script which should be injecting an entry for a Chococraft Chocobo.

ServerEvents.generateData('before_mods', (event) => {
    let recipes = [
        {
            entity: 'chococraft:chocobo',
            genes: {
                'geneticsresequenced:basic': 5,
                'geneticsresequenced:no_fall_damage': 2,
                'geneticsresequenced:claws': 1,
                'geneticsresequenced:step_assist': 2
            }
        }
    ];

    recipes.forEach((recipe) => {
        // event.json(`enigmatica:geneticsresequenced/entitiy_genes/${recipe.entity.replace(':', '_')}`, recipe);
        event.json(`geneticsresequenced:entitiy_genes/${recipe.entity.replace(':', '_')}`, recipe);
    });
});

I can confirm the virtual data pack is being created in the specified path, but the mobs never seem to get the traits.

I've also attempted loading the json directly via the kubejs Data folder, thus bypassing the script, and it still doesn't appear to give them the traits. Nothing shows for them in EMI and decrypting their genes always comes up as basic.

Is there possibly an issue loading these currently? Mod version: 1.21-1.1.1
Or am I simply doing things wrong?

I've tried, as you can see in the script, a variety of paths. None seem to work.
When loaded manually, I placed it here \kubejs\data\geneticsresequenced\entitiy_genes

commented

entitiy_genes

commented

omg, I just saw that too >.<

commented

Lmk if it works though I haven't tried using kjs for it yet

commented

Very cool, thank you

commented

This works great. Amazing what proper spelling will do for you :D

If you want to keep this as an example for people (1.21 only), feel free. <3

ServerEvents.generateData('before_mods', (event) => {
    let recipes = [
        {
            entity: 'chococraft:chocobo',
            genes: {
                'geneticsresequenced:basic': 5,
                'geneticsresequenced:no_fall_damage': 2,
                'geneticsresequenced:claws': 1,
                'geneticsresequenced:step_assist': 2
            }
        }
    ];

    recipes.forEach((recipe) => {
        event.json(`enigmatica:geneticsresequenced/entity_genes/${recipe.entity.replace(':', '_')}`, recipe);
    });
});