Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.20.1] /give command drops extra item #1854

Open
andriihorpenko opened this issue Nov 28, 2024 · 1 comment
Open

[1.20.1] /give command drops extra item #1854

andriihorpenko opened this issue Nov 28, 2024 · 1 comment
Labels

Comments

@andriihorpenko
Copy link

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:

  1. Call /give command first adds an item to player's inventory.
  2. If it was successfully added, Forge fires ItemTossEvent event, which in turn creates and spawns ItemEntity in the world.
  3. After the ItemEntity is spawned, the /give command calls ItemEntity#makeFakeItem, which forces ItemEntity to be unpickable and be immediately discarded.
  4. Now as every DE tool, chestpiece and other items have onEntityItemUpdate overridden, they call ItemEntity#setExtendedLifetime. This line makes prior fake item never disappear from the world. And, as previously mentioned, it cannot be picked up.
@FoxMcloud5655
Copy link
Collaborator

That's... Interesting. I'll have to test this to see it myself!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants