SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Filter or only display particles to certain players

Open fingoltin opened this issue 7 years ago • 5 comments

There doesn't seem to be anything related to this in the Viewer interface. Is this functionality possible?

fingoltin avatar Aug 04 '18 02:08 fingoltin

Not currently in the API. IMO it's kind of weird that the Viewer interfaces show it to all nearby players, I would have expected spawning particles in the world to do that, not spawning them on a viewer.

https://github.com/SpongePowered/SpongeAPI/blob/a1418ae3fccbfa1fbc56e05d2f3375dcd1344e1c/src/main/java/org/spongepowered/api/effect/Viewer.java#L49-L68

ryantheleach avatar Aug 04 '18 07:08 ryantheleach

Every Player is a Viewer, so you can just send it to a specific player.

Cybermaxke avatar Aug 04 '18 08:08 Cybermaxke

In that case the docs should reflect the difference between players and worlds.

fingoltin avatar Aug 04 '18 11:08 fingoltin

(I know it's not entirely relevant to the API, but this is possible with vanilla commands in 1.12 (as of which version it was possible, I'm not sure))

/particle angryVillager ~ ~ ~ 1 1 1 1 1 normal ewoutvs_ Will show a particle around the command source, that only shows to ewoutvs_ .

I feel like the location for the behavior of showing particles to users is definitely on the Viewer interface, and fits this message signature, but the JD are "wrong", and the current behavior is "wrong" in that it matches the JD.

Edit:

Sorry, my bad, retested, particles are "Correctly" shown to only this viewer using this method, just tested this with simonflash.

image

It's only the JD that need fixing.

ryantheleach avatar Aug 04 '18 15:08 ryantheleach

I assume this goes for all Viewer methods, @ryantheleach?

fingoltin avatar Aug 09 '18 14:08 fingoltin