PalladiumEvents.registerAnimations((event) => {
    event.register('speed_fists_anim_1', 15, (builder) => {
        if (abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:speedforce", "anim_1")) {
            if (!builder.isFirstPerson()) {
                const halfPi = 1.57079632679;
                builder.get('left_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
                    .translateZ(-4)
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
            }
            if (builder.isFirstPerson()) {
                builder.get('right_arm')
                    .setXRotDegrees(-10.5)
                    .setYRotDegrees(-32.5)
                    .setZRotDegrees(-40)
                    .setX(-4)
                    .setY(0)
                    .setZ(6)
                builder.get('left_arm')
                    .setXRotDegrees(-10.5)
                    .setYRotDegrees(32.5)
                    .setZRotDegrees(40)
                    .setX(5)
                    .setY(0)
                    .setZ(2)
            }
        }
    });
    event.register('speed_fists_anim_2', 15, (builder) => {
        if (abilityUtil.isEnabled(builder.getPlayer(), "arrzenhanced:speedforce", "anim_2")) {
            if (!builder.isFirstPerson()) {
                const halfPi = 1.57079632679;
                builder.get('right_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
                    .translateZ(-4)
                builder.get('left_arm')
                    .setXRot(builder.getModel().head.xRot - halfPi)
                    .setYRot(builder.getModel().head.yRot)
                    .setZRot(builder.getModel().head.zRot)
            }
            if (builder.isFirstPerson()) {
                builder.get('right_arm')
                    .setXRotDegrees(-10.5)
                    .setYRotDegrees(-32.5)
                    .setZRotDegrees(-40)
                    .setX(-4)
                    .setY(0)
                    .setZ(2)
                builder.get('left_arm')
                    .setXRotDegrees(-10.5)
                    .setYRotDegrees(32.5)
                    .setZRotDegrees(40)
                    .setX(5)
                    .setY(0)
                    .setZ(6)
            }
        }
    });
});