public enum EnchantmentTableProperty extends Enum<EnchantmentTableProperty> implements WindowProperty
| Enum Constant and Description |
|---|
ENCHANTMENT_SLOT_1
The enchantment for slot 1.
|
ENCHANTMENT_SLOT_2
The enchantment for slot 2.
|
ENCHANTMENT_SLOT_3
The enchantment for slot 3.
|
LEVEL_SLOT_1
Level of the enchantment in slot 1.
|
LEVEL_SLOT_2
Level of the enchantment in slot 2.
|
LEVEL_SLOT_3
Level of the enchantment in slot 3.
|
XP_SEED
The seed used for the next enchantment.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getEnchantment(int type,
int level)
Packs enchantment type and level into one integer as used for the ENCHANTMENT_SLOT_X properties.
|
static int |
getEnchantmentLevel(int enchantmentInfo)
Unpacks the enchantment level from one integer as used for the ENCHANTMENT_SLOT_X properties.
|
static int |
getEnchantmentType(int enchantmentInfo)
Unpacks the enchantment type from one integer as used for the ENCHANTMENT_SLOT_X properties.
|
static EnchantmentTableProperty |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EnchantmentTableProperty[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EnchantmentTableProperty LEVEL_SLOT_1
public static final EnchantmentTableProperty LEVEL_SLOT_2
public static final EnchantmentTableProperty LEVEL_SLOT_3
public static final EnchantmentTableProperty XP_SEED
public static final EnchantmentTableProperty ENCHANTMENT_SLOT_1
getEnchantment(int, int)public static final EnchantmentTableProperty ENCHANTMENT_SLOT_2
getEnchantment(int, int)public static final EnchantmentTableProperty ENCHANTMENT_SLOT_3
getEnchantment(int, int)public static EnchantmentTableProperty[] values()
for (EnchantmentTableProperty c : EnchantmentTableProperty.values()) System.out.println(c);
public static EnchantmentTableProperty valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static int getEnchantment(int type,
int level)
type - Id of the enchantmentlevel - Level of the enchantmentgetEnchantmentType(int),
getEnchantmentLevel(int)public static int getEnchantmentType(int enchantmentInfo)
enchantmentInfo - Packed valuegetEnchantment(int, int)public static int getEnchantmentLevel(int enchantmentInfo)
enchantmentInfo - Packed valuegetEnchantment(int, int)Copyright © 2020. All rights reserved.