Eldritch Mobs

Eldritch Mobs

6M Downloads

Attempting to create a "Flyer" ability

Sarcose opened this issue ยท 0 comments

commented

As stated. The goal is for the mob to be able to fly toward its target, particularly in situations where the server has flight mods. However, I can't figure out how the coordinates of {target} and {self} are exposed.

For instance, this is one of my attempts. I've tried several permutations of this to no avail. The following doesn't resolve.
"command": "execute as {self} at {self} run data merge entity {self} {NoGravity:1b,Motion:[({target}.x-{self}.x)*0.1,({target}.x-{self}.x)*0.1,({target}.z-{self}.z)*0.1]}"

As a test, I can simply make the mob rise into the air. Obviously yeeting itself toward the flying player is the goal.
"command": "execute as {self} at {self} run data merge entity {self} {NoGravity:1b,Motion:[0.0,0.5,0.0]}"
The above works, I just can't figure out how to make it work dynamically.