mirror of
https://github.com/YouHaveTrouble/Enchantio.git
synced 2026-05-12 06:06:55 +00:00
refactor to allow adding enchants to arbitrary tags
This commit is contained in:
@@ -32,12 +32,14 @@ public interface EnchantioEnchant {
|
||||
|
||||
Iterable<EquipmentSlotGroup> getActiveSlots();
|
||||
|
||||
boolean canGetFromEnchantingTable();
|
||||
|
||||
TagKey<ItemType> getTagForSupportedItems();
|
||||
|
||||
Set<TagEntry<ItemType>> getSupportedItems();
|
||||
|
||||
Set<TagKey<Enchantment>> getEnchantTagKeys();
|
||||
|
||||
default TagKey<ItemType> getTagForSupportedItems() {
|
||||
return TagKey.create(RegistryKey.ITEM, Key.key( getKey().asString() + "_enchantable"));
|
||||
}
|
||||
|
||||
default TagEntry<Enchantment> getTagEntry() {
|
||||
return TagEntry.valueEntry(TypedKey.create(RegistryKey.ENCHANTMENT, getKey()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user