- 36,500 views, 1 today
37
What you need: 4 command blocks, 3 repeaters, 6 redstone, 1 redstone comparator, and a knowledge of how to make redstone clocks.
1st build your clock, set the command blocks like the picture shows:
You can use either setup, if you want to use the repeater, then use the summon and tp way I show, if you want no repeater just that comparator use the /execute command I give but you don't need to use both and set it up the way I did.
Commands
after it finds type Arrow that has been in the ground for it activated the comparator and moves to the next command
/tp @e[type=PrimedTnt] @e[type=Arrow] It will Teleport the Tnt to the arrow and @e means closest entity so adding [type=PrimedTnt] will mean closest primedTnt so the tnt will teleport the arrow. and after 2 ticks (from the fuse) it will blow up and you have an exploding arrow.
/kill @e[type=Arrow] it will kill the entity Arrow so it doesn't keep spawning tnt and blowing it up a million of times it just blows up once then the arrow goes away.
Alternative way to make it:
Instead of doing /summon PrimedTNT and the /tp PrimedTNT to Arrow or whatever (not exact commands) you can use only one command and have the comparator from /testfor @e[type=Arrow] activate the command block to run the command /execute @e[type=Arrow] ~ ~ ~ summon Primedtnt ~ ~ ~ and then to the right of it have a command block with the /kill command stated above earlier. So have a clock like normal /testfor @e[type=Arrow] {inGround:1b} then have that normal comparator activate the execute command above, and then instead of a repeater just put a command block to the right of it doing /kill @e[type=Arrow] What the execute command does it does the command at the entities coordnates so like /execute @e[type=Arrow] ~ ~ ~ summon PrimedTnt ~ ~ ~ this will spawn tnt at the coordnates of the arrow or something like /execute @e[type=Arrow] ~ ~ ~ give @p diamond so when you shoot an arrow the closest person to the arrow will get the diamond because @p means closest player and the execute command means that's where the command is well... executed this also works with any entity so it can be an arrow that spawns lightning, or creepers or mushrooms or items, so like diamonds
How to activate the 1st command block:
1st build your clock, set the command blocks like the picture shows:
How to set commands up
Spoiler - click to reveal
Commands
- 1. (Very Left command block). /testfor @e[type=Arrow] {inGround:1b} this command, it will look for an arrow inGround the one mean it is true and the b means it's a boolean and boleans are either true/false and in this command 0=false and 1>= is true so that's why we have 1b. So if you basically if you have the value for one it means it is in ground but if 0 it it will just testfor arrow and blow up as soon as you shoot it, it's a NBT tag that means 1 if it is true 0 if it is false. For example like ArmorStands they have like NoBasePlate NoGravity ShowArms and if any of them are one the baseplate won't show or if the NoGravity is 1 it isn't affected by gravity and if ShowArms is one 1 it will show arms but if it is 0 it will do the opposite. So inGround basically means it is inGround so it will testfor that that way the arrow doesn't explode as soon as you shoot it it has to be inground for it to blow up
after it finds type Arrow that has been in the ground for it activated the comparator and moves to the next command
- 2. ( The one right next to the 1st one) /summon PrimedTnt ~ ~10 ~ {Fuse:2} this will Summon a Tnt from 10 blocks high (the 10 in the command) and the fuse will be 2 ticks long (I'd leave it at that unless you want to experiment) and once the tnt gets summoned it will activate the repeater to...
- 3. (The Top right one above the lower Command Block) it will activate the repeater to
/tp @e[type=PrimedTnt] @e[type=Arrow] It will Teleport the Tnt to the arrow and @e means closest entity so adding [type=PrimedTnt] will mean closest primedTnt so the tnt will teleport the arrow. and after 2 ticks (from the fuse) it will blow up and you have an exploding arrow.
- 4. (The bottom right command block) What this does is get rid of your arrow because if it doesn't get rid of it it will still be finding arrows in the /testfor command so it will keep summoning and teleporting tnt.
/kill @e[type=Arrow] it will kill the entity Arrow so it doesn't keep spawning tnt and blowing it up a million of times it just blows up once then the arrow goes away.
Alternative way to make it:
Instead of doing /summon PrimedTNT and the /tp PrimedTNT to Arrow or whatever (not exact commands) you can use only one command and have the comparator from /testfor @e[type=Arrow] activate the command block to run the command /execute @e[type=Arrow] ~ ~ ~ summon Primedtnt ~ ~ ~ and then to the right of it have a command block with the /kill command stated above earlier. So have a clock like normal /testfor @e[type=Arrow] {inGround:1b} then have that normal comparator activate the execute command above, and then instead of a repeater just put a command block to the right of it doing /kill @e[type=Arrow] What the execute command does it does the command at the entities coordnates so like /execute @e[type=Arrow] ~ ~ ~ summon PrimedTnt ~ ~ ~ this will spawn tnt at the coordnates of the arrow or something like /execute @e[type=Arrow] ~ ~ ~ give @p diamond so when you shoot an arrow the closest person to the arrow will get the diamond because @p means closest player and the execute command means that's where the command is well... executed this also works with any entity so it can be an arrow that spawns lightning, or creepers or mushrooms or items, so like diamonds
How to activate the 1st command block:
- Use a 2 repeater clock with 4 redstone and connect it to the command block like the picture shows
- turn on the clock, put a redstone torch in 1 of the corners so it activates a redstone and the whole thing should light up,
- break the torch
- break the corner redstone and replace it as fast as you can and it should make a strobe effect to show it's working
- connect redstone wiring to the command block.
Only works in 1.8
Tags |
7 Update Logs
Update #7 : by Veritas025 06/19/2015 10:09:03 amJun 19th, 2015
Probably my final update
Explanation of booleans and true/false
Change layout of blog a little bit
Changed some information about the @e selector
Explanation of booleans and true/false
Change layout of blog a little bit
Changed some information about the @e selector
LOAD MORE LOGS
tools/tracking
2993776
6
how-to-make-exploding-arrows-in-vanilla-minecraft
Create an account or sign in to comment.