mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Enchantment are now sorted on select gui.
This commit is contained in:
parent
9b3402e45f
commit
b70887c5ca
2 changed files with 6 additions and 6 deletions
|
|
@ -152,10 +152,10 @@ public class CAEnchantmentRegistry {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a map of all the registered enchantments.
|
* Gets a map of all the registered enchantments.
|
||||||
* @return Map of enchantments.
|
* @return Immutable map of enchantments.
|
||||||
*/
|
*/
|
||||||
public Map<NamespacedKey, CAEnchantment> registeredEnchantments() {
|
public Map<NamespacedKey, CAEnchantment> registeredEnchantments() {
|
||||||
return byKeyMap;
|
return Collections.unmodifiableMap(byKeyMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -178,7 +178,7 @@ public class CAEnchantmentRegistry {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get "clean optimised operation" for get enchantments.
|
* Get "clean optimised operation" for get enchantments.
|
||||||
* @return Get mutable "clean enchantments optimised operation" list.
|
* @return Mutable "clean enchantments optimised operation" list.
|
||||||
*/
|
*/
|
||||||
public List<BulkCleanEnchantOperation> getOptimisedCleanOperators() {
|
public List<BulkCleanEnchantOperation> getOptimisedCleanOperators() {
|
||||||
return optimisedCleanOperators;
|
return optimisedCleanOperators;
|
||||||
|
|
@ -186,7 +186,7 @@ public class CAEnchantmentRegistry {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get "get optimised operation" for get enchantments.
|
* Get "get optimised operation" for get enchantments.
|
||||||
* @return Get mutable "get enchantments optimised operation" list.
|
* @return Mutable "get enchantments optimised operation" list.
|
||||||
*/
|
*/
|
||||||
public List<BulkGetEnchantOperation> getOptimisedGetOperators() {
|
public List<BulkGetEnchantOperation> getOptimisedGetOperators() {
|
||||||
return optimisedGetOperators;
|
return optimisedGetOperators;
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,9 @@ public class EnchantSelectSettingGui extends SettingGuiListConfigGui<CAEnchantme
|
||||||
protected Collection<CAEnchantment> getEveryDisplayableInstanceOfGeneric() {
|
protected Collection<CAEnchantment> getEveryDisplayableInstanceOfGeneric() {
|
||||||
Stream<CAEnchantment> toDisplayStream;
|
Stream<CAEnchantment> toDisplayStream;
|
||||||
if(this.displayUnselected){
|
if(this.displayUnselected){
|
||||||
toDisplayStream = CAEnchantmentRegistry.getInstance().values().stream();
|
toDisplayStream = CAEnchantmentRegistry.getInstance().getNameSortedEnchantments().stream();
|
||||||
}else{
|
}else{
|
||||||
toDisplayStream = this.selectedEnchant.stream();
|
toDisplayStream = this.selectedEnchant.stream().sorted(Comparator.comparing(CAEnchantment::getName));
|
||||||
}
|
}
|
||||||
Set<CAEnchantment> illegalEnchantments = this.enchantContainer.illegalEnchantments();
|
Set<CAEnchantment> illegalEnchantments = this.enchantContainer.illegalEnchantments();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue