Replacing mob whilst keeping NBT?

Started by pandaferrets on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Replacing mob whilst keeping NBT?
Mon, 10/17/2022 - 01:55 (edited)

How do I replace a mob with a different mob and keep all the NBT data?

Edited by pandaferrets on Mon, 10/17/2022 - 01:55
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1. Set a local variable to…
Sat, 10/22/2022 - 23:56

1. Set a local variable to the mobs nbt

2. despawn the entity

3. spawn the new entity

4. set the nbt of new entity to the variables

Joined Jan 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
can you please provide image…
Mon, 02/19/2024 - 02:22

can you please provide image on how to do so?