Search in sources :

Example 1 with SpongeSelectorSortAlgorithm

use of org.spongepowered.common.command.selector.SpongeSelectorSortAlgorithm in project SpongeCommon by SpongePowered.

the class SpongeRegistryLoaders method selectorSortAlgorithm.

public static RegistryLoader<SelectorSortAlgorithm> selectorSortAlgorithm() {
    return RegistryLoader.of(l -> {
        l.add(SelectorSortAlgorithms.ORDER_ARBITRARY, k -> new SpongeSelectorSortAlgorithm(EntitySelectorParser.ORDER_ARBITRARY));
        l.add(SelectorSortAlgorithms.ORDER_FURTHEST, k -> new SpongeSelectorSortAlgorithm(EntitySelectorParser.ORDER_FURTHEST));
        l.add(SelectorSortAlgorithms.ORDER_NEAREST, k -> new SpongeSelectorSortAlgorithm(EntitySelectorParser.ORDER_NEAREST));
        l.add(SelectorSortAlgorithms.ORDER_RANDOM, k -> new SpongeSelectorSortAlgorithm(EntitySelectorParser.ORDER_RANDOM));
    });
}
Also used : SpongeSelectorSortAlgorithm(org.spongepowered.common.command.selector.SpongeSelectorSortAlgorithm)

Aggregations

SpongeSelectorSortAlgorithm (org.spongepowered.common.command.selector.SpongeSelectorSortAlgorithm)1