Started by
lucasverweij@e…
on
Topic category: Help with Minecraft modding (Java Edition)
hello! im trying to make a technology based mod, and to keep it a bit vannila, i decided i woud use special lighting rods to transport the power. this works, but i want a visual laser/electricity beam to connect 2 lightingrods togeather.
is there any good way to do this?
One option would be particles
If you still want something like this, I might be of assistance to you. I have already made something similar to what you are looking for: https://imgur.com/F9OxGHR
If you want my help, just let me know.
Sin Costan please tell me how did you do it
It's late for me, so I'll give a fairly simple explanation here:
I used a custom block to attach an 'on tick update' procedure that checks each block a certain distance above itself and see if any of them are the same block. Once it finds one it draws an invisible line from itself up to the coordinates of the found block, and creates two randomly offset points, one being 1/3rd down the line, and the other being 2/3rds down the line. After doing so, a line of particles is drawn three times, connecting each point in a chain to achieve the electricity effect.
If there's anything you don't understand or can't figure out, just let me know here and I'll help you when I can.
I really need the "A line of particles is drawn between 2 points" explanation
I've put together a procedure that draws a straight line of particles to the block above it, if the conditions are met: https://file.io/WSIvpjcNtaj5
I added a bunch of comments within the procedure explaining what the different parts do, I hope it helps you understand how it works. I recommend putting this procedure into your block's tick update trigger, and making sure that the block ticks automatically.
You'll also want to change the dirt blocks to whatever block you want it to connect to, as well as change the particle type to whatever you like.
Again, this procedure draws a straight line, if you want it to 'zigzag' like electricity, you'll have to implement that on your own. (I am willing to explain how, but I will not do it for you)
Goddamn this is complicated
Did you do it yourself?
Also big thank you
Yes, I did it myself.
And you are very welcome.
Sin Costan would you mind sending a screenshot or a ptpl of your procedure i really want to try and use this for a lazer eyes move and im not sure how you got it to look so good