Make a laser line of particles between two entities of the same type

Started by Joshmaker on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a laser line of particles between two entities of the same type

Basically, I have an entity that acts as a stationary metal rod. When another rod is spawned nearby, I want a few things to happen:

1) the rod detects the new other rod entity

2) a line of particles spawn between the two of them like a laser. 
I’ve been playing around with procedures for a while and I’m stumped on how to make the entity detect the same entity in a radius, without counting itself in that equation.