block-to-block laser beam

Started by lucasverweij@e… on

Topic category: Help with modding (Java Edition)

block-to-block laser beam

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?

Last seen on 22:49, 8. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you still want something…
Tue, 07/16/2024 - 20:38

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.

Last seen on 13:04, 5. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sin Costan please tell me…
Tue, 07/23/2024 - 13:31

Sin Costan please tell me how did you do it

Last seen on 22:49, 8. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's late for me, so I'll…
Thu, 07/25/2024 - 02:18

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.

Last seen on 13:04, 5. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I really need the "A line of…
Tue, 07/30/2024 - 15:06

I really need the "A line of particles is drawn between 2 points"  explanation

 

Last seen on 22:49, 8. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've put together a…
Tue, 07/30/2024 - 18:36

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)

Last seen on 13:04, 5. Sep 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Goddamn this is…
Wed, 07/31/2024 - 09:20

Goddamn this is complicated
Did you do it yourself?
Also big thank you

Last seen on 22:49, 8. Aug 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, I did it myself. And…
Wed, 07/31/2024 - 17:56

Yes, I did it myself.

And you are very welcome.

Last seen on 14:53, 19. Aug 2024
Joined Sep 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sin Costan would you mind…
Wed, 08/14/2024 - 02:51

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