-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add EntitySpawnByEntityEvent #12073
Comments
entities spawned by enemies, such as? Vanilla doesn't really have much of a "spawned by" concept, and I ponder the capability of exposing such a concept without having any form of proper cause API would just make such a concept be relatively broken in general, especially when it comes to determining what means it was "spawned by X" |
For example, a Jokey can spawn a vehicle, an egg can spawn a chicken, a small slime can be spawned by a dying big slime, an endermite can be spawned by a ender pearl, etc |
All of those generally sound okay, bar the slime one, as that falls into a really weird area as that's not considered a 'spawn' as such, that's effectively a transformation (and is already exposed in a specific event) |
You're right, there's already a |
All your examples can be covered with the entity spawn event and the spawn reason |
Yeah, but the |
This almost solves my problem. They nearly cover all the cases but jockey (and other compound entities), Vex and Evoker Fang(and other spells). EDIT: I hope this PR merge as soon as possible. By the way, what I want is a unified interface to get the spawner entity, instead of collecting the information everywhere |
Is your feature request related to a problem?
I'm currently making a roguelike plugin. I need to find out whether all the enemies are killed to accomplish a combat, so that's why I need to take those entities spawned by enemies into consideration (They should also be considered as enemies in this combat). So I wonder how can I find the entity who causes a spawn event.
Describe the solution you'd like.
Add
EntitySpawnByEntityEvent
which inheritsEntitySpawnEvent
Describe alternatives you've considered.
SpawnReason
to make it carry more contextgetWhoSpawn()
inEntitySpawnEvent
getWhoSpawn()
inEntity
Other
No response
The text was updated successfully, but these errors were encountered: