How do I have a mob shoot a projectile after the animation has finished. (Using Geckolib)

Started by BMAgamer on

Topic category: Help with modding (Java Edition)

Last seen on 21:57, 1. Apr 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I have a mob shoot a projectile after the animation has finished. (Using Geckolib)

I have a mob I made on blockbench (geckolib). It has a animation where it charges up and then would shoot. Only issue, is that it shoots as soon as that animation starts. How can I delay the projectile attack so the animation plays before.

(I don't know how to code but I understand procedures a little)

If the logic runs server…
Wed, 03/20/2024 - 22:08

If the logic runs server-side, you could use wait procedure block.

Otherwise, you may be able to use mob tick update to count ticks before executing the action. You can store tick counter in entity nbt or entity synced data, for example

Last seen on 21:57, 1. Apr 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well how can I have it so…
Thu, 03/21/2024 - 19:15

Well how can I have it so the entity shoots the projectile at the target using the procedure. I've just been using the default ai to make it shoot the projectile.