Skip to content

EntitySpawnEvent with optional source ItemStack #4795

@Prof-Bloodstone

Description

@Prof-Bloodstone

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 :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedCommunity assistance requested, PRs welcome.status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.type: featureRequest for a new Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions