Help with making a homing entity which despawns after 1 hit

Started by Breeze Man on Tue, 11/03/2020 - 13:13

Topic category: Help with modding (Java Edition)

Last seen on 10:11, 22. Dec 2020
Joined Oct 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with making a homing entity which despawns after 1 hit
Tue, 11/03/2020 - 13:13

Hello Im trying to make a AI to achieve to following:

The mob will be always stationary when it detects a mob it can reach (the mob is flying)
It will go after it
but not the following: villagers, animals, players, golems
(so hostile mobs only)
and when it hits once it will despawn

(If its remained stationary and cant find a target it will despawn in 5 seconds

can someone tell me how can I do it in a detailed way?

 

Im not sure how to exactly implement the despawn if stationary. I am also open to suggestin in change of how it works.

 

Thanks

Last seen on 17:57, 8. Jan 2021
Joined Dec 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Omg this is LITERALLY what I…
Thu, 12/03/2020 - 02:16

Omg this is LITERALLY what I was about to ask, making some bubble cutters from jojo for the mod and idk how to make it hit enemies, although I did do the bubble lenses