How to trigger this bug:
Set game rule doEntityDrops to false
Place an item frame and place an item in the frame
Click the frame using the "Attack/Destroy" button
Then you will find that the item is still in the frame
I found that this bug has existed for a long time, and the first version the bug appeared was 18w22c.
Because item cannot be emptied, the frame cannot be destroyed either, the only way to destroy the frame is to break the block the frame hanging
Code Analytics(Based on 1.16.1 and Mojang "official" mappings, decompiled by Fernflower)
In class net.minecraft.world.entity.decoration.ItemFrame:
Method: private void dropItem(net.minecraft.world.entity.Entity entity, boolean b)
Code fragment:
if (!level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
if (entity == null) {
removeFramedMap(getItem());
}
}
May change to:
if (!level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
setItem(ItemStack.EMPTY);
if (entity == null) {
removeFramedMap(getItem());
}
}
Linked issues
duplicates 1
Attachments
Comments 2
Thank you for your report!
However, this issue is a Duplicate of MC-130558.
It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.
Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki
Duplicate of MC-130558