Skip to content

ItemStack#setType is heavy when the itemstack got a bunch of display name and lore #5071

@MiniDigger

Description

@MiniDigger

plugin in question here calls ItemStack#setType to DIAMOND_PICKAXE, to call getDrops using the tool and getting the right drops. replacing that with new ItemStack(DIAMOND_PICKAXE) avoided this issue

https://spark.lucko.me/#YnTs0gpbw1
https://i.imgur.com/NnRvM3o.png

we should be able to avoid the reparsing here, doesnt seem necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: performancestatus: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions