47
So... this week Minecraft's dev. version 14w02a came out with some really interesting things. I was able to figure out how make it so you can use a fishing rod as a grappling hook, as well as integrate a cooldown. So lets see how it works...
Here is the Setup:
It's a little complicated. And remember that you must be using at least Minecraft 12w04a. You can edit your version in the Version Editor section of the launcher.
So, in the top-left corner 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[name=unknown] {inGround:1b}
Let's back up a bit. When you cast a fishing rod, the little red bobber on the end is an entity with the name "unknown." So basically, this command block searches for any entity with the name "unknown." Since it is highly unlikely that another entity in the world will be named "unknown", we do not need to specify the entity type. And we must use the inGround variable, otherwise it will search for ANY "unknown" entity, even if it has not 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 "unknown" entity that is in the ground. The comparator then goes into a repeater, whose purpose is to extend the signal. The repeater then goes into a stone block, which is significant in the cooldown, which I will explain later.
As you can see by the image, there are 5 command blocks at the bottom of the screen. For now, ignore the command block that I have put a blue circle around. The other 4 command blocks all have different commands, and can be in any order you would like. I will show you them one by one:
/tp @p @e[name=unknown]
This teleports the closest player to the "unknown" entity, which is the fishing rod bobber.
/kill @e[name=unknown]
This kills the fishing rod bobber.
/playsound mob.horse.leather @p ~ ~ ~ 10
This plays a "whooshing" sound to the player.
/tellraw @p {text:"You have used Grappling Hook",color:red}
This tells the player when they have used the grappling hook. This one is optional, and you can modify the text and the text color if you would like.
__________________________________
Ok, now lets move on to the cooldown. The 5th command block, the one which I have labeled with a blue circle has this syntax:
/setblock 166 56 764 minecraft:air 0 replace
What this does it it sets an air block at the position of the stone block. (The coordinates may need to be modified). What this does is if you try to use the grappling hook now, the signal will not pass through the stone block because, well, it doesn't exist. Then the signal travels through some repeaters. I only used a few, but adding more will increase the cooldown, while deleting them with decrease it.
Ok, now when the redstone signal finishes traveling through the repeaters, it hits 2 command blocks. They are:
/setblock 166 56 764 minecraft:stone 0 replace
This sets a stone block back at the position so the signal can now travel through. And:
/tellraw @p {text:"Grappling Hook is ready",color:red}
Which lets the player know that they can use the grappling hook again.
____________________________________________________
This mechanic does not work well in multiplayer, since it is impossible to track the owner of a bobber. 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:
It's a little complicated. And remember that you must be using at least Minecraft 12w04a. You can edit your version in the Version Editor section of the launcher.
So, in the top-left corner 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[name=unknown] {inGround:1b}
Let's back up a bit. When you cast a fishing rod, the little red bobber on the end is an entity with the name "unknown." So basically, this command block searches for any entity with the name "unknown." Since it is highly unlikely that another entity in the world will be named "unknown", we do not need to specify the entity type. And we must use the inGround variable, otherwise it will search for ANY "unknown" entity, even if it has not 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 "unknown" entity that is in the ground. The comparator then goes into a repeater, whose purpose is to extend the signal. The repeater then goes into a stone block, which is significant in the cooldown, which I will explain later.
As you can see by the image, there are 5 command blocks at the bottom of the screen. For now, ignore the command block that I have put a blue circle around. The other 4 command blocks all have different commands, and can be in any order you would like. I will show you them one by one:
/tp @p @e[name=unknown]
This teleports the closest player to the "unknown" entity, which is the fishing rod bobber.
/kill @e[name=unknown]
This kills the fishing rod bobber.
/playsound mob.horse.leather @p ~ ~ ~ 10
This plays a "whooshing" sound to the player.
/tellraw @p {text:"You have used Grappling Hook",color:red}
This tells the player when they have used the grappling hook. This one is optional, and you can modify the text and the text color if you would like.
__________________________________
Ok, now lets move on to the cooldown. The 5th command block, the one which I have labeled with a blue circle has this syntax:
/setblock 166 56 764 minecraft:air 0 replace
What this does it it sets an air block at the position of the stone block. (The coordinates may need to be modified). What this does is if you try to use the grappling hook now, the signal will not pass through the stone block because, well, it doesn't exist. Then the signal travels through some repeaters. I only used a few, but adding more will increase the cooldown, while deleting them with decrease it.
Ok, now when the redstone signal finishes traveling through the repeaters, it hits 2 command blocks. They are:
/setblock 166 56 764 minecraft:stone 0 replace
This sets a stone block back at the position so the signal can now travel through. And:
/tellraw @p {text:"Grappling Hook is ready",color:red}
Which lets the player know that they can use the grappling hook again.
____________________________________________________
This mechanic does not work well in multiplayer, since it is impossible to track the owner of a bobber. I think...
____________________________________________________
I will have many more of these 1.8 tutorials, so don't forgot to Diamond, Favorite and Subscribe!!
Credit | Dragnoz |
Tags |
tools/tracking
2686864
6
grappling-hook-in-vanilla-minecraft
Create an account or sign in to comment.
There is a way to tack them(sort of). Create an objective called Ghook as type (stat.useItem.minecraft.fishing.rod). Then, have the hook teleport (@p[score_Ghook_min=1]) Have the hook reset Ghook for the all players in a radius of five and then kill it.
I think its the upper-left command block out of those 4.
but nice Idea!