mojira.dev
MC-130558

Item frames cannot be emptied if gamerule doEntityDrops is set to false

The bug

If the gamerule doEntityDrops is set to false, it is impossible to empty item frames.

To reproduce

  1. Run /gamerule doEntityDrops false

  2. Place an item frame

  3. Place an item inside of the frame

  4. Try to punch the item frame in order to take the item out
    β†’ ❌ Notice that it plays the "pop" noise, but does not drop the item.

Code analysis

In 1.12.2, items were removed from item frames by the method EntityItemFrame.attackFromEntity(damageSource, amount). In 1.13, this is now done in the method EntityItemFrame.dropItemOrSelf(entity, self). Since the latter method only runs if doEntityDrops is true, the code that removes the item cannot be reached.

Do note this change was likely made while fixing MC-124833.

Linked issues

MC-131611 Item in an item frame wont pop off Resolved MC-132759 The frames with item are unbreakable Resolved MC-133778 sometimes unable to get things in item frames Resolved MC-135580 Items in Item Frames wont pop out when i click on it in 1.13 Resolved MC-136072 Item frames with item become pernament Resolved

Comments 15

Still an issue in 18w31a.

1.13.1-pre1 too  😞

This is likely because you have gamerule doEntityDrops set to false

That's part of the title of the bug report, no need to reiterate that point.

5 more comments

Confirmed for 20w19a.

Confirmed for 1.16 pre-5.

Affects 1.16-rc1, also a subtitle "Item Frame empties" is showed

Confirmed for 1.16.2 pre-1.

"Item Frame empties" subtitle still showing.

Jayceebee

Ulraf

Confirmed

Entities

doEntityDrops, item_frame

Minecraft 18w22c, Minecraft 1.13-pre2, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13, ..., 20w17a, 20w19a, 20w21a, 1.16.1, 1.16.2 Pre-release 1

1.16.2 Pre-release 2

Retrieved