New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send particlespawners on load mapblock #6121
Comments
Seems expected behaviour. Did this not happen before that commit? |
I'm not sure, will have to test. Why would that behavior be expected? In the case of a particlespawner I'd personally expect it to be applied to all clients in the area, considering that it is just a continuous spawning of particles (i.e. if I were to simply use an ABM or nodetimer to spawn the particles individually, they are shown to all players in the area, so I'd expect that particles added with a particlespawner would also be shown to all players in the area whether they were there when the particlespawner was added or not). |
Updated my comment to explain. |
hmmm, I understand the current setup now. However, would it not make more sense for particlespawners to be sent to the client when they enter the mapblock, whether they were there when it was added or not? My understanding is that a particlespawner would be more efficient than using an ABM to spawn individual particles, so I'd expect that this would be the better solution. Maybe I should edit my initial post and change this to a feature request? |
@paramat Individual particles are too inefficient to be a general solution for particle spawners. I thought that particle spawners used to be sent to all players, but if not then it wouldn't be a big change to do so. Particle spawners spawned before a player joins could also be sent to the player if the particle spawner definition is kept around. @octacian Was the client that didn't see the particles connected to the server when the particle spawner was added? |
My commit linked here did origianlly not send particlespawners to distant clients, but was changed on request, so particlespawners are still sent to all clients at whatever distance and the distance checks are done per-particle. So i doubt my commit has caused a problem. I'm not sure if a mapblock needs to be loaded in a client for a particlespawner to be sent to that client.
Well, less efficient but for some situations a better method. Generally though, particlespawners are not meant to be used for long periods due to the issues this causes. |
This makes sense now. We had fireworks displays for 4th of July that many people complained they couldn't see. They must of been teleporting into the area "during" the already started show. |
It's possible that particle spawners have never been sent to clients that do not have that mapblock loaded, i'm not sure, could you test? if so there may be a good reason. For example if every particle spawner created on a server is sent to every connected player whether they have the mapblock loaded or not, those particle spawners are then running on those clients invisibly and unnecessarily. Loading aparticlespawner when the mapblock is loaded is problematic because they have a lifespan and a number of particles, so a custom particle spawner would have to be created with the remaining amount of time and particles, quite complex. Generally particlespawners are best having short lifetimes, like less than a minute. |
It's not that complex to send a particle with less time / particles left. The server keeps track of the lifetime of particle spawners already (for id allocation purposes) and you could obtain the time and particles easily from that and the particle spawner definition (which is not saved in the current code as far as I know). The particle spawner definition also includes the extent of particle spawning area, so you could determine how close a player is using it. It doesn't really matter for this issue whether implementing sending old particle spawners is tricky or hard, it's still a desirable feature and if it gets in people will be able to use it over and over. And it doesn't seem that tricky or hard. |
octacian if you intend this issue to be a request for the feature described in the previous post i'll add the label. |
@paramat That'd be good, I will try to edit the initial post. |
Related #4624 |
This is a duplicate of #4624 |
When a particlespawner is added to the world, it only affects clients that have the mapblock loaded at the time when the particlespawner was added. If a particular client does not have the mapblock in which the particlespawner was added loaded, then that client will not see any particles as a result of that spawner. However, if the client had the mapblock loaded at the time at which the particlespawner was added, particles are shown.
I am not suggesting that particlespawners be sent to all players, but rather that particlespawners be somehow attached to each mapblock and sent to each individual player as they load the particular block.
The text was updated successfully, but these errors were encountered: