Lightning Arrow? - Commands, Command Blocks And Functions

Help Sign In/Register
  • Home
  • Minecraft Forum
  • Minecraft: Java Edition
  • Redstone Discussion and Mechanisms
  • Commands, Command Blocks and Functions
  • Lightning Arrow?
Java
  • #1 Oct 26, 2021 JaynMF JaynMF
    • View User Profile
    • View Posts
    • Send Message
    View JaynMF's Profile
    • Join Date: 10/26/2021
    • Posts: 0
    • Member Details

    I was testing out this really fun command:

    /execute at @e[type=arrow] run summon lightning_bolt.

    It was really fun, summoning an entire line of lightning bolts, one after another, but what if I would only like to have the lightning strike after the arrow has hit something (like a block, not a mob), and I would only want lightning to strike an x amount of times.

    There is this code that looks appealing, but I don't know how to use it.

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

    Is there a way to do this? For example, I were to shoot an arrow, and lightning were to NOT be summoned yet, and when the arrow hits a block/player, I would want it to summon lightning 5 times, and make the arrow disappear, how would I write it in a command block/chain of command blocks?

    Also, preferably, I would like to have only the arrows shot from a bow named (let's say it's named "text"), to be affected by this command. So that's another problem I have to deal with.

    Thanks for helping me, (if you did)!

    Last edited by JaynMF: Oct 26, 2021 Rollback Post to Revision RollBack
  • #4 Oct 27, 2021 Crazy_Dave Crazy_Dave
    • View User Profile
    • View Posts
    • Send Message
    View Crazy_Dave's Profile
    • Newly Spawned
    • Location: T̴͇̄h̴̳̄é̵͉ ̸̝̈́v̶͍̅o̶̳̚ȋ̸̝d̸̥̈́
    • Join Date: 7/21/2018
    • Posts: 317
    • Minecraft: HoboMaggot
    • PMC: HoboMaggot
    • Member Details

    You cant use 1.12 commands for 1.13+ commands.

    If you want to summon arrows that summon lightning on the ground:

    /execute at @e[type=arrow,nbt={InGround:1b}] run summon lightning_bolt

    To detect the person shooting from the bow, it is a bit harder, as you need to detect the person shooting the bow and then apply a custom tag to the arrow for which you detect in the summon lightning command

    /execute at @e[type=arrow,nbt=!{LeftOwner:1b}] if entity @p[distance=..1,nbt={SelectedItem:{id:"minecraft:bow",Count:1b,tag:{display:{Name:'{"text":"text"}'}}}}] run tag @s add is_LightningArrow /execute at @e[type=arrow,tag=is_LightningArrow,nbt={InGround:1b}] run summon lightning_bolt Rollback Post to Revision RollBack
  • #7 Feb 22, 2024 GeckoZeus21 GeckoZeus21
    • View User Profile
    • View Posts
    • Send Message
    View GeckoZeus21's Profile
    • Newly Spawned
    • Join Date: 2/23/2024
    • Posts: 1
    • Member Details

    Another really fun thing to do is replace the lightning with tnt.

    In case you didn't know, in Minecraft java when you summon tnt it is just the explosion, not the actual block.

    When you shoot it, the tnt propels the arrow forward dealing insane damage.

    This is because Minecraft judges the damage an arrow makes based on speed not the bow charge.

    Rollback Post to Revision RollBack
  • To post a comment, please login.
Posts Quoted: Reply Clear All Quotes
  • Home
  • Minecraft Forum
  • Minecraft: Java Edition
  • Redstone Discussion and Mechanisms
  • Commands, Command Blocks and Functions
  • Lightning Arrow?
Previous Thread Jump to Forum Next Thread

Tag » How To Summon Lightning In Minecraft