Enum Class EnchantmentSource
- All Implemented Interfaces:
Serializable, Comparable<EnchantmentSource>, Constable
Deprecated.
Determines where an enchantment has been loaded from.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EnchantmentSourcefromResourceSource(ResourceSource source) Deprecated.ResourceSourceshould be used instead of EnchantmentSource.booleanDeprecated.Returns whether this enchantment source is built-in and bundled in the vanilla or mod resources.Deprecated.Converts to the newResourceSourcewhich should be used instead of this class.static EnchantmentSourceDeprecated.Returns the enum constant of this class with the specified name.static EnchantmentSource[]values()Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VANILLA
Deprecated.An enchantment loaded from the vanilla data pack. -
MOD
Deprecated.An enchantment loaded from mods' bundled resources.This includes the additional builtin data packs registered by mods with Fabric Resource Loader.
-
DATA_PACK
Deprecated.An enchantment loaded from an external data pack.
-
-
Method Details
-
values
Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Deprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isBuiltin
-
toResourceSource
Deprecated.Converts to the newResourceSourcewhich should be used instead of this class.- Returns:
- The
ResourceSourceequivalent of this.
-
fromResourceSource
Deprecated.ResourceSourceshould be used instead of EnchantmentSource.Converts from the newResourceSourcewhich should be used instead of this class.- Parameters:
source- TheResourceSourceto convert from.- Returns:
- The
EnchantmentSourceequivalent of the given source.
-
ResourceSourceinstead.