mojira.dev
MC-199584

Fixed item frames can be killed by projectiles

Item Frames with the Fixed tag can be destroyed by hitting them with a projectile. 

 

Recreation:

1) Get an item frame and snowball from the creative menu

2) Place the item frame down on a block

3) Set the item frame to be Fixed:

/data merge entity @e[type=item_frame,limit=1,sort=nearest] {Fixed:1b}

4) Throw a snowball at the item frame

 

Expected Behavior:

The item frame should not be destroyed because Fixed item frames should not be destroyed under any circumstance.

 

Additional Notes:

 

If the item frame has an item in it, the item will pop off.

Setting the item frame to Invulnerable:1b also does not prevent it from being destroyed by a projectile.

Linked issues

Comments 8

anthony cicinelli

I can confirm for 1.16.3

Tested this, can confirm as a bug for latest version.

I can confirm for 20w46a.

Can confirm in 20w51a.

Can confirm in 21w03a.

Can confirm in 1.17.1.

The title and description are quiet unclear, maybe it's under creative mode as MC-174126 was resolved as WAI.

also the code analysis by mojang mapping (1.20.2:

net.minecraft.world.entity.decoration.ItemFrame.class

public boolean hurt(DamageSource $$0, float $$1) {
    if (this.fixed) {
        if ($$0.is(DamageTypeTags.BYPASSES_INVULNERABILITY) || $$0.isCreativePlayer())
            return super.hurt($$0, $$1);
        return false;
    }
    ...
}

and found that even without projectiles, players can still break them xD

BluePsychoRanger

(Unassigned)

Community Consensus

Projectiles

item_frame, projectiles

1.16.2, 1.16.3, 1.16.4, 20w46a, 20w51a, 21w03a, 1.17.1, 1.20.2, 1.20.4

Retrieved