Adds a new enchantmentBlocklist option

The enchantmentBlocklist allows specifying a list of enchantments blacksmiths should be blocked from adding to items. Especially curse of binding and curse of vanishing are problematic as the effect is quite bad. Mending is possibly undesirable as it's supposed to be quite rare.
This commit is contained in:
2022-11-05 04:21:47 +01:00
parent 012d1df099
commit 89c1c4a56c
10 changed files with 118 additions and 9 deletions

View File

@@ -32,12 +32,27 @@ public final class TabCompleteValuesHelper {
case POSITIVE_DOUBLE -> getPositiveDoubles();
case STRING -> getStrings();
case PERCENTAGE -> getPercentages();
case STRING_LIST -> getReforgeAbleMaterials();
case REFORGE_ABLE_ITEMS -> getReforgeAbleMaterials();
case MATERIAL -> getAllReforgeAbleMaterials();
case ENCHANTMENT -> getAllEnchantments();
case STRING_LIST -> getExampleEnchantmentBlockLists();
};
}
/**
* Gets example enchantment block lists
*
* @return <p>Some example enchantment block lists</p>
*/
private static List<String> getExampleEnchantmentBlockLists() {
List<String> exampleBlockLists = new ArrayList<>();
exampleBlockLists.add(Enchantment.VANISHING_CURSE.getKey().getKey() + "," +
Enchantment.BINDING_CURSE.getKey().getKey() + "," + Enchantment.MENDING.getKey().getKey());
exampleBlockLists.add(Enchantment.VANISHING_CURSE.getKey().getKey() + "," +
Enchantment.BINDING_CURSE.getKey().getKey());
return exampleBlockLists;
}
/**
* Gets a complete list of all reforge-able materials
*