Help! How to convert entity data into an item!

Started by CloudCreates on

Topic category: Help with modding (Java Edition)

Last seen on 15:10, 28. Jan 2023
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help! How to convert entity data into an item!

So I'm working on a Java 1.19.2 mod where the player can make an item that then when right clicked on certian spirit mobs such as Allays, will despawn the mob and give the player a new item containing that mob, then the player can right click the ground and respawn that mob in a different area. Almost like Safari Nets if anyone remembers that mod. My question is how do I convert data such as if the mob is Name Tagged or the mob's Health into an item, and then how do I make it so it spawns an exact copy of the mob when right clicking a block? <3

Last seen on 00:43, 14. Jan 2023
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
maybe some way to get all of…
Sun, 01/08/2023 - 18:31

maybe some way to get all of the entity's nbt data into a variable or item nbt, idk