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:
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!!
Here is the Setup:
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 |
tools/tracking
2686663
6
ender-bow-in-vanilla-minecraft
Create an account or sign in to comment.
Seems to select the closest one. Or c=-1 for furthest.