[SPIGOT-4937] Spawning entities per player with packets Created: 15/May/19  Updated: 16/May/19

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Minor
Reporter: Tamás Ádám Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: entity, spigot

Attachments: PNG File 2019-05-15_11.49.27.png    
Version: LATEST
Guidelines Read: Yes

 Description   

As far as I'm concerned, spawning entities per player (just like sending blockchanges, or playing effects, particles, sounds per player) would be a really welcomed feature, and would made messing with NMS to achieve the same result unnecessary.

 

Now that I'm thinking maybe spawning falling blocks per player would be also neat!

 

player.spawnEntity(Location, EntityType)


 Comments   
Comment by Tamás Ádám [ 16/May/19 ]

Yes, I see your point, you're right. I guess I'll keep using NMS then!

Comment by md_5 [ 15/May/19 ]

Spawning an entity is completely reasonable and simple.

 

The problem is the next request will then be actually doing stuff to that spawned entity which is essentially limitless.

 

Eg next it'll be apply potion effects to the spawned entity, add it as a passenger to another entity, teleport it, etc etc etc (or even as you suggest make it flow with a custom name - that in itself is outside of what you've suggested here)

 

 

The alternative, closer to what Bjarne described above would be a vanish API for entities, but then someone else will complain eg that they lag the server too much or cause collisions or something

Comment by Tamás Ádám [ 15/May/19 ]

I agree, that this feature request raises many questions and potential problems. To be honest, many of these didn't came to my mind. :'D The thing is, I use NMS now to spawn glowing blocks. To be precise, I spawn an invisible shulker or falling block, set it glowing, and set it's custom name. So I end up with something like shown on the screenshot. Of course I use this only for visualization purposes. So as you sad, these entities are just "statues", that are despawned after 20-30 seconds.

Comment by Bjarne Koll [ 15/May/19 ]

A few problems I have with this:

Are the entities that are spawned for the player ticked by the server anyway ? If not it will just be a lifeless statue.

What ID is assigned to the entity ? The next available one would be taken by the next world entity and therefore the two would overlap.

Would those entities be targettable by other plugins ? Are they stored ? Both of those would require spigot to track a virtual non existing entity. There was a PR concerning virtual entities. I am sure you can try your best to implement such a request yourself, but this sound much more like a job for a third party API.

To be quite honest, this (at least in my opinion) does not feel like a goal of the spigot API to be a representation of a minecraft server. Sounds particles and block changes are a one time packet and it makes sense to have a simple way to use them, but entities are a lot closer to the actual world.

Generated at Thu Dec 18 08:12:52 UTC 2025 using Jira 10.3.15#10030015-sha1:909cc43d292ca09e774c1a243d9819be3f2628cd.