The bug
When a pillager tries to aim at the player, sometimes the arm moves into its head.
Linked issues
is duplicated by 4
Attachments
Comments 18
Can confirm on 1.21 for players in boats, piglins with crossbows in boats, and pillagers generally.
Other mobs seem unaffected when forcefully given a loaded crossbow.
Digging around in 1.19.2 with official mappings (yes, I know, it's stale but I don't expect much will have changed),
IllagerModel, HumanoidModel and PiglinModel, all models capable of rendering a loaded crossbow for illagers and common bipeds (excluding villagers), delegate to AnimationUtil.animateCrossbowHold, which does all the rotation calculation on the arms and head. It might be viable to use Mth.clamp to as a means to limit the rotation, if messing with the math to limit it otherwise isn't feasible.
Updated title to have piglins.