Skip to content

PreCreatureSpawnEvent getSpawnLocation() clones every time #12362

@ghost

Description

Spark Profile

https://spark.lucko.me/xttFcIZuCd

Description of issue

This event is quite hot so calling .clone() in every listener has a measurable performance impact, it'd be nice if we get a method that returns the spawn location directly without clone()

Image

Plugin and Datapack List

N/A

Server config files

N/A

Paper version

Paper 1.21.4 BUILD 222

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions