Blogs Other

How to make custom arrows (Java edition)

  • 3.6k views 1 today
  • 1
  • 1
  • 10
AmirhossainJ123
Lvl 48Master Sus
15
Custom arrows with only 2 command blocks!!
Hi my name is AmirhossainJ123 and today I am gonna teach you how to make custom arrows!!
Well first let's understand what is it?
Custom arrow is an arrow which can mine or place blocks or strike lightning or summon things like tnt or whatever you like

First we need to detect if the arrow hits the ground and summon tnt:
Repeating always active unconditional command block: execute as @e[type=arrow] if entity @s[nbt={inBlockState:{}}] at @s run summon tnt

Then we should delete the arrow!
Repeating always active unconditional command block: execute as @e[type=arrow] if entity @s[nbt={inBlockState:{}}] run kill @s


It was as easy as that, we can also change the code and make it mine for us
Change the first command block to: execute as @e[type=arrow] if entity @s[nbt={inBlockState:{}}] at @s run fill ~-5 ~-5 ~-5 ~5 ~5 ~5 air destroy

Or we can change it to lightning: execute as @e[type=arrow] if entity @s[nbt={inBlockState:{}}] at @s run summon lightning bolt

Or we can summon nuke!
execute as @e[type=arrow] if entity @s[nbt={inBlockState:{}}] at @s run summon creeper ~ ~ ~ {Fuse:0,ExplosionRadius:50}

We can do whatever we want!
Also if you want to use it in a datapack you can call another function to delete and summon it + you can check if the player is holding a certain arrow then if its custom summon things... how to check? Well
execute if entity @s[nbt={SelectedItem:{tag:{Blow:1}}}] run summon tnt
Pls subscribe and help us and join our discord server too
You won't regret it I promise!

More like this

  Have something to say?

Sweet Lighthouse
11/13/2022 3:57 am
Level 1 : New Miner
Lets summon a lot of skeleton
1
Flyrr
04/10/2022 11:47 am
Level 52 : Grandmaster Wizard
"Also if you want to use it in a datapack you can call another function to delete and summon it + you can check if the player is holding a certain arrow then if its custom summon things... how to check? Well
execute if entity @s[nbt={SelectedItem:{tag:{Blow:1}}}] run summon tnt"
This wouldnt work since if it would be run as the player it would summon it at the player and if it was run at the arrow it wouldn’t have the SelectedItem nbt tag.
1
AmirhossainJ123
05/27/2022 8:49 am
Level 48 : Master Sus
Yap
2
Flyrr
04/10/2022 11:47 am
Level 52 : Grandmaster Wizard
Also, this checks if the arrow is hold while nobody holds the arrow while shootinh
1
Silabear
04/08/2022 9:05 am
He/Him • Level 70 : Legendary Guard Bear
why not just use execute as @e[​type=arrow,nbt={inGround:1b}] at @s run summon tnt
4
AmirhossainJ123
04/08/2022 10:01 am
Level 48 : Master Sus
Cause it can hit the roof or side of a block
inBlockState is much more accurate than Inground
So...
1
YokaiS
04/08/2022 1:28 pm
He/Him • Level 62 : High Grandmaster Senpai Peacock
i can confirm that it still works with inGround
3
AmirhossainJ123
04/08/2022 8:32 pm
Level 48 : Master Sus
Oh, I didn't know that
So we can use both ;-;
1
Silabear
04/08/2022 10:28 am
He/Him • Level 70 : Legendary Guard Bear
inGround works for that iirc
3
AmirhossainJ123
04/08/2022 8:32 pm
Level 48 : Master Sus
I didn't know
1

Welcome