EntitySpawnEvent with optional source ItemStack #10498
Prof-Bloodstone
started this conversation in
Ideas
Replies: 2 comments
-
I've looked into this before, and it's a tedious process to say the least. PRs welcome, but not a beginner issue :p |
Beta Was this translation helpful? Give feedback.
0 replies
-
There's no overriden method for example to create an entity from an item, so this would probably have to be done for each item that does this which requires a list of items that do it
and what am I missing? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem? Please describe.
I'd love to be able to modify the entity when it gets spawned from some ItemStack (spawn egg, boat, item frame, ...) and act on that.
Describe the solution you'd like
Ability to retrieve to retrieve source ItemStack which caused the Entity to spawn.
I think it'd make most sense to add it as nulllable value to existing EntitySpawnEvent, since other events like CreatureSpawnEvent and ProjectileLaunchEvent might potentially also use this.
Describe alternatives you've considered
Patching the server source code directly :/
Beta Was this translation helpful? Give feedback.
All reactions