mojira.dev
MC-139528

Pillagers/piglins arm move into their heads

The bug

When a pillager tries to aim at the player, sometimes the arm moves into its head.

Linked issues

Attachments

Comments 18

Updated title to have piglins.

Confirmed for 20w10a

8 more comments

Can confirm in 1.18.

Can confirm in 1.18.1.

Can confirm in 1.18.2 and 22w13a.

[media]

Can confirm in 1.19.2.

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.

Anonymous_46YT

(Unassigned)

Confirmed

Gameplay

Low

Mob behaviour, Rendering

Minecraft 18w46a, Minecraft 18w47a, Minecraft 18w47b, Minecraft 18w48a, Minecraft 18w48b, ..., 1.19.2, 1.20.1, 1.20.4, 24w18a, 1.21

Retrieved