mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-10 07:49:10 +00:00
* adding enchantments added enchantments, changed minor apis to ensure c# stays synced with the c++ server * add missing enchant apis, oops * add proper docs, and fix namings for stuff in itemmeta --------- Co-authored-by: sylvessa <225480449+sylvessa@users.noreply.github.com>
27 lines
821 B
C#
27 lines
821 B
C#
using Minecraft.Server.FourKit.Inventory;
|
|
|
|
namespace Minecraft.Server.FourKit.Enchantments;
|
|
|
|
public class InfinityEnchantment : Enchantment
|
|
{
|
|
static readonly Material[] supportedItems = {
|
|
Material.BOW
|
|
};
|
|
|
|
static readonly EnchantmentType[] conflictedEnchants = { };
|
|
|
|
public override bool canEnchantItem(ItemStack item) => supportedItems.Contains(item.getType());
|
|
|
|
public override bool conflictsWith(Enchantment other) => conflictedEnchants.Contains(other.getEnchantType());
|
|
|
|
public override EnchantmentTarget getItemTarget() => EnchantmentTarget.BOW;
|
|
|
|
public override EnchantmentType getEnchantType() => EnchantmentType.ARROW_INFINITE;
|
|
|
|
public override int getMaxLevel() => 1;
|
|
|
|
public override string getName() => "infinity";
|
|
|
|
public override int getStartLevel() => 1;
|
|
}
|