Minecraft Blogs / Tutorial

Ender Bow in Vanilla Minecraft

  • 10,550 views, 1 today
  • 8
  • 7
  • 41
MCmaster23's Avatar MCmaster23
Level 51 : Grandmaster Blob
47
So... this week Minecraft's dev. version 14w02a came out with some really interesting things. I was able to figure out how to create a bow, that, when you shoot it and the arrow hits the ground, you are teleported to the position of the arrow. So lets see how it works...

Here is the Setup:
PUVqQypng
Yeah, that's it. But remember that you must be using at least Minecraft 12w04a. You can edit your version in the Version Editor section of the launcher.

Let's launch right into it!

So, on the far left is a very rapid clock. You can create it by:
1. Placing two repeaters next to eachother, facing opposing directions
2. Place a piece of redstone on both sides of each repeater (4 in total)
3. Place a redstone torch next to any redstone dust, and break it
4. Now, holding a piece of redstone, break any placed redstone and place it back very quickly
5. If done correctly, the clock should flicker on and off

But that's just the clock. As you can see by the image, the clock is connected to a command block. That command block's syntax is:

/testfor @e[type=Arrow] {inGround:1b}

This searches for an arrow entity. We have to put the inGround boolean, otherwise it will search for ANY arrow, even it it hasn't hit the ground yet.

Next, we have a comparator, which is the output of the command block. The comparator will only turn on if there in fact IS an arrow that is in the ground. The comparator is facing into two command blocks. It does not matter which goes where, but the syntaxes are:

/tp @p @e[type=Arrow]
AND
/say You have been teleported.

The first command teleports the closest player relative to the command block TO the arrow. We do not and CANNOT put the inGround boolean here because this command block will only activate if an inGround-arrow has been found, anyway. Besides, Minecraft doesn't let you use datatags in /tp.

The second command is optional, and will under most circumstances will not be used. All it does it say "You have been teleported."
____________________________________________________

There are some glitches. If you fire two arrows at once, it will not teleport you to either one, but it will say that you have been teleported. Also, if you are using an infinity bow, you might want a third command block that kills all arrows, so that the infinity-arrow does not remain stuck in the ground. The syntax is:

/tp @e[type=Arrow] 0 ~-300 0

Since Minecraft does not allow us to literally kill arrows, we must teleport it into the void where it where it will instantly despawn.
____________________________________________________

This mechanic does not work well in multiplayer, since it is impossible to track the owner of an arrow. I think...
____________________________________________________

I will have many more of these 1.8 tutorials, so don't forgot to Diamond, Favorite and Subscribe!!
Tags

Create an account or sign in to comment.

1
04/17/2016 4:59 pm
Level 23 : Expert Nerd
TheEpicMapMaker
TheEpicMapMaker's Avatar
I found a shorter way. you don't have to use the /testfor command. just set up a clock that connects to a command block and enter /tp @p @e[type=Arrow].
1
01/07/2015 12:22 am
Level 8 : Apprentice Mage
MikeyCarter
MikeyCarter's Avatar
Not sure if anyone posted this but to get around the problem of multiple arrows on the ground use something like [type=Arrow,c=1] 

Seems to select the closest one.  Or c=-1 for furthest.
1
01/07/2015 10:32 pm
Level 51 : Grandmaster Blob
MCmaster23
MCmaster23's Avatar
Ah I see what you mean. I guess I wasn't thinking of that :)
1
12/10/2014 1:44 pm
Level 1 : New Explorer
Xeod
Xeod's Avatar
Note: You can kill arrows with the /kill @e[type=Arrow]
1
12/10/2014 8:04 pm
Level 51 : Grandmaster Blob
MCmaster23
MCmaster23's Avatar
Yeah at the time I made this, you couldn't use /kill on entities.
1
08/21/2014 8:53 am
Level 1 : New Miner
the_tnt_lover
the_tnt_lover's Avatar
How would you make it so the arrow needs to be stuck in the ground to teleport you?
1
01/12/2014 8:49 pm
Level 51 : Grandmaster Grump
pistonologist
pistonologist's Avatar
[20:47:41] The entity UUID provided is in an invalid format ( i get this error)
1
01/12/2014 8:50 pm
Level 51 : Grandmaster Blob
MCmaster23
MCmaster23's Avatar
Which command block sent you that error
1
01/12/2014 8:52 pm
Level 51 : Grandmaster Grump
pistonologist
pistonologist's Avatar
the one that teleports you
1
01/12/2014 8:55 pm
Level 51 : Grandmaster Blob
MCmaster23
MCmaster23's Avatar
make sure that you spelled everything correctly and that you capitalized the "A" in "Arrow". if you still get this error then that means it can't find an arrow in which case... i have no clue
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome