Started by
Dammo447420
on
Topic category: Help with Minecraft modding (Java Edition)
How do I copy bee behavior?
version 1.19.4
Hello, I would make a mod where a mob becomes an aggressive mob as soon as it is attacked, but there is nothing I can't find that behavior anywhere
pls help meeee
Edited by Dammo447420 on Mon, 04/01/2024 - 14:55
If you want to copy bee behavior, you could try locking the mod element and examining the code for the Bee- MCreator comes with a built in repository of the source code for various parts of the game.
However, if you just want an entity to become aggressive when attacked, there's simpler methods. You could try just adding a 'fight attacker mobs back and call for help' function to the AI. If that doesn't work, you can make a procedure that triggers when the entity is attacked, and sets its attack target to the entity that attacked it.