Not totally sure. Might be worth taking a look at the illager code? It's easy enough to make a mob hold a crossbow and shoot arrows, but I assume you also want it to have the charge behavior.
Well, to make the mob shoot arrows, you'll want to enable a ranged attack in its AI, and set the projectile to arrows. (You could also make a procedure that causes it to fire arrows at set intervals.)
One method might be to use the Geckolib plugin to add a custom attack animation. You could have your entity perform said animation when firing to make it look like they're wielding a crossbow.
Not totally sure. Might be worth taking a look at the illager code? It's easy enough to make a mob hold a crossbow and shoot arrows, but I assume you also want it to have the charge behavior.
I tried, but nothing has changed, there is a chance that I just did something wrong.
Well, to make the mob shoot arrows, you'll want to enable a ranged attack in its AI, and set the projectile to arrows. (You could also make a procedure that causes it to fire arrows at set intervals.)
One method might be to use the Geckolib plugin to add a custom attack animation. You could have your entity perform said animation when firing to make it look like they're wielding a crossbow.