World#getLastLightningBolt is a client-only method that returns an integer between 0 and 2 depending on how long ago the last lightning strike was. It's only used for rendering purposes. Using client-only methods in common code will crash the dedicated server.
To spawn a lightning bolt, create a new EntityLightningBolt and then call World#addWeatherEffect.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Do you not know how to create a new object? You must have a solid understanding of Java and OO programming in general before you can make a mod.
As I said in my previous post, please use Gist/Pastebin to post code.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
How do I spawn a lightning bolt with the following code I have everything set up it works as is but I want it to spawn lightning!
World#getLastLightningBolt is a client-only method that returns an integer between 0 and 2 depending on how long ago the last lightning strike was. It's only used for rendering purposes. Using client-only methods in common code will crash the dedicated server.
To spawn a lightning bolt, create a new EntityLightningBolt and then call World#addWeatherEffect.
In future, please use Gist or Pastebin to post logs/crash reports (if applicable) and code with syntax highlighting. To get syntax highlighting on Gist, give each file the appropriate extension (.java for Java code). To get syntax highlighting on Pastebin, select the language from the dropdown at the bottom of the page.
It's much easier to read code with proper formatting and syntax highlighting.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I still don't understand?!
Do you not know how to create a new object? You must have a solid understanding of Java and OO programming in general before you can make a mod.
As I said in my previous post, please use Gist/Pastebin to post code.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.