mojira.dev
MC-272887

Shulkers with NoAI don't have their innate armor attribute modifier when closed

Shulkers have an attribute modifier that increases their minecraft:generic.armor attribute by 20 when they are closed, but not if they have NoAI set to true.

How to reproduce:

  1. Summon a shulker.

  2. While the shulker is closed, execute the following command:

    /attribute @n[type=minecraft:shulker] minecraft:armor modifier value get minecraft:covered
    /attribute @n[type=minecraft:shulker] minecraft:armor modifier value get minecraft:covered

    → ✔ The shulker has 20 armor points (unless you did it before the shulker opened for the first time, which is tracked at MC-272922).

  3. Summon a shulker with no AI with the following command:

    /summon minecraft:shulker ~ ~ ~ {NoAI:1b}
    /summon minecraft:shulker ~ ~ ~ {NoAI:1b}
  4. Run the command from step 2 again (make sure to be closer to the new shulker).
    → ❌ The attribute modifier doesn't exist.

Expected result:

The closed shulker with no AI would have 20 armor points.

Observed result:

The closed shulker with no AI has no armor points.

Linked issues

Comments 2

This can also be noticed when killing a shulker with NoAI vs killing a normal one (only dealing hits when it is closed). The one with NoAI takes only 2 critical hits from a Sharpness V Netherite sword to kill, while the normal closed one takes 4.

This also happens on the first few ticks after a normal shulker is spawned, doesn't need to have NoAI. Their armor is granted correctly after opening and closing again.

You can see this by just spawning one shulker, doing /tick freeze before it opens and hitting it with the sword a few times.

[Mod] ManosSef

(Unassigned)

Confirmed

Platform

Low

Commands

1.20.6, 1.21 Pre-Release 2, 1.21, 24w39a, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.9, 1.21.11

Retrieved