playing around with enchants

This commit is contained in:
2024-10-17 19:19:25 +02:00
commit 4010e88237
10 changed files with 435 additions and 0 deletions
@@ -0,0 +1,36 @@
package me.youhavetrouble.enchantio.enchants;
import io.papermc.paper.registry.data.EnchantmentRegistryEntry;
import io.papermc.paper.registry.keys.tags.ItemTypeTagKeys;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.inventory.EquipmentSlotGroup;
import java.util.Set;
public class SoulboundEnchant extends EnchantioEnchant {
public SoulboundEnchant() {
super(
Key.key("enchantio:soulbound"),
Component.translatable("enchantio.enchant.soulbound","Soulbound"),
1,
1,
10,
EnchantmentRegistryEntry.EnchantmentCost.of(1, 1),
EnchantmentRegistryEntry.EnchantmentCost.of(3, 1),
Set.of(
ItemTypeTagKeys.AXES,
ItemTypeTagKeys.PICKAXES,
ItemTypeTagKeys.SWORDS,
ItemTypeTagKeys.HOES,
ItemTypeTagKeys.SHOVELS,
ItemTypeTagKeys.ENCHANTABLE_BOW,
ItemTypeTagKeys.ENCHANTABLE_CROSSBOW,
ItemTypeTagKeys.ENCHANTABLE_MACE,
ItemTypeTagKeys.ENCHANTABLE_WEAPON,
ItemTypeTagKeys.ENCHANTABLE_ARMOR
),
Set.of(EquipmentSlotGroup.ANY)
);
registerEnchant(this);
}
}