Started by
withermasterbmods
on
Topic category: Help with Minecraft modding (Java Edition)
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
Topic category: Help with Minecraft modding (Java Edition)
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
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.
Thanks!