2

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?

1

This command prints the coordinates of an ender pearl into chat every tick as long as an ender pearl exists, otherwise stays silent:

/execute as @e[type=ender_pearl] run tellraw @a {"nbt":"Pos","entity":"@s"}

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 of Pos, 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):

/execute at @e[type=ender_pearl] run summon armor_stand ~ ~ ~ {NoAI:1,NoGravity:1,Marker:1,Tags:["pearl_marker"]}

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.

-1

Here is a solution: In order to see where it goes, use a command block to teleport you at where it goes. Use the following command

/execute @a[r=1000000] ~ ~ ~ /tp @a[name=(Username) @e[type=ender_pearl]

If it doesn’t work, let me know.

4
  • Please only write actual answers as answers. Links do not count as answers, especially not broken links. – Fabian Röling Dec 28 '19 at 20:10
  • I may be new to this site, but I am not new to Stack Exchange. The link to your video is broken and just a link is not an answer. – connectyourcharger Dec 28 '19 at 20:11
  • I am sorry about that. I gave a better answer if it is okay. – Kid Gaming Dec 28 '19 at 20:13
  • No, that answer does not work at all. You're using the old /execute syntax, even mistakes in that one and your idea doesn't work, because the player collides with the pearl. – Fabian Röling Feb 3 '20 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.