[1.20.1] `/give` command drops extra item
andriihorpenko opened this issue ยท 1 comments
Base information
- Minecraft version: 1.20.1
- Mod version: 3.1.2.588
- Minecraft Forge version: 47.3.10
- Mod Pack: (if applicable)
Description / steps to reproduce
So this bug is quite amusing. This is a combination of shenanigans done by Forge/Mojang, and Draconic Evolution.
Whenever you /give yourself a tool, chestpiece, capacitor or dislocator - an extra item will drop on the ground and will be unpickable. I've done quite some investigation on what's happening, so here's a walkthrough:
- Call
/givecommand first adds an item to player's inventory. - If it was successfully added, Forge fires
ItemTossEventevent, which in turn creates and spawnsItemEntityin the world. - After the
ItemEntityis spawned, the/givecommand callsItemEntity#makeFakeItem, which forcesItemEntityto be unpickable and be immediately discarded. - Now as every DE tool, chestpiece and other items have
onEntityItemUpdateoverridden, they callItemEntity#setExtendedLifetime. This line makes prior fake item never disappear from the world. And, as previously mentioned, it cannot be picked up.