Enum Class ItemMatch.Match
- All Implemented Interfaces:
Serializable, Comparable<ItemMatch.Match>, Constable, net.minecraft.util.StringRepresentable
- Enclosing class:
ItemMatch
public static enum ItemMatch.Match
extends Enum<ItemMatch.Match>
implements net.minecraft.util.StringRepresentable
How a stack is compared with a rule's.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable
net.minecraft.util.StringRepresentable.EnumCodec<E>, net.minecraft.util.StringRepresentable.StringRepresentableCodec<S> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ItemMatch.Match> Saved as"item","exact","contains".Fields inherited from interface net.minecraft.util.StringRepresentable
PRE_BUILT_MAP_THRESHOLD -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemMatch.MatchReturns the enum constant of this class with the specified name.static ItemMatch.Match[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ITEM
The kind of item only. -
EXACT
The same item, count and components; no components set means a plain item. -
CONTAINS
The same item and at least the components set; none set means any variant.
-
-
Field Details
-
CODEC
Saved as"item","exact","contains".
-
-
Method Details
-
values
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
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
-
getSerializedName
- Specified by:
getSerializedNamein interfacenet.minecraft.util.StringRepresentable
-