Skip to content

Feature request: Add a way to filter registry entries #2601

@MrHell228

Description

@MrHell228

Major SpongeAPI version

14

Is this likely to be a breaking change?

No

What are you requesting?

Datapacks allow to filter datapack registry entries via pack.mcmeta by their RegistryKey (https://minecraft.wiki/w/Pack.mcmeta).
So I think it would be nice to have ability to do the same with a plugin.
So that's the minimum of this request.
API 14 is a minimum version I see this feature could be implemented in because it will probably be a lifecycle registry event and they got updated a lot in API 14.

I also think the fact it's a plugin feature could allow to filter not only by registry key, but by the actual value as well.
Examplenary usage: Disable all vanilla recipes of the specific item.

Though I don't know what registries this should affect.
I guess it shouldn't allow to filter non-datapack vanilla registries because it will likely break a lot of things.
But should it affect custom registries? Maybe custom registries could declare if they want to be filtered?

I don't really feel like implementing it myself but would be happy if someone decides to so that's why it's a feature request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triage

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions