add vanity enchantment

This commit is contained in:
Sen 2025-07-31 01:45:29 +02:00
parent fb6b612934
commit 2d34d139c5
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
3 changed files with 20 additions and 2 deletions

View file

@ -507,6 +507,22 @@ public enum Enchantment implements Displayable, Identifyable
user.heal((int)((entity.arePotionsInverted() ? 0.2f : 1.0f) * (float)level));
}
}
},
VANITY("vanity", 2, EnchantmentType.ARMOR, "Transparenz") {
public int getMinEnchantability(int enchantmentLevel)
{
return 3;
}
public int getMaxEnchantability(int enchantmentLevel)
{
return this.getMinEnchantability(enchantmentLevel) + 20;
}
public int getMaxLevel()
{
return 1;
}
};
private static final String[] LEVELS = new String[] {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"};

View file

@ -878,6 +878,7 @@ public abstract class Items {
public static final ItemEnchantedBook enchanted_book_thorns_3 = get("enchanted_book_thorns_3");
public static final ItemEnchantedBook enchanted_book_unbreaking = get("enchanted_book_unbreaking");
public static final ItemEnchantedBook enchanted_book_unbreaking_3 = get("enchanted_book_unbreaking_3");
public static final ItemEnchantedBook enchanted_book_vanity = get("enchanted_book_vanity");
public static final ItemRocketLauncher rocket_launcher = get("rocket_launcher");
public static final ItemAmmo rocket = get("rocket");
public static final ItemPotion water_bottle = get("water_bottle");