PalladiumEvents.registerAnimations((event) => {
    event.register('wall_run_anim_1', 15, (builder) => {
        let progress = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'arrzenhanced:speedforce', 'wall_total_anim', builder.getPartialTicks());
        if (progress > 0 && !builder.isFirstPerson() && abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:speedforce", "wall_run")) {
            builder.get('chest')
            .rotateXDegrees(15.5)
            .moveZ(-3.5)

            builder.get('head')
            .moveZ(-3.5)

            builder.get('left_arm')
            .rotateXDegrees(-40.5)
            .moveZ(-3.5)

            builder.get('right_arm')
            .rotateXDegrees(-40.5)
            .moveZ(-3.5)

            builder.get('body')
            .setX(0)
            .setY(5)
            .setZ(-5)
            .setXRotDegrees(270)
            .setYRotDegrees(180)
            .setZRotDegrees(180)

            builder.get('head')
            .setXRotDegrees(0)
        }

        if (abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:speedforce", "wall_step_1")) {
            if (!builder.isFirstPerson()) {
                builder.get('right_arm')
                    .setXRotDegrees(-25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('left_arm')
                    .setXRotDegrees(25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('right_leg')
                    .setXRotDegrees(25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('left_leg')
                    .setXRotDegrees(-25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
            }
        }
        if (abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:speedforce", "wall_step_2")) {
            if (!builder.isFirstPerson()) {
                builder.get('right_arm')
                    .setXRotDegrees(0)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('left_arm')
                    .setXRotDegrees(0)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('right_leg')
                    .setXRotDegrees(0)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('left_leg')
                    .setXRotDegrees(0)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
            }
        }
        if (abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:speedforce", "wall_step_3")) {
            if (!builder.isFirstPerson()) {
                builder.get('right_arm')
                    .setXRotDegrees(25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('left_arm')
                    .setXRotDegrees(-25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('right_leg')
                    .setXRotDegrees(-25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
                
                builder.get('left_leg')
                    .setXRotDegrees(25)
                    .setYRotDegrees(0)
                    .setZRotDegrees(0);
            }
        }
    });
});