Posted October 7, 20168 yr Okay, so I've got an item that will be used to shock the block the player is looking at, but I have no clue how I can make something that even remotely looks like lightning come from the wand to the block. Any ideas? - Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.
October 7, 20168 yr If you want actual lightning from the sky, you can add an EntityLightingBolt to the World 's weather effects. If you want something like the Thaumcraft lightning wand, you'd have to make a custom effect. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
October 7, 20168 yr Look at particles (e.g. sword slash). Weather lightning is an entity that can interact with other entities. If your wand's only effect is on a known target block (and the lightning is merely a visual effect) then particles may suffice. Also look at how a fishing rod casts its line (and how the line is rendered). The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
October 7, 20168 yr Author Well, it can also be used to deal damage to an entity, but I'm already raycasting, so I can do that easily. Basically, I just don't know how I would add in the visual effect. Particles don't seem right , because I'd like to be able to render the lightning bolt spanning variable distances based on how far the target is - Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.
October 8, 20168 yr Botania has some code to generate lightning bolt effects using the particle system. I'd recommend perusing that code (it's in the vazkii.botania.client.fx package), and refer to http://botaniamod.net/license.php if you want to use the code (the license is reasonably liberal).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.