Zoglins, hoglins, and ravagers all do a little knockback when they hit a player holding a shield. However, iron golems don't give players knockback when they hold a shield even when they can fling players without a shield. Zoglins and Hoglins can fling players just like iron golems except that they can knock players upwards even when holding a shield. Iron golems should also have the same behavior as zoglins, hoglins, and ravagers.
Linked issues
Attachments
Comments 8
yes, because they don't have the attack knockback attribute which was added way after golems were introduced, unlike the other mobs you mentioned.
Seems like i was wrong here, that attribute doesn't work on iron golems, and doesn't work on shields either as per MC-235198.
Can confirm 1.21.11 Pre-Release 1
Steps to reproduce the issue:
Spawn a Hoglin and an Iron Golem in a flat area.
Equip a shield.
Switch to Survival mode.
Let the Hoglin attack you while blocking with the shield — you will receive knockback.
Repeat the same test with the Iron Golem — no knockback occurs while blocking.
Expected result:
Iron Golems should behave consistently with Hoglins, Zoglins, and Ravagers by providing knockback to shield-blocking players.
Actual result:
While Hoglins (and other mobs) apply knockback even when the player is shielding, Iron Golems do not, despite being able to fling players normally without a shield.
Can confirm