Help with making a homing entity which despawns after 1 hit

Started by Breeze Man on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with making a homing entity which despawns after 1 hit

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

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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