Topic category: Help with Minecraft modding (Java Edition)
Getting to the point here;
I'm trying to make my mob AI notice the player and have it wait 5 seconds (and stop moving) once it spots a player, almost like it's inspecting or identifing them. After waiting for said 5 seconds, it plays an animation (which lasts for 4 seconds) and once the animation is done, it'll start chasing/attacking the player until all nearby players are dead, or they escape
This could be a case of me drinking stupid juice and the answer to solve all my problems is literally screaming at my face, or I just simply can't do it for- whatever reason.
For once it's not a case of the game crashing, just, me not figuring out how to do the simple (unless it isn't simple but who am I to judge?)
I've been at this for like, 2-3 weeks and I figured I should just stop letting myself suffer and just ask for help. So here I am, asking for help....help ;;]
Hi, maybe I have a solution, I just need to know if you are using GeckoLib or not
Yeah I am using GeckoLib :]
Hi again, here is everything you need to do what you wanted.
1) You must have these 3 procedures:
ChasingEntityOnSpawnSet:
ChasingEntityWaitCheck:
PlayerSpottedByChasingEntity:
2) Set up the entity's AI procedure exactly like this:
Put in sequence this blocks:
Set the conditions equally for the second / third / fourth block:
3) Finished!!! I hope I was clear in the explanation and helpful.
P.S. There is another version of the "PlayerSpottedByChasingEntity" procedure:
I think I have said everything and haven't forgotten anything : ]
(I advise you to open the images in a new window so you can see them better)
Damn I forgot to write it, a useful site that I always use to convert seconds to ticks is: https://mapmaking.fr/tick/
h o l y
thank you so much!! your a saint for this omfg
Glad to help, wish you a good development of your mod!