Lightning spawns block

Started by Joe Swansawn on

Topic category: Advanced modding

Last seen on 11:44, 13. Jul 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Lightning spawns block

My goal is to make it so every time lightning strikes in minecraft, it spawns a block at the place it struck. A natural lightning strike. Also, if it's only possible with code then could i get a quick tutorial on how to do that cuz i'm not big on coding. Thank you in advance.

Last seen on 21:01, 7. Aug 2023
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i dont think that is…
Fri, 04/24/2020 - 03:07

i dont think that is possible, an alternative though could be, during a thunderstorm a mob will have a chance to spawn and it instantly dies and on mob death strike lighting in that location and place block

Last seen on 11:44, 13. Jul 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm hood idea, thanks!
Fri, 04/24/2020 - 14:13

Hmm hood idea, thanks!

Last seen on 00:23, 17. Oct 2021
Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Simple make a never ending…
Sat, 05/02/2020 - 20:37

Simple make a never ending procedure that runs off world tick or etc
That would execute the following command as the Console itself..
 

Execute @e[type=lightning_bolt] ~ ~ ~ /setblock ~ ~ ~ stone
replace stone with Whatever you want.
For instance, amod:blockthing

1.13 and above would be different,
I'm a 1.12.2 pleb ;P

For an effect Around an entity, block or etc
You would do the same but with the following little variation And running off Their tick instead of the world,
NOTE - you must maintain this running via the Console not the player - entity or etc! Otherwise you may have Permission conflicts.

Execute @e[type=lightning_bolt,r=10] ~ ~ ~ /setblock ~ ~ ~ stone
replace stone with Whatever you want.
For instance, amod:blockthing
Replace the "10" after the r= with whatever Block Range you want.

hope this helped.

Last seen on 11:44, 13. Jul 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Interesting... I will look…
Sat, 05/02/2020 - 20:42

Interesting... I will look into it and also how to make it in 1.14.2, because it would be helpful in another mod i have in progress. Thank you!

 

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
lightning is an entity, so…
Mon, 05/11/2020 - 16:53

lightning is an entity, so you can create a procedure element, and in the first green block there's an event trigger pulldown, choose "Entity joins the world". and then use IF/DO blocks to check if the current entity is subtype of EntityLightningBolt

Last seen on 03:12, 31. Jul 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just make a procedure that…
Fri, 06/12/2020 - 02:16

just make a procedure that runs this command every tick

/execute at @e[type=lightning_bolt] run setblock ~ ~ ~ <mods namespace>:<block you want to place>

Last seen on 11:44, 13. Jul 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks for all the cool…
Fri, 06/12/2020 - 07:44

Thanks for all the cool solutions guys. I didn't try all of them obviously but i got it working :)

Last seen on 09:33, 21. Nov 2020
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, what finally got it to…
Tue, 10/20/2020 - 02:15

Oh, what finally got it to work?