Ponder.registry((event) => {
    event.create("biomancy:primordial_cradle").scene("primordial_cradle_scene_one", "Creating life", (scene) => {

        scene.showStructure();
        scene.world.setBlocks([2, 1, 2], "biomancy:primordial_cradle");

        // scene.world.modifyTileNBT([2, 1, 2], (nbt) =>  nbt.SacraficeHandler.Biomass = '100b');
        scene.idle(10);

        scene.text(80, "The Primordial Cradle births Flesh Blobs that can be cultivated and slain for Living Flesh", [2, 2, 2])

        scene.idle(90);

        scene.text(80, "Right click or toss raw meat into the cradle to feed it", [2, 2, 2])

        scene.idle(20);

        scene.showControls(60, [2, 2, 2], "down").rightClick().withItem('minecraft:beef')

        scene.idle(50);

        scene.idle(30);
        scene.addLazyKeyframe()
        scene.text(80, "Once filled with flesh, the cradle needs a Potion of Health or Regeneration to digest", [2, 2, 2])

        scene.idle(20);

        scene.showControls(60, [2, 2, 2], "down").rightClick().withItem('minecraft:potion')
   
        scene.idle(50);

        scene.text(80, "If successful, the cradle will birth a Flesh Blob!", [2, 2, 2])

        scene.idle(20);
        
        const fleshBlob = scene.world.createEntity("biomancy:flesh_blob", [2, 2, 2]);
        
        scene.idle(60);
        
        scene.world.removeEntity(fleshBlob);

        scene.idle(20);
        
        scene.addLazyKeyframe()

        scene.text(80, "There is a chance however, the birthing fails and primordial energy leaks out from the cradle", [2, 2, 2])

        scene.idle(20);
        
        scene.world.setBlocks([2, 0, 3], "biomancy:malignant_flesh_veins", true);
        scene.world.setBlocks([1, 0, 2], "biomancy:malignant_flesh_veins", true);
        scene.world.setBlocks([3, 0, 2], "biomancy:malignant_flesh_veins", true);
        scene.world.setBlocks([2, 0, 1], "biomancy:malignant_flesh_veins", true);
        
        scene.idle(70);

        scene.text(80, "Cull the flesh before it spreads, or let it run wild and reap the rewards.", [2, 2, 2])

        scene.idle(20);

        scene.showControls(60, [1, 0, 2], "down").leftClick().withItem('minecraft:iron_hoe')
   
        scene.idle(70);

    });

    event.create("biomancy:primordial_cradle").scene("primordial_cradle_scene_two", "Primordial Cradle modifiers", (scene) => {

        scene.showStructure();
        scene.world.setBlocks([2, 1, 2], "biomancy:primordial_cradle");

        scene.idle(10);

        scene.text(80, "The Primordial Cradle when fed meat has a set chance to create a Flesh Blob, but the behavior can be modified by feeding it various items", [2, 2, 2])

        scene.idle(70);

        scene.text(80, "For example, feeding the cradle Spider Eyes will give it a chance to create a Hungry Flesh Blob", [2, 2, 2])

        scene.idle(20);

        scene.showControls(60, [2, 2, 2], "down").rightClick().withItem('minecraft:spider_eye')

        scene.idle(50);
        scene.addLazyKeyframe()
        const hungryFleshBlob = scene.world.createEntity("biomancy:hungry_flesh_blob", [0, 2, 2]);
        
        scene.idle(20);
        
        scene.text(80, "Hungry Flesh Blobs actively seek out mobs to kill and grow in size", [2, 2, 2])

        scene.idle(60);
        
        scene.world.removeEntity(hungryFleshBlob);

    });
});