Skip to content

No alternative to entityType.isEnabledByFeature #11937

@ghost

Description

Is your feature request related to a problem?

There seems to be no alternative to entitytype.isenabledbyfeature

    /**
     * Gets if this EntityType is enabled by feature in a world.
     *
     * @param world the world to check
     * @return true if this EntityType can be used to spawn an Entity for this World.
     */
    @Deprecated(forRemoval = true, since = "1.20") // Paper
    public boolean isEnabledByFeature(@NotNull World world) {
        return Bukkit.getDataPackManager().isEnabledByFeature(this, world);
    }

I need to use this in order to generate a list of spawn eggs (excluding spawn eggs for experimental mobs)

Describe the solution you'd like.

Why is it marked for removal? It works fine, no reason is given in bukkit datapack manager either, it just suggests using paper data pack manager which has no feature flag related methods

/**
 * Manager of data packs.
 * @deprecated use {@link io.papermc.paper.datapack.DatapackManager}
 */
@Deprecated(forRemoval = true, since = "1.20") // Paper
public interface DataPackManager {

Describe alternatives you've considered.

just ignoring the deprecation?

Other

No response

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions