Package net.minecraft.enchantment
Enum EnchantmentType
- java.lang.Object
-
- java.lang.Enum<EnchantmentType>
-
- net.minecraft.enchantment.EnchantmentType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EnchantmentType>
,IExtensibleEnum
public enum EnchantmentType extends java.lang.Enum<EnchantmentType> implements IExtensibleEnum
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ARMOR
ARMOR_CHEST
ARMOR_FEET
ARMOR_HEAD
ARMOR_LEGS
BOW
BREAKABLE
CROSSBOW
DIGGER
FISHING_ROD
TRIDENT
VANISHABLE
WEAPON
WEARABLE
-
Constructor Summary
Constructors Modifier Constructor Description private
EnchantmentType()
private
EnchantmentType(java.util.function.Predicate<Item> delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canEnchant(Item p_77557_1_)
static EnchantmentType
create(java.lang.String name, java.util.function.Predicate<Item> delegate)
static EnchantmentType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EnchantmentType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.minecraftforge.common.IExtensibleEnum
init
-
-
-
-
Enum Constant Detail
-
ARMOR
public static final EnchantmentType ARMOR
-
ARMOR_FEET
public static final EnchantmentType ARMOR_FEET
-
ARMOR_LEGS
public static final EnchantmentType ARMOR_LEGS
-
ARMOR_CHEST
public static final EnchantmentType ARMOR_CHEST
-
ARMOR_HEAD
public static final EnchantmentType ARMOR_HEAD
-
WEAPON
public static final EnchantmentType WEAPON
-
DIGGER
public static final EnchantmentType DIGGER
-
FISHING_ROD
public static final EnchantmentType FISHING_ROD
-
TRIDENT
public static final EnchantmentType TRIDENT
-
BREAKABLE
public static final EnchantmentType BREAKABLE
-
BOW
public static final EnchantmentType BOW
-
WEARABLE
public static final EnchantmentType WEARABLE
-
CROSSBOW
public static final EnchantmentType CROSSBOW
-
VANISHABLE
public static final EnchantmentType VANISHABLE
-
-
Field Detail
-
delegate
private java.util.function.Predicate<Item> delegate
-
-
Constructor Detail
-
EnchantmentType
private EnchantmentType()
-
EnchantmentType
private EnchantmentType(java.util.function.Predicate<Item> delegate)
-
-
Method Detail
-
values
public static EnchantmentType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EnchantmentType c : EnchantmentType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EnchantmentType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
create
public static EnchantmentType create(java.lang.String name, java.util.function.Predicate<Item> delegate)
-
canEnchant
public boolean canEnchant(Item p_77557_1_)
-
-