Started by
__SK__
on
Topic category: Help with Minecraft modding (Java Edition)
Is there any way to force a custom mob to have a delay between attacks? Example, like an attack cooldown every 30 or 40 or 50 ticks.
Tried changing this value, but the entity still attacks about every 20 ticks.
Edited by __SK__ on Sat, 02/19/2022 - 15:42
Temporary fix, might become permanent. Change the ticks for +/_ time.
your method works. however, I don't see it a bit, does it stretch the whole animation as a whole?
No, it doesn't. At that time, it just stopped/slows down the specified attacker entity. Now I did learn how to do custom attack goals with delayed attacks and/or random with different intervals, but I do it manually. Don't know how to integrate it as a plugin. If you or someone else knows how to integrate it as a plugin, I will gladly share my code.
Best wishes.
hey wanted to ask if you ever found a way to make it work?
Well ... Yes, I did learn how to make custom attack goals. But in order to to make it functional, it has to be manually coded.
Something like the following ...
It seems like a lot, but if you look closer I used "TesterEntity" as template and the word "Tester" is included in the code which can be replaced with your custom entities name. This code can be extended as far as you like making random attacks ... you could also add states which will be used to trigger Geckolib animations.
is there also any way to make an entity attack get delayed? (to synk with a geckolib animation for example)
You might be able to ask the dev of mcreator or you could ask nerdypuzzle.
yes, increase the value for the variable attackTime to something higher.
Basic example if you are coding it manually ...
Just make sure to not set it higher than the final if/closing statement.