PalladiumEvents.registerAnimations((event) => {
    event.register('arrzee/groundsmash1', 1, (builder) => {
        
    if (abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:kryptonian_potato", "ground_smash_anim")) {

        const progress_smash1 = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'arrzenhanced:kryptonian_potato', 'ground_smash_anim', builder.getPartialTicks(), 1, 4);
        if (progress_smash1 > 0 && !builder.isFirstPerson()) {

            builder.get('right_arm')
            .setY(-0.25)
            .setXRotDegrees(-55)
            .setZRotDegrees(0)
            .setYRotDegrees(5)
            .animate('Linear', progress_smash1);

        builder.get('right_leg')
            .setXRotDegrees(15)
            .setZRotDegrees(0)
            .setYRotDegrees(5)
            .animate('Linear', progress_smash1);
    }
    if (progress_smash1 > 0.0 && builder.isFirstPerson()) {
        builder.get('left_arm')
        .setX(0)
        .setY(0)
        .setZ(0)
        .setXRotDegrees(0)
        .setYRotDegrees(0)
        .setZRotDegrees(0)
            .animate('Linear', progress_smash1);

        builder.get('right_arm')
            .setX(0)
            .setY(0)
            .setZ(0)
            .setXRotDegrees(0)
            .setYRotDegrees(0)
            .setZRotDegrees(0)
            .animate('Linear', progress_smash1);
            }


        }
    });
});

PalladiumEvents.registerAnimations((event) => {
    event.register('arrzee/groundsmash2', 1, (builder) => {

        const progress_smash2 = animationUtil.getAnimationTimerAbilityValue(builder.getPlayer(), 'arrzenhanced:kryptonian_potato', 'ground_smash_anim', builder.getPartialTicks(), 4, 7);
        if (progress_smash2 > 0 && !builder.isFirstPerson()) {

          builder.get('head')
          .setY(0)
          .setXRotDegrees(10)
          .setZRotDegrees(0)
          .setYRotDegrees(0)
          .animate('Linear', progress_smash2);

            builder.get('body')
            .setY(-11.25)
            .setXRotDegrees(0)
            .setZRotDegrees(0)
            .setYRotDegrees(0)
            .animate('Linear', progress_smash2);

            builder.get('chest')
            .setY(0)
            .setXRotDegrees(30)
            .setZRotDegrees(0)
            .setYRotDegrees(0)
            .animate('Linear', progress_smash2);

            builder.get('right_arm')
            .setY(2)
            .setXRotDegrees(2.5)
            .setZRotDegrees(0)
            .setYRotDegrees(0)
            .animate('Linear', progress_smash2);

            builder.get('left_arm')
            .setY(2)
            .setZ(2)
            .setXRotDegrees(60)
            .setZRotDegrees(0)
            .setYRotDegrees(25)
            .animate('Linear', progress_smash2);

            builder.get('right_leg')
            .setZ(-3)
            .setY(10)
            .setXRotDegrees(90)
            .setZRotDegrees(0)
            .setYRotDegrees(0)
            .animate('Linear', progress_smash2);

            builder.get('left_leg')
            .setZ(0)
            .setY(2)
            .setXRotDegrees(0)
            .setZRotDegrees(0)
            .setYRotDegrees(0)
            .animate('Linear', progress_smash2);


         }
         if (progress_smash2 > 0.0 && builder.isFirstPerson()) {
             builder.get('left_arm')
             .setX(0)
             .setY(0)
             .setZ(0)
             .setXRotDegrees(0)
             .setYRotDegrees(0)
             .setZRotDegrees(0)
                 .animate('Linear', progress_smash2);
     
             builder.get('right_arm')
                 .setX(0)
                 .setY(0)
                 .setZ(0)
                 .setXRotDegrees(0)
                 .setYRotDegrees(0)
                 .setZRotDegrees(0)
                 .animate('Linear', progress_smash2);
                 }

                });
              });