I am creating an ender pearl cannon and I'm trying to get the precise timings down. Only I can't really see where the ender pearl goes after it launches because I propel it with a lot of TNT and therefore it travels at a very high speed. In an effort to optimize it, I want to be able to see where my ender pearl travels along its journey.
Is there any way I can do this? Maybe through chat, scoreboard, or teleportation to the ender pearl?
Best Answer
This command prints the coordinates of an ender pearl into chat every tick as long as an ender pearl exists, otherwise stays silent:
Simply put this into a repeating command block and you'll see all the data for the trajectory. You can do the same with
Motion
instead ofPos
, if you want to see that.This command summons an armour stand at the position of the ender pearl every tick that does not collide with the ender pearl and does not move, creating a nice visual representation of the trajectory (one that could potentially get laggy, but wasn't on my computer):
You can kill them again with
/kill @e[tag=pearl_marker]
If you're planning to have ender pearl entities that exist for a long time, you should make sure that you either know the coordinates of the repeating command block so that you can disable it (
/data merge block <coordinates> {auto:0}
) or run this in a function that you can edit outside Minecraft, otherwise lag might make your world unusable.Note that the rotation of the armour stands will be weird. That's because the rotation of ender pearls is weird. It seems to be completely unrelated to their motion.