-
Bug
-
Resolution: Duplicate
-
None
-
1.16.1, 1.16.2 Pre-release 1
-
None
-
Java 1.8.0_202, Windows 10, CPU: i7-8700K, GPU: Geforce GTX 1660, RAM: 16GB
-
Unconfirmed
-
(Unassigned)
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()); } }
- duplicates
-
MC-130558 Item frames cannot be emptied if gamerule doEntityDrops is set to false
- Resolved