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.

Properties

Link copied to clipboard
public final static LoadSelectorRegistry INSTANCE

Functions

Link copied to clipboard
public final Boolean contains(String selectorKey)

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

Link copied to clipboard
public final Function1<String, Boolean> get(String selectorKey)

Gets the load selector instance associated with the given key.

Link copied to clipboard
public Iterator<Pair<String, Function1<String, Boolean>>> iterator()
Link copied to clipboard
public final static Unit register(String selectorKey, Function1<String, Boolean> selector)

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
public final static Boolean tryRegister(String selectorKey, Function1<String, Boolean> selector)

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

Inherited functions

Link copied to clipboard
public Unit forEach(Consumer<? super Pair<String, Function1<String, Boolean>>> p0)
Link copied to clipboard
public Spliterator<Pair<String, Function1<String, Boolean>>> spliterator()