how to change a mob into a different Mob when I give it an item?

Started by softmushroombaby on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to change a mob into a different Mob when I give it an item?

I have a mob that I want to change into a different Mob when I give it an item! Kind of like how Villagers turn into witches if struck by lightening, but instead of lightning it's by giving it an item! I want them to have a completely different look+animations and POSSIBLY behavior as well. Is this possible in Mcreator?

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When you use the item on the…
Fri, 02/14/2025 - 03:23

When you use the item on the mob, despawn the original mob and spawn in the new one. If you want the change to be less jarring, store the original mobs rotation, head position, etc then apply it to the new mob. Also make sure you carry over any NBT data such as name tags, whether it's on fire and such.

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm having trouble with the…
Sun, 02/16/2025 - 04:27

I'm having trouble with the code here... BUT I am so incredibly happy that its a possibility! This is very important to the mod! Could I get some help? i feel like I'm doing things wrong

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not entirely sure what's…
Tue, 02/18/2025 - 03:17

I'm not entirely sure what's the problem here.

I will say however that the second part of your AND statement is just checking that cake is a food, which it isn't, it's a block.

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well, it simply makes it so…
Tue, 02/18/2025 - 04:20

well, it simply makes it so ANY right click would turn my entity into another entity! I want it so they turn into an entity when given a specific item.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ok, you need to check what…
Wed, 02/19/2025 - 00:27

Ok, you need to check what item is in the players hand then 

Joined Feb 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just wanted to update and…
Sat, 02/22/2025 - 11:33

Just wanted to update and say that I figured it out!! Thank you so much for the help!