I'm looking for someone who can create a way to make a teleportation bow, like what they have on Hypixel Or Those servers. I have tried searching this up and none of the methods work for 1.12.1 so Im turning to you now. Basically it is named "Teleportation Bow" and has particles that trail it, preferably the enchant table particles or the endmite particles. When you land it says "Poof" In purple like ./jump or ./jumpto. Ik this is a lot to ask, and all I need is the teleportation aspect itself. Particles are if possible and so is the title part. Good day and thanks!


Solution 1:

It will be kind of complicated, so bear with me.

First, you need a way to track which players shoot arrows, so make an objective called shotArrow that is stat.useItem.minecraft.bow: scoreboard objectives add shotArrow stat.useItem.minecraft.bow

You will also need a way to track players, just use a dummy score called ID, and assign these as players join the server. If you need help setting this up, just leave a comment. As long as each player is given a unique ID, it will work.

Finally, add another objective called bowShooter, for the arrow to store who shot the bow: scoreboard objectives add bowShooter dummy

That's all your objectives, these next commands will need to be on a loop, either in a command block chain or a function.

The first command will copy a player's id to the nearest arrow when he shoots a bow: execute @a[score_shotArrow_min=1] ~ ~ ~ scoreboard players operation @e[type=arrow,c=1,tag=!assigned] bowShooter = @s ID. Then we will add a tag to the arrow so it doesn't get a new ID if it happens to be closer to a player than the arrow they shot: scoreboard players tag @e[type=arrow,tag=!assigned] add assigned.

Next, we need to add a tag to any arrows that are in the ground, since they should be teleporting players to themselves, minecraft comes with an nbt tag for this: scoreboard players tag @e[type=arrow] add inGround {inGround:1b}

Then, any arrow that is in the ground should figure out which player to teleport and teleport it, you have to do just one arrow each tick since you are comparing scores, unless you used multiple function files, but there should be no noticeable difference:

  • scoreboard players tag @e[type=arrow,tag=inGround,c=1] add teleportingPlayer
  • execute @e[tag=teleportingPlayer] ~ ~ ~ scoreboard players operation @a bowShooter = @s bowShooter
  • execute @a[score_bowShooter_min=1] ~ ~ ~ scoreboard players operation @s bowShooter -= @s ID
  • tp @a[score_bowShooter_min=1] @e[type=arrow,tag=teleportingPlayer]

And if you want a title:

  • title @a[score_bowShooter_min=1] title {"text":"Poof!"}

Then, clean up:

  • scoreboard players reset @a bowShooter
  • kill @e[type=arrow,tag=teleportingPlayer]