LoadSelectorRegistry

Registry holding registered load selectors.

Load selectors decide which resources should be loaded as filters, when the resources are (re)loaded (when the game starts, the user changes resource packs, or presses F3+T).

Each load selector accepts the string representation of a selector, parses and evaluates it, and returns a boolean indicating if the resource should be loaded.

Functions

Link copied to clipboard
operator fun contains(selectorKey: String): Boolean

Checks if a load selector has been registered for the given key.

Link copied to clipboard
operator fun get(selectorKey: String): (String) -> Boolean?

Gets the load selector instance associated with the given key.

Link copied to clipboard
open operator override fun iterator(): Iterator<Pair<String, (String) -> Boolean>>
Link copied to clipboard
fun register(selectorKey: String, selector: (String) -> Boolean)

Registers the given load selector with the given key or throws an exception, if there was a selector or load selector registered for the given key.

Link copied to clipboard
fun tryRegister(selectorKey: String, selector: (String) -> Boolean): Boolean

Tries to register the given load selector with the given key.

Inherited functions

Link copied to clipboard
open fun forEach(p0: Consumer<in Pair<String, (String) -> Boolean>>)
Link copied to clipboard