0

So I want to use command blocks to summon an ender pearl in a stasis chamber that will teleport me when I activate it. Thing is, I can't figure out how to make the pearl teleport me.

On reddit, I found a comment saying that this script: data modify entity @e[type=ender_pearl,limit=1,sort=nearest] Owner set from entity @s UUID

would make the pearl teleport you. I tried it, and it doesn't do anything. Is what I'm trying to achieve even possible?

Any help is appreciated, thanks.

2
  • 2
    I'm curious what the application of this would be. Why not just use a command to teleport you instead of the extra ender pearl? It's an interesting idea.
    – Regnegade
    Sep 2 at 14:37
  • It's because I'm trying to find a way to prevent unloaded stasis chambers, actually. I thought that if a player throws enough pearls, it might cap out and prevent more from working. I want to use command blocks because of the cooldown when a user throws a pearl.
    – HyperEdge
    Sep 2 at 14:43
0

Your command worked for me.

After summoning the ender pearl, when you run the /data command, make sure it is selecting the nearest ender pearl. You can check if it has the correct Owner by using /data get entity @e[type=minecraft:ender_pearl,limit=1,sort=nearest].

If you are summoning many ender pearls in a small area, you can use:

execute as @e[type=ender_pearl,distance=..5] run data modify entity @s Owner set from entity @s UUID

This will make all ender pearls within a 5 block spherical radius of the execution point set their Owner to your UUID.

2
  • But will the pearl teleport you when it lands?
    – HyperEdge
    Sep 4 at 21:27
  • @HyperEdge Yes, it did.
    – ginkgo
    Sep 5 at 11:03

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.