How do I turn the creature I hit into another living being

Started by darkqbs on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I turn the creature I hit into another living being

Hello, I'm making a mod and I hit any living creature with the item I made, how do I make it turn into a cali that I made in my

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When it's hit, despawn the…
Mon, 10/02/2023 - 20:11

When it's hit, despawn the entity you hit and spawn the entity you want to transform into at the position. if you really want to, you can also set it to have the same pitch and yaw (direction) as the original entity.

It won't be entirely smooth, especially if the mobs have very different models, so consider possibly spawning some particles when it happens to make it look a bit cleaner?