Changing NBT of dropped items

Started by BrownBear85 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Changing NBT of dropped items

I'm making an enchantment that makes dropped items not despawn and makes them invulnerable. I can't change NBT tags of the items, however. Is there a different block I should use?

Code: https://imgur.com/a/TYHWOM3

Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do something like this:…
Wed, 10/13/2021 - 07:13

Do something like this:

Execute command / "data merge entity @s {Invulnerable:1b,Age:-32000}" in the name of event/target entity

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey! When it is possible to…
Fri, 01/12/2024 - 20:15

Hey! When it is possible to manage dropped items, can you please help me with changing itemstack's NBT while it's dropped and i don't have the Entity given, only the Itemstack value.