Help please

Started by withermasterbmods on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help please

Im trying to make it so when a my mob attacks a villager it turns the villager into my mob but i dont know how

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure, and set…
Sat, 09/30/2023 - 02:32

Make a procedure, and set the global trigger to 'entity attacked.' Use an if bracket to check if the source entity, (the one attacking), is your custom mob, and the event/target entity, (the one being attacked), is a villager. If it is, despawn the villager, and spawn your custom entity in its place. (If you want to be slightly fancier, save the velocity, yaw, and rotation of the villager as local variables, and transfer them to the new entity so the transition looks nicer.) 

Also, please title your posts better, and try to be a bit more descriptive. With this the solution is pretty straightforward, but if you don't give a clear explanation, it can be hard to figure out how to respond.