Spawning particles from a specific side of the entity

Started by MeguMugi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Spawning particles from a specific side of the entity

Hello!

I need some help with particles. I have a flying entity and I want to spawn particles when it moves, but I have a problem that they dont rotate with the entity. 

I assume I have to use the entity look vectors somehow, but I really am not sure how... 

ImageImage

 

(red dots are actual position, green dots is where i want them to spawn from. values in the spawn particle blocks are to be adjusted too tho, but they dont rotate either way) 

 

Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
the images aren't showing up…
Thu, 09/11/2025 - 20:01

the images aren't showing up for me, attach an imgur link using the image option or something

ok so ... if you mean you want to make the particles spawn a little distance in front of the mob in the direction that it's looking, then in the particle spawn procedure, go into entity procedures > data and find the block that gets the rotation angle of the entity relative to S.

then in the block that you're using to spawn the particles, replace the [x] value with [x + cos(rotation angle of mob)] and [z] with [z + sin(rotation angle of mob)]

if the particles aren't spawning on the correct side of the mob then let me know