Started by
BobEsBeans
on
Topic category: Help with Minecraft modding (Java Edition)
Okay so I'm creating a mod that is supposed to spawn lightning and an explosion at half health once, and then another lightning strike every minute. Instead what I get it infinite lightning an explosions that look like lightning tornados, (could be a cool weather addon), but I've been trying to fix this literally all day with no luck, and I haven't found a solution in any of the forums I've found. Anyone have suggestions or know fixes?
Here are some images of code and results
wait, are you using it on a mob? I thought it was for players, did you set it to the tick update of your custom entity?
Yeah sorry my bad, i just checked my post and realized i neglected to say that. Yes its for a custom mob and yes i set it to the tick update of it. that's what fixed the server issue
alright, then you have to replace variables with NBT tags
https://imgur.com/rKXtJVy
I made mine work for Iron Golems as an example
okay so I did it but it still produces a lot of lightning bolts. Is it an issue with the tick updates or did i do something wrong and not catch it? I couldn't find the "on loaded entity tick update" in the additional triggers btw, so could it be that?
Set once to true needs to be outside of the wait block
i got it working, i changed the 200 on the bottom if to 210 earlier and forgot to change it back, that was what was causing the extra lightning. Thank you so much for your help!
ok, you're welcome