teleporting players to ender pearls?

So I'm just messing around with 1.13 command blocks, trying to figure them out. I cannot use functions as I don't have access to the world files, and also I felt more comfortable using command blocks.

Anyway, I'm trying to make ender pearls that carry you with then as they fly (like on Hypixel server), so I've placed two repat command blocks, with these commands:

execute at @e[type=minecraft:ender_pearl] run team join pearl @p

and:

team join pearl2 @e[type=minecraft:ender_pearl]

and they work fine. however, when I try to teleport the the entities together, I get nothing. I'm using this command in the final repeat command block:

execute at @e[team=pearl2] run tp @e[team=pearl] ~ ~ ~

Any help or advice on the new command system would be appreciated.

10

1 Answer

Something you can do is:
A repeating command block, set to unconditional, always active, and with this command:

/execute at @e[type=minecraft:ender_pearl] run tp @p ~ ~ ~

Then have a chain command block run:

/execute at @e[type=minecraft:ender_pearl] run effect give @p resistance 2 255 true

I believe it is multiplayer friendly.
Make sure to type this command: /gamerule commandBlockOutput false, unless you want to have your chat spammed with tp messages.

You Might Also Like