extend("gowhp:kratos_ragnarok");
loadTextures({
    "layer1": "gowhp:kratos/kratos_allfather_layer1",
    "layer2": "gowhp:kratos/kratos_allfather_layer2",
    "eyes_lightning": "gowhp:kratos/kratos_allfather_lightning_eyes",
    "eyes_bifrost": "gowhp:kratos/kratos_allfather_bifrost_eyes",
    "beard": "gowhp:kratos/kratos_allfather_beard",
    "mjolnir": "gowhp:thor/mjolnir",
    "mjolnir_lights": "gowhp:thor/mjolnir_lights",
    "gungnir_open": "gowhp:odin/gungnir_open",
    "book_of_eldr": "gowhp:odin/book_of_eldr",
    "odinhead": "gowhp:kratos/odinheaddisplay",
    "thorhead": "gowhp:kratos/thorheaddisplay"
});

var bifrost_aura = implement("gowhp:external/aura")
var bifrost_aura_fly = implement("gowhp:external/aura_fly")

var mjolnir;
var mjolnirholster;
var mjolnirthrow;
var gungnir;
var gungnirblade;

function init(renderer) {
    parent.init(renderer);
    renderer.setLights((entity) => (entity.getData("gowhp:dyn/mjolnir") && ((entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2) && !entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0 && (entity.getData("fiskheroes:beam_charging")))) ? "eyes_lightning" : null);
    renderer.setLights((entity) => ((entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charging") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0  || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2)) || ((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))) ? "eyes_bifrost" : null);
    initEffects(renderer);
}

function initAnimations(renderer) {
    parent.initAnimations(renderer);
    utils.addFlightAnimationWithLanding(renderer, "kratos.FLIGHT", "gowhp:flight/thor.anim.json");
    utils.addHoverAnimation(renderer, "kratos.HOVER", "gowhp:flight/idle/thor_idle");
    utils.addAnimationEvent(renderer, "FLIGHT_DIVE", "gowhp:flight/thor_dive");

    addAnimation(renderer, "kratos.DISPLAY", "gowhp:kratos_allfather_display")
        .setData((entity, data) => data.load(1.0))
        .setCondition(entity => (entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))
        .priority = 18;
    addAnimation(renderer, "kratos.SPRINT", "gowhp:sprint_kratos")
        .setData((entity, data) => data.load(1.0))
        .setCondition(entity => (entity.isSprinting() && !entity.getData("fiskheroes:flying")))
        .priority = 21;
    addAnimationWithData(renderer, "kratos.MJOLNIRTHROW", "gowhp:throwaiming", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0));
    addAnimationWithData(renderer, "kratos.MJOLNIRUNHOLSTER", "gowhp:mjolnirunholster_allfatherkratos", "gowhp:dyn/mjolnir_timer");
    addAnimationWithData(renderer, "kratos.MJOLNIRFIRSTPERSON", "gowhp:weaponfirstperson", "gowhp:dyn/mjolnir").setCondition(entity => (!entity.getInterpolatedData("gowhp:dyn/mjolnirthrowanimation_timer") && entity.getInterpolatedData("gowhp:dyn/mjolnir_timer") > 0.5 && !entity.isPunching()));
    addAnimationWithData(renderer, "kratos.THUNDERBLASTCHARGE", "gowhp:thunderblast_charge", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 && entity.getData("fiskheroes:beam_charging") && !entity.getData("fiskheroes:beam_shooting")));
    addAnimationWithData(renderer, "kratos.THUNDERBLAST", "gowhp:thunderblast", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 && entity.getData("fiskheroes:beam_shooting")));
    addAnimationWithData(renderer, "kratos.THUNDERBLASTDONE", "gowhp:thunderblast", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 && !entity.getData("fiskheroes:beam_charging")));
    addAnimationWithData(renderer, "kratos.MJOLNIRSLAMCHARGE", "gowhp:mjolnirslam_charge", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2 && entity.getData("fiskheroes:beam_charging") && !entity.getData("fiskheroes:beam_shooting")));
    addAnimationWithData(renderer, "kratos.MJOLNIRSLAM", "gowhp:mjolnirslam", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2 && entity.getData("fiskheroes:beam_shooting")));
    addAnimationWithData(renderer, "kratos.MJOLNIRSLAMDONE", "gowhp:mjolnirslam", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2 && !entity.getData("fiskheroes:beam_charging")));
    addAnimationWithData(renderer, "kratos.LEIPTRA", "gowhp:leiptra", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0));
    addAnimationWithData(renderer, "kratos.ELDR", "gowhp:eldr", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1));
    addAnimationWithData(renderer, "kratos.GLETTINGSBARACHARGE", "gowhp:glettingsbara_charge", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2 && entity.getData("fiskheroes:beam_charging") && !entity.getData("fiskheroes:beam_shooting")));
    addAnimationWithData(renderer, "kratos.GLETTINGSBARA", "gowhp:glettingsbara", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2 && entity.getData("fiskheroes:beam_shooting")));
    addAnimationWithData(renderer, "kratos.GLETTINGSBARADONE", "gowhp:glettingsbara", "fiskheroes:beam_charge").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2 && !entity.getData("fiskheroes:beam_charging")));
}

function initEffects(renderer) {
    parent.initEffects(renderer);

    beard = renderer.createEffect("fiskheroes:model");
    beard.setModel(utils.createModel(renderer, "gowhp:allfatherkratosbeard", "beard"));
    beard.anchor.set("head");

    var mjolnirthrow = renderer.createResource("MODEL", "gowhp:mjolnir");
    mjolnirthrow.texture.set("mjolnir", "mjolnir_lights");
    mjolnirthrow.bindAnimation("gowhp:mjolnirthrow").setData((entity, data) => {
		data.load(entity.getInterpolatedData("gowhp:dyn/mjolnirthrowanimation_timer"));
	});
    mjolnir = renderer.createEffect("fiskheroes:model").setModel(mjolnirthrow);
    mjolnir.anchor.set("rightArm");
    mjolnir.setScale(0.45);
    mjolnir.setRotation(90.0, 90.0, 0.0);
    mjolnir.setOffset(1.0, 8.5, -8.2);

    mjolnirholster = renderer.createEffect("fiskheroes:model");
    mjolnirholster.setModel(utils.createModel(renderer, "gowhp:mjolnir", "mjolnir", "mjolnir_lights"));
    mjolnirholster.anchor.set("body");
    mjolnirholster.setScale(0.45);
    mjolnirholster.setRotation(0.0, 180.0, -45.0);
    mjolnirholster.setOffset(-2.0, 13.0, 3.0);

    mjolnirdisplay = renderer.createEffect("fiskheroes:model");
    mjolnirdisplay.setModel(utils.createModel(renderer, "gowhp:mjolnir", "mjolnir", "mjolnir_lights"));
    mjolnirdisplay.anchor.set("leftArm");
    mjolnirdisplay.setScale(0.45);
    mjolnirdisplay.setRotation(90.0, 90.0, 0.0);
    mjolnirdisplay.setOffset(-1.0, 8.5, -8.2);

    bladeofchaosdisplay = renderer.createEffect("fiskheroes:model");
    bladeofchaosdisplay.setModel(utils.createModel(renderer, "gowhp:bladesofchaos", "bladesofchaos", "bladesofchaos_lights"));
    bladeofchaosdisplay.anchor.ignoreAnchor(true);
    bladeofchaosdisplay.setScale(0.7);
    bladeofchaosdisplay.setRotation(180.0, 40.0, 0.0);
    bladeofchaosdisplay.setOffset(15.0, 23.0, -20.0);

    leviathanaxedisplay = renderer.createEffect("fiskheroes:model");
    leviathanaxedisplay.setModel(utils.createModel(renderer, "gowhp:leviathanaxe", "leviathanaxe", "leviathanaxe_lights"));
    leviathanaxedisplay.anchor.ignoreAnchor(true);
    leviathanaxedisplay.setScale(0.7);
    leviathanaxedisplay.setRotation(180.0, -20.0, -45.0);
    leviathanaxedisplay.setOffset(-17.5, 9.0, -25.0);

    odinheaddisplay = renderer.createEffect("fiskheroes:model");
    odinheaddisplay.setModel(utils.createModel(renderer, "gowhp:head_display", "odinhead"));
    odinheaddisplay.anchor.ignoreAnchor(true);
    odinheaddisplay.setScale(1.0);
    odinheaddisplay.setRotation(0.0, -20.0, 0.0);
    odinheaddisplay.setOffset(15.0, 1.0, -20.0);

    thorheaddisplay = renderer.createEffect("fiskheroes:model");
    thorheaddisplay.setModel(utils.createModel(renderer, "gowhp:head_display", "thorhead"));
    thorheaddisplay.anchor.ignoreAnchor(true);
    thorheaddisplay.setScale(1.35);
    thorheaddisplay.setRotation(0.0, 20.0, 0.0);
    thorheaddisplay.setOffset(-20.0, -8.0, -25.0);

    utils.bindBeam(renderer, "fiskheroes:charged_beam", "gowhp:invisible", "rightArm", 0x1e68c7, [
        { "firstPerson": [-6.5, -2.5, -9.0], "offset": [-0.5, 8.0, -14.0], "size": [2.0, 2.0] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0));

    utils.bindBeam(renderer, "fiskheroes:charged_beam", "gowhp:lightning", "rightArm", 0x1e68c7, [
        { "firstPerson": [-2.0, 0.5, -6.0], "offset": [-0.5, 11.0, -8.0], "size": [2.0, 2.0] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1));

    utils.bindBeam(renderer, "fiskheroes:charged_beam", "gowhp:wave", "body", 0x1e68c7, [
        { "firstPerson": [0.0, 11.0, 0.0], "offset": [0.5, 11.0, -5.0], "size": [100.0, 1.0] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2)).setParticles(renderer.createResource("PARTICLE_EMITTER", "gowhp:mjolnirslam_impact"));;

    utils.bindBeam(renderer, "fiskheroes:lightning_cast", "gowhp:lightningcast", "rightArm", 0x1e68c7, [
        { "firstPerson": [0.0, 1.0, 0.0], "offset": [-0.5, 8.0, -6.0], "size": [0.75, 0.75] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/mjolnir")));

    var runicchargeshake = renderer.bindProperty("fiskheroes:camera_shake").setCondition(entity => (((entity.getData("gowhp:dyn/mjolnir") && (entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2))) && entity.getData("fiskheroes:beam_charging") && !entity.getData("fiskheroes:beam_shooting")));
    runicchargeshake.factor = 0.05;

    var runicshake = renderer.bindProperty("fiskheroes:camera_shake").setCondition(entity => (((entity.getData("gowhp:dyn/mjolnir") && (entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2))) && entity.getData("fiskheroes:beam_charging") && entity.getInterpolatedData("fiskheroes:beam_shooting_timer") > 0));
    runicshake.factor = 0.1;

    var lightningsurge_color = 0x1e68c7;
    var lightningsurge_beam = renderer.createResource("BEAM_RENDERER", "gowhp:lightningsurge");
    var lightningsurgemjolnir_beam = renderer.createResource("BEAM_RENDERER", "gowhp:lightningsurge_mjolnir");
    var lightning_beam = renderer.createResource("BEAM_RENDERER", "gowhp:lightningstrike");

    lightningsurgearm = utils.createLines(renderer, lightningsurge_beam, lightningsurge_color, [
        {"start": [-1.3, -1.0, -1.1], "end": [-1.7, 6.5, -1.1], "size": [10.0, 10.0]},
        {"start": [-1.7, -1.0, -1.1], "end": [0.3, 6.5, -1.1], "size": [10.0, 10.0]},

        {"start": [-1.3, -1.0, 1.1], "end": [-1.7, 6.5, 1.1], "size": [10.0, 10.0]},
        {"start": [-1.7, -1.0, 1.1], "end": [0.3, 6.5, 1.1], "size": [10.0, 10.0]},

        {"start": [-1.8, -1.0, 1.0], "end": [-1.8, 6.5, -1.0], "size": [10.0, 10.0]},
        {"start": [-1.8, -1.0, -1.0], "end": [-1.8, 6.5, 1.0], "size": [10.0, 10.0]},

        {"start": [0.4, -1.0, 1.0], "end": [0.4, 6.5, -1.0], "size": [10.0, 10.0]},
        {"start": [0.4, -1.0, -1.0], "end": [0.4, 6.5, 1.0], "size": [10.0, 10.0]},
    ]);
    lightningsurgearm.anchor.set("rightArm");
    lightningsurgearm.setScale(1.5);
    lightningsurgearm.mirror = false;

    lightningsurgearms = utils.createLines(renderer, lightningsurge_beam, lightningsurge_color, [
        {"start": [-1.3, -1.0, -1.1], "end": [1.7, 6.5, -1.1], "size": [10.0, 10.0]},
        {"start": [1.7, -1.0, -1.1], "end": [0.3, 6.5, -1.1], "size": [10.0, 10.0]},

        {"start": [-1.3, -1.0, 1.1], "end": [1.7, 6.5, 1.1], "size": [10.0, 10.0]},
        {"start": [1.7, -1.0, 1.1], "end": [0.3, 6.5, 1.1], "size": [10.0, 10.0]},

        {"start": [1.8, -1.0, 1.0], "end": [1.8, 6.5, -1.0], "size": [10.0, 10.0]},
        {"start": [1.8, -1.0, -1.0], "end": [1.8, 6.5, 1.0], "size": [10.0, 10.0]},

        {"start": [-0.4, -1.0, 1.0], "end": [-0.4, 6.5, -1.0], "size": [10.0, 10.0]},
        {"start": [-0.4, -1.0, -1.0], "end": [-0.4, 6.5, 1.0], "size": [10.0, 10.0]},
    ]);
    lightningsurgearms.anchor.set("leftArm");
    lightningsurgearms.setScale(1.5);
    lightningsurgearms.mirror = true;

    lightningsurgelegs = utils.createLines(renderer, lightningsurge_beam, lightningsurge_color, [
        {"start": [-1.0, 0.0, -1.1], "end": [1.2, 7.5, -1.1], "size": [10.0, 10.0]},
        {"start": [1.2, 0.0, -1.1], "end": [-1.0, 7.5, -1.1], "size": [10.0, 10.0]},

        {"start": [-1.0, 0.0, 1.1], "end": [1.2, 7.5, 1.1], "size": [10.0, 10.0]},
        {"start": [1.2, 0.0, 1.1], "end": [-1.0, 7.5, 1.1], "size": [10.0, 10.0]},

        {"start": [-1.2, 0.0, 1.0], "end": [-1.2, 7.5, -1.0], "size": [10.0, 10.0]},
        {"start": [-1.2, 0.0, -1.0], "end": [-1.2, 7.5, 1.0], "size": [10.0, 10.0]},

        {"start": [1.2, 0.0, 1.0], "end": [1.2, 7.5, -1.0], "size": [10.0, 10.0]},
        {"start": [1.2, 0.0, -1.0], "end": [1.2, 7.5, 1.0], "size": [10.0, 10.0]},
    ]);
    lightningsurgelegs.anchor.set("rightLeg");
    lightningsurgelegs.setScale(1.5);
    lightningsurgelegs.mirror = true;

    lightningsurgebody = utils.createLines(renderer, lightningsurge_beam, lightningsurge_color, [
        {"start": [3.5, 0.0, -1.4], "end": [-3.5, 7.5, -1.4], "size": [10.0, 10.0]},
        {"start": [-3.5, 0.0, -1.4], "end": [3.5, 7.5, -1.4], "size": [10.0, 10.0]},

        {"start": [3.5, 0.0, 1.4], "end": [-3.5, 7.5, 1.4], "size": [10.0, 10.0]},
        {"start": [-3.5, 0.0, 1.4], "end": [3.5, 7.5, 1.4], "size": [10.0, 10.0]},
    ]);
    lightningsurgebody.anchor.set("body");
    lightningsurgebody.setScale(1.5);
    lightningsurgebody.mirror = false;

    lightningsurgehead = utils.createLines(renderer, lightningsurge_beam, lightningsurge_color, [
        {"start": [2.5, -0.5, -2.5], "end": [-2.5, -4.5, -2.5], "size": [10.0, 10.0]},
        {"start": [-2.5, -0.5, -2.5], "end": [2.5, -4.5, -2.5], "size": [10.0, 10.0]},

        {"start": [2.5, -0.5, 2.5], "end": [-2.5, -4.5, 2.5], "size": [10.0, 10.0]},
        {"start": [-2.5, -0.5, 2.5], "end": [2.5, -4.5, 2.5], "size": [10.0, 10.0]},

        {"start": [-2.5, -0.5, 2.5], "end": [-2.5, -4.5, -2.5], "size": [10.0, 10.0]},
        {"start": [-2.5, -0.5, -2.5], "end": [-2.5, -4.5, 2.5], "size": [10.0, 10.0]},

        {"start": [2.5, -0.5, 2.5], "end": [2.5, -4.5, -2.5], "size": [10.0, 10.0]},
        {"start": [2.5, -0.5, -2.5], "end": [2.5, -4.5, 2.5], "size": [10.0, 10.0]},

        {"start": [2.5, -5.2, 3.0], "end": [-2.5, -5.2, -3.0], "size": [10.0, 10.0]},
        {"start": [-2.5, -5.2, 3.0], "end": [2.5, -5.2, -3.0], "size": [10.0, 10.0]},
    ]);
    lightningsurgehead.anchor.set("head");
    lightningsurgehead.setScale(1.5);
    lightningsurgehead.mirror = false;

    lightningsurgemjolnir = utils.createLines(renderer, lightningsurgemjolnir_beam, lightningsurge_color, [
        {"start": [-0.4, 3.4, 1.5], "end": [-0.4, 3.4, -3.5], "size": [10.0, 10.0]},

        {"start": [0.2, 1.4, -2.6], "end": [0.2, 5.5, -4.1], "size": [10.0, 10.0]},
        {"start": [0.2, 1.4, -4.1], "end": [0.2, 5.5, -2.6], "size": [10.0, 10.0]},

        {"start": [-1.0, 1.4, -2.6], "end": [-1.0, 5.5, -4.1], "size": [10.0, 10.0]},
        {"start": [-1.0, 1.4, -4.1], "end": [-1.0, 5.5, -2.6], "size": [10.0, 10.0]},

        {"start": [0.4, 1.4, -2.6], "end": [-1.2, 1.4, -4.1], "size": [10.0, 10.0]},
        {"start": [-1.2, 1.4, -2.6], "end": [0.4, 1.4, -4.1], "size": [10.0, 10.0]},

        {"start": [0.4, 5.4, -2.6], "end": [-1.2, 5.4, -4.1], "size": [10.0, 10.0]},
        {"start": [-1.2, 5.4, -2.6], "end": [0.4, 5.4, -4.1], "size": [10.0, 10.0]},

        {"start": [-1.2, 3.4, -4.6], "end": [0.4, 3.4, -4.6], "size": [10.0, 10.0]},
    ]);
    lightningsurgemjolnir.anchor.set("rightArm");
    lightningsurgemjolnir.setScale(2.5);
    lightningsurgemjolnir.mirror = false;

    lightningsurgemjolnirdisplay = utils.createLines(renderer, lightningsurgemjolnir_beam, lightningsurge_color, [
        {"start": [0.4, 3.4, 1.5], "end": [0.4, 3.4, -3.5], "size": [10.0, 10.0]},

        {"start": [-0.2, 1.4, -2.6], "end": [-0.2, 5.5, -4.1], "size": [10.0, 10.0]},
        {"start": [-0.2, 1.4, -4.1], "end": [-0.2, 5.5, -2.6], "size": [10.0, 10.0]},

        {"start": [1.0, 1.4, -2.6], "end": [1.0, 5.5, -4.1], "size": [10.0, 10.0]},
        {"start": [1.0, 1.4, -4.1], "end": [1.0, 5.5, -2.6], "size": [10.0, 10.0]},

        {"start": [-0.4, 1.4, -2.6], "end": [1.2, 1.4, -4.1], "size": [10.0, 10.0]},
        {"start": [1.2, 1.4, -2.6], "end": [-0.4, 1.4, -4.1], "size": [10.0, 10.0]},

        {"start": [-0.4, 5.4, -2.6], "end": [1.2, 5.4, -4.1], "size": [10.0, 10.0]},
        {"start": [1.2, 5.4, -2.6], "end": [-0.4, 5.4, -4.1], "size": [10.0, 10.0]},

        {"start": [1.2, 3.4, -4.6], "end": [-0.4, 3.4, -4.6], "size": [10.0, 10.0]},
    ]);
    lightningsurgemjolnirdisplay.anchor.set("leftArm");
    lightningsurgemjolnirdisplay.setScale(2.5);
    lightningsurgemjolnirdisplay.mirror = false;

    lightningstrike = utils.createLines(renderer, lightning_beam, lightningsurge_color, [
        {"start": [-10.0, -100.0, 4.0], "end": [-10.0, 0.0, 4.0], "size": [10.0, 10.0]},
    ]);
    lightningstrike.anchor.set("body");
    lightningstrike.setScale(1.5);
    lightningstrike.mirror = false;

    lightningstorm = utils.createLines(renderer, lightning_beam, lightningsurge_color, [
        {"start": [-60.0, -200.0, 0.0], "end": [-10.0, 40.0, 0.0], "size": [10.0, 10.0]},
    ]);
    lightningstorm.anchor.ignoreAnchor(true);
    lightningstorm.setScale(1.5);
    lightningstorm.mirror = true;

    utils.bindTrail(renderer, "gowhp:thor").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("fiskheroes:flying")));
    utils.bindTrail(renderer, "gowhp:thor_lightning").setCondition(entity => (entity.getData("gowhp:dyn/mjolnir") && entity.getData("fiskheroes:flying")));
    utils.bindTrail(renderer, "gowhp:thor_lightning_surge").setCondition(entity => (((entity.getData("gowhp:dyn/mjolnir") && (entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2))) && entity.getData("fiskheroes:beam_charge") > 0.0));

    gungniropen = renderer.createEffect("fiskheroes:model");
    gungniropen.setModel(utils.createModel(renderer, "gowhp:gungnir_open", "gungnir_open"));
    gungniropen.anchor.set("rightArm");
    gungniropen.setScale(0.7);
    gungniropen.setRotation(90.0, 90.0, 0.0);
    gungniropen.setOffset(1.0, 9.0, -7.0);

    gungniropenfp = renderer.createEffect("fiskheroes:model");
    gungniropenfp.setModel(utils.createModel(renderer, "gowhp:gungnir_open", "gungnir_open"));
    gungniropenfp.anchor.set("rightArm");
    gungniropenfp.setScale(0.7);
    gungniropenfp.setRotation(90.0, 90.0, 0.0);
    gungniropenfp.setOffset(1.0, 9.0, 0.0);

    var book_of_eldr_open = renderer.createResource("MODEL", "gowhp:book_of_eldr");
    book_of_eldr_open.texture.set("book_of_eldr");
    book_of_eldr_open.bindAnimation("gowhp:book_of_eldr").setData((entity, data) => {
		data.load((entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1 && entity.getInterpolatedData("fiskheroes:beam_charge")));
	});
    book_of_eldr = renderer.createEffect("fiskheroes:model").setModel(book_of_eldr_open);
    book_of_eldr.anchor.set("rightArm");

    utils.bindBeam(renderer, "fiskheroes:charged_beam", "gowhp:leiptra", "body", 0x651adf, [
        { "firstPerson": [8.0, -4.0, -9.0], "offset": [0.0, 9.0, -25.0], "size": [2.0, 2.0] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0)).setParticles(renderer.createResource("PARTICLE_EMITTER", "gowhp:leiptra_smoke"));;

    utils.bindBeam(renderer, "fiskheroes:charged_beam", "gowhp:eldr", "rightArm", 0xe25822, [
        { "firstPerson": [-3.75, 1.0, -6.0], "offset": [-0.5, 14.0, 0.0], "size": [1.5, 1.5] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1)).setParticles(renderer.createResource("PARTICLE_EMITTER", "gowhp:eldr_impact"));;

    utils.bindParticles(renderer, "gowhp:eldr").setCondition(entity => entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1 &&  entity.getData("fiskheroes:beam_charging"));

    utils.bindBeam(renderer, "fiskheroes:charged_beam", "gowhp:glettingsbara", "body", 0x651adf, [
        { "firstPerson": [0.0, 0.0, 0.0], "offset": [0.0, 0.0, 0.0], "size": [50.0, 50.0] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2)).setParticles(renderer.createResource("PARTICLE_EMITTER", "gowhp:glettingsbara_impact"));;

    utils.bindBeam(renderer, "fiskheroes:lightning_cast", "gowhp:leiptra", "rightArm", 0x651adf, [
        { "firstPerson": [8.0, -4.0, -9.0], "offset": [-0.5, 5.0, 0.0], "size": [0.75, 0.75] }
    ]).setCondition(entity => (entity.getData("gowhp:dyn/gungnir")));

    var runicchargeshake = renderer.bindProperty("fiskheroes:camera_shake").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging") && !entity.getData("fiskheroes:beam_shooting")));
    runicchargeshake.factor = 0.05;

    var runicshake = renderer.bindProperty("fiskheroes:camera_shake").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charging") && entity.getInterpolatedData("fiskheroes:beam_shooting_timer") > 0));
    runicshake.factor = 0.1;

    var magic = renderer.bindProperty("fiskheroes:spellcasting");
    magic.colorGeneric.set(0x651adf);
    magic.colorEarthCrack.set(0x651adf);
    magic.colorAtmosphere.set(0x651adf);
    magic.colorWhip.set(0x651adf);

    aura = bifrost_aura.init(renderer, 0x651adf);
    aura_fly = bifrost_aura_fly.init(renderer, 0x651adf);

    var bifrost_color = 0x651adf;
    var bifrost_effect = renderer.createResource("BEAM_RENDERER", "gowhp:bifrost");

    leiptrabeams = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [0.0, -32.0, 0.0], "end": [0.0, -40.0, -5.0], "size": [30.0, 10.0]},
        {"start": [0.0, -40.0, -5.0], "end": [0.0, -40.0, -15.0], "size": [30.0, 10.0]},
        {"start": [0.0, -40.0, -15.0], "end": [0.0, 10.0, -25.0], "size": [30.0, 10.0]},

        {"start": [-5.0, 10.0, 0.0], "end": [-15.0, 10.0, -5.0], "size": [10.0, 30.0]},
        {"start": [-15.0, 10.0, -5.0], "end": [-15.0, 10.0, -15.0], "size": [10.0, 30.0]},
        {"start": [-15.0, 10.0, -15.0], "end": [-1.0, 10.0, -25.0], "size": [10.0, 30.0]},

        {"start": [5.0, 10.0, 0.0], "end": [15.0, 10.0, -5.0], "size": [10.0, 30.0]},
        {"start": [15.0, 10.0, -5.0], "end": [15.0, 10.0, -15.0], "size": [10.0, 30.0]},
        {"start": [15.0, 10.0, -15.0], "end": [1.0, 10.0, -25.0], "size": [10.0, 30.0]},
    ]);
    leiptrabeams.anchor.set("body");
    leiptrabeams.setScale(1.0);
    leiptrabeams.mirror = false;

    gungnirbifrost = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 9.0, 33.0], "end": [-1.0, 9.0, -30.0], "size": [15.0, 15.0]},

        {"start": [-1.0, 9.0, -27.5], "end": [-1.0, 9.0, -34.0], "size": [25.0, 25.0]},

        {"start": [-1.0, 9.0, -30.0], "end": [-1.0, 7.5, -31.2], "size": [25.0, 15.0]},
        {"start": [-1.0, 9.0, -30.0], "end": [-1.0, 10.5, -31.2], "size": [25.0, 15.0]},

        {"start": [-1.0, 7.5, -33.0], "end": [-1.0, 10.5, -33.0], "size": [25.0, 15.0]},

        {"start": [-1.0, 10.5, -33.5], "end": [-1.0, 11.5, -32.0], "size": [22.0, 15.0]},
        {"start": [-1.0, 7.5, -33.5], "end": [-1.0, 6.5, -32.0], "size": [22.0, 15.0]},
    ]);
    gungnirbifrost.anchor.set("rightArm");
    gungnirbifrost.setScale(1.0);
    gungnirbifrost.mirror = false;

    gungnirbladebifrost = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 8.3, -34.0], "end": [-1.0, 9.0, -46.6], "size": [15.0, 15.0]},
        {"start": [-1.0, 9.7, -34.0], "end": [-1.0, 9.0, -46.6], "size": [15.0, 15.0]},
    ]);
    gungnirbladebifrost.anchor.set("rightArm");
    gungnirbladebifrost.setScale(1.0);
    gungnirbladebifrost.mirror = false;

    gungnirequip = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 9.0, 33.0], "end": [-1.0, 9.0, -90.0], "size": [15.0, 15.0]},

        {"start": [-1.0, 9.0, -27.5], "end": [-1.0, 9.0, -34.0], "size": [25.0, 25.0]},

        {"start": [-1.0, 9.0, -30.0], "end": [-1.0, 7.5, -31.2], "size": [25.0, 15.0]},
        {"start": [-1.0, 9.0, -30.0], "end": [-1.0, 10.5, -31.2], "size": [25.0, 15.0]},

        {"start": [-1.0, 7.5, -33.0], "end": [-1.0, 10.5, -33.0], "size": [25.0, 15.0]},

        {"start": [-1.0, 10.5, -33.5], "end": [-1.0, 11.5, -32.0], "size": [22.0, 15.0]},
        {"start": [-1.0, 7.5, -33.5], "end": [-1.0, 6.5, -32.0], "size": [22.0, 15.0]},
    ]);
    gungnirequip.anchor.set("rightArm");
    gungnirequip.setScale(1.0);
    gungnirequip.mirror = false;

    gungnirbladeequip = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 8.3, -34.0], "end": [-1.0, 9.0, -60.0], "size": [15.0, 15.0]},
        {"start": [-1.0, 9.7, -34.0], "end": [-1.0, 9.0, -60.0], "size": [15.0, 15.0]},
    ]);
    gungnirbladeequip.anchor.set("rightArm");
    gungnirbladeequip.setScale(1.0);
    gungnirbladeequip.mirror = false;

    gungnirbifrostfp = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 9.0, 33.0], "end": [-1.0, 9.0, -23.0], "size": [15.0, 15.0]},

        {"start": [-1.0, 9.0, -20.5], "end": [-1.0, 9.0, -27.0], "size": [25.0, 25.0]},

        {"start": [-1.0, 9.0, -23.0], "end": [-1.0, 7.5, -24.2], "size": [25.0, 15.0]},
        {"start": [-1.0, 9.0, -23.0], "end": [-1.0, 10.5, -24.2], "size": [25.0, 15.0]},

        {"start": [-1.0, 7.5, -26.0], "end": [-1.0, 10.5, -26.0], "size": [25.0, 15.0]},

        {"start": [-1.0, 10.5, -26.5], "end": [-1.0, 11.5, -25.0], "size": [22.0, 15.0]},
        {"start": [-1.0, 7.5, -26.5], "end": [-1.0, 6.5, -25.0], "size": [22.0, 15.0]},
    ]);
    gungnirbifrostfp.anchor.set("rightArm");
    gungnirbifrostfp.setScale(1.0);
    gungnirbifrostfp.mirror = false;

    gungnirbladebifrostfp = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 8.3, -27.0], "end": [-1.0, 9.0, -39.6], "size": [15.0, 15.0]},
        {"start": [-1.0, 9.7, -27.0], "end": [-1.0, 9.0, -39.6], "size": [15.0, 15.0]},
    ]);
    gungnirbladebifrostfp.anchor.set("rightArm");
    gungnirbladebifrostfp.setScale(1.0);
    gungnirbladebifrostfp.mirror = false;

    gungnirequipfp = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 9.0, 33.0], "end": [-1.0, 9.0, -93.0], "size": [15.0, 15.0]},

        {"start": [-1.0, 9.0, -20.5], "end": [-1.0, 9.0, -27.0], "size": [25.0, 25.0]},

        {"start": [-1.0, 9.0, -23.0], "end": [-1.0, 7.5, -24.2], "size": [25.0, 15.0]},
        {"start": [-1.0, 9.0, -23.0], "end": [-1.0, 10.5, -24.2], "size": [25.0, 15.0]},

        {"start": [-1.0, 7.5, -26.0], "end": [-1.0, 10.5, -26.0], "size": [25.0, 15.0]},

        {"start": [-1.0, 10.5, -26.5], "end": [-1.0, 11.5, -25.0], "size": [22.0, 15.0]},
        {"start": [-1.0, 7.5, -26.5], "end": [-1.0, 6.5, -25.0], "size": [22.0, 15.0]},
    ]);
    gungnirequipfp.anchor.set("rightArm");
    gungnirequipfp.setScale(1.0);
    gungnirequipfp.mirror = false;

    gungnirbladeequipfp = utils.createLines(renderer, bifrost_effect, bifrost_color, [
        {"start": [-1.0, 8.3, -27.0], "end": [-1.0, 9.0, -53.0], "size": [15.0, 15.0]},
        {"start": [-1.0, 9.7, -27.0], "end": [-1.0, 9.0, -53.0], "size": [15.0, 15.0]},
    ]);
    gungnirbladeequipfp.anchor.set("rightArm");
    gungnirbladeequipfp.setScale(1.0);
    gungnirbladeequipfp.mirror = false;

    var leiptraorb = renderer.bindProperty("fiskheroes:forcefield");
    leiptraorb.color.set(0x651adf);
    leiptraorb.setShape(36, 18).setOffset(0.0, 7.0, 0.0).setScale(0.9, 1.15, 0.9);
    leiptraorb.setCondition(entity => {
        leiptraorb.opacity = (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0) && (entity.getInterpolatedData('fiskheroes:beam_charge') * 0.1);
        return true;
    });

    var eldrorb = renderer.bindProperty("fiskheroes:forcefield");
    eldrorb.color.set(0xe25822);
    eldrorb.setShape(60, 30).setOffset(0.0, 6.0, 0.0).setScale(1.3);
    eldrorb.setCondition(entity => {
        eldrorb.opacity = (entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1) && (entity.getInterpolatedData('fiskheroes:beam_charge') * 0.2);
        return true;;
    });

    utils.bindParticles(renderer, "gowhp:bifrost_effect").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charging") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0  || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2)) || (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:flying")));

    utils.bindParticles(renderer, "gowhp:glettingsbara").setCondition(entity => entity.getData("gowhp:dyn/gungnir") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2 &&  entity.getData("fiskheroes:beam_shooting_timer") > 0);

    utils.bindTrail(renderer, "gowhp:bifrost").setCondition(entity => (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charging") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0));

}

function render(entity, renderLayer, isFirstPersonArm) {
    parent.render(entity, renderLayer, isFirstPersonArm);
    if (renderLayer == "HELMET") {
        beard.render();
    }
    if ((entity.getInterpolatedData("gowhp:dyn/mjolnir_timer") > 0.5) && (entity.getHeldItem().isEmpty()) && !((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))) {
        mjolnir.render();
    }
    if ((renderLayer == "CHESTPLATE" && entity.getInterpolatedData("gowhp:dyn/mjolnir_timer") < 0.5) && !((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))) {
        mjolnirholster.render();
    }
    if (((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))) {
        mjolnirdisplay.render();
    }
    if (entity.getData("gowhp:dyn/mjolnir") && ((entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 || entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2) && !entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0 && !entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 0 && entity.getData("fiskheroes:beam_charge"))){
        lightningsurgearm.progress = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningsurgearm.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningsurgearm.render();
    }
    if (entity.getData("gowhp:dyn/mjolnir") && (entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 ||  entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2) && entity.getData("fiskheroes:beam_charge")){
        lightningsurgemjolnir.progress = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningsurgemjolnir.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningsurgemjolnir.render();
    }
    if (((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))){
        lightningsurgemjolnirdisplay.progress = true;
        lightningsurgemjolnirdisplay.opacity = true;
        lightningsurgemjolnirdisplay.render();
    }
    if ((entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 1 && entity.getData("fiskheroes:beam_charging") && !entity.getData("fiskheroes:beam_shooting")) && !entity.getData("fiskheroes:flying")){
        lightningstrike.progress = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningstrike.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningstrike.render();
    }
    if ((entity.getData("gowhp:dyn/mjolnir") && entity.getData("gowhp:dyn/mjolnir_runic_cycle") == 2 && entity.getData("fiskheroes:beam_charging")) && !entity.getData("fiskheroes:flying")){
        lightningstorm.progress = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningstorm.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        lightningstorm.render();
    }
    if (!isFirstPersonArm && (entity.getInterpolatedData("gowhp:dyn/gungnir_timer") > 0.5) && (entity.getHeldItem().isEmpty()) || ((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))) {
        gungniropen.render();
    }
    if (isFirstPersonArm && (entity.getInterpolatedData("gowhp:dyn/gungnir_timer") > 0.5) && (entity.getHeldItem().isEmpty())) {
        gungniropenfp.render();
    }
    if (!isFirstPersonArm && (entity.getInterpolatedData('gowhp:dyn/gungnir_timer') > 0 && entity.getInterpolatedData('gowhp:dyn/gungnir_timer') < 0.5)){
        gungnirequip.progress = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirequip.opacity = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirequip.render();
        gungnirbladeequip.progress = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirbladeequip.opacity = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirbladeequip.render();
    }
    if (isFirstPersonArm && (entity.getInterpolatedData('gowhp:dyn/gungnir_timer') > 0 && entity.getInterpolatedData('gowhp:dyn/gungnir_timer') < 0.5)){
        gungnirequipfp.progress = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirequipfp.opacity = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirequipfp.render();
        gungnirbladeequipfp.progress = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirbladeequipfp.opacity = Math.max(1 - (1 - entity.getInterpolatedData('gowhp:dyn/gungnir_timer')) * 1, 0);
        gungnirbladeequipfp.render();
    }
    if (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charge") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0){
        leiptrabeams.progress = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        leiptrabeams.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        leiptrabeams.render();
    }
    if (!isFirstPersonArm && (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charge") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2))){
        gungnirbifrost.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        gungnirbifrost.render();
    }
    if (isFirstPersonArm && (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charge") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2))){
        gungnirbifrostfp.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        gungnirbifrostfp.render();
    }
    if (!isFirstPersonArm && (entity.getData("gowhp:dyn/gungnir") && (entity.getData("fiskheroes:beam_charge") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0  || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2)))){
        gungnirbladebifrost.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        gungnirbladebifrost.render();
    }
    if (isFirstPersonArm && (entity.getData("gowhp:dyn/gungnir") && (entity.getData("fiskheroes:beam_charge") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0  || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2)))){
        gungnirbladebifrostfp.opacity = Math.max(1 - (1 - entity.getInterpolatedData('fiskheroes:beam_charge')) * 1, 0);
        gungnirbladebifrostfp.render();
    }
    if (!isFirstPersonArm && (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:flying"))){
        gungnirbifrost.progress = true;
        gungnirbifrost.opacity = true;
        gungnirbifrost.render();
        gungnirbladebifrost.progress = true;
        gungnirbladebifrost.opacity = true;
        gungnirbladebifrost.render();
    }
    if (isFirstPersonArm && (entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:flying"))){
        gungnirbifrostfp.progress = true;
        gungnirbifrostfp.opacity = true;
        gungnirbifrostfp.render();
        gungnirbladebifrostfp.progress = true;
        gungnirbladebifrostfp.opacity = true;
        gungnirbladebifrostfp.render();
    }
    if (((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW"))){
        gungnirbifrost.progress = true;
        gungnirbifrost.opacity = true;
        gungnirbifrost.render();
        gungnirbladebifrost.progress = true;
        gungnirbladebifrost.opacity = true;
        gungnirbladebifrost.render();
    }
    if ((entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charge") && (entity.getData("gowhp:dyn/gungnir_runic_cycle") == 0 || entity.getData("gowhp:dyn/gungnir_runic_cycle") == 2)) || (entity.as("DISPLAY").getDisplayType() == "HOLOGRAM")){
        aura.render(entity, renderLayer);
    }
    if (!entity.getData("gowhp:dyn/mjolnir") && entity.getData("fiskheroes:flying")){
        aura_fly.render(entity, renderLayer);
    }
    if ((entity.getData("gowhp:dyn/gungnir") && entity.getData("fiskheroes:beam_charge") && entity.getData("gowhp:dyn/gungnir_runic_cycle") == 1)){
        book_of_eldr.render();
    }
    if (((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW") && entity.getWornChestplate().suitType() == 'gowhp:kratos_allfather')) {
        odinheaddisplay.render();
        thorheaddisplay.render();
    }
    if (((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW") && entity.getWornChestplate().suitType() == 'gowhp:kratos_allfather')) {
        bladeofchaosdisplay.render();
    }
    if (((entity.as("DISPLAY").getDisplayType() == "HOLOGRAM" || entity.as("DISPLAY").getDisplayType() == "DATABASE_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "FABRICATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "ITERATOR_PREVIEW" || entity.as("DISPLAY").getDisplayType() == "BOOK_PREVIEW") && entity.getWornChestplate().suitType() == 'gowhp:kratos_allfather')) {
        leviathanaxedisplay.render();
    }
}
