ResourceFilter

class ResourceFilter(val stage: ResourceFilter.Stage, val type: ResourceFilter.Type, val filter: Regex, val directory: String? = null)

Filters files from the resource pack based on the specified criteria.

Parameters

stage

The stage at which the filter is applied.

type

The type of filter (whitelist or blacklist).

filter

The regex pattern to match file paths against.

directory

An optional directory to which the filter is scoped, or null for global application.

Constructors

Link copied to clipboard
constructor(stage: ResourceFilter.Stage, type: ResourceFilter.Type, filterWildcard: String, directory: String? = null)

Creates a new ResourceFilter using a wildcard pattern.

constructor(stage: ResourceFilter.Stage, type: ResourceFilter.Type, filter: Regex, directory: String? = null)

Types

Link copied to clipboard

The type of pattern used for filtering.

Link copied to clipboard

The stage at which the filter is applied.

Link copied to clipboard

The type of filter.

Properties

Link copied to clipboard
val directory: String? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun allows(path: String): Boolean

Checks whether the given path is allowed by this filter.