extend("ahhp:hero_with_models");

var utils = implement("fiskheroes:external/utils");
var models_stuff = implement("ahhp:external/model_stuff");

loadTextures({
    "model_lights": "ahhp:black_adam_model_lights",
    "model": "ahhp:black_adam_model"
});

function init(renderer) {
    parent.init(renderer);
    renderer.fixHatLayer("CHESTPLATE");
    renderer.showModel("CHESTPLATE", "body", "rightArm", "leftArm");
    renderer.showModel("LEGGINGS", "rightLeg", "leftLeg");
    initEffects(renderer);
}
function initAnimations(renderer) {
    parent.initAnimations(renderer);
    utils.addFlightAnimation(renderer, "blackadam.FLIGHT", "fiskheroes:flight/default_arms_forward.anim.json");
    utils.addHoverAnimation(renderer, "blackadam.HOVER", "fiskheroes:flight/idle/neutral");
}
function initEffects(renderer) {
    models = models_stuff.noHelmetModels(renderer, "black_adam");
    models_stuff.bindSpeedingTrail(renderer, "ahhp:black_adam");
    utils.bindBeam(renderer, "fiskheroes:lightning_cast", "fiskheroes:lightning_cast", "rightArm", 0xA18405, [
        { "firstPerson": [-8.0, 4.5, -10.0], "offset": [-0.5, 9.0, 0.0], "size": [0.75, 0.75] }
    ]);

}

function render(entity, renderLayer, isFirstPersonArm) {
    models.render(entity, renderLayer);
}
