Package net.minecraft.util.math
Enum Direction.Axis
- All Implemented Interfaces:
Serializable,Comparable<Direction.Axis>,java.lang.constant.Constable,Predicate<Direction>,StringIdentifiable
- Enclosing class:
- Direction
public static enum Direction.Axis extends Enum<Direction.Axis> implements StringIdentifiable, Predicate<Direction>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
-
Field Summary
Fields Modifier and Type Field Description private static Map<String,Direction.Axis>BY_NAMEstatic com.mojang.serialization.Codec<Direction.Axis>CODECprivate Stringnameprivate static Direction.Axis[]VALUES -
Constructor Summary
-
Method Summary
Modifier and Type Method Description StringasString()abstract doublechoose(double x, double y, double z)abstract intchoose(int x, int y, int z)static Direction.AxisfromName(String name)StringgetName()Direction.TypegetType()booleanisHorizontal()booleanisVertical()static Direction.AxispickRandomAxis(Random random)booleantest(Direction direction)StringtoString()static Direction.AxisvalueOf(String name)Returns the enum constant of this type with the specified name.static Direction.Axis[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
X
-
Y
-
Z
-
-
Field Details
-
VALUES
-
CODEC
-
BY_NAME
-
name
-
-
Constructor Details
-
Axis
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
fromName
-
getName
-
isVertical
public boolean isVertical() -
isHorizontal
public boolean isHorizontal() -
toString
- Overrides:
toStringin classEnum<Direction.Axis>
-
pickRandomAxis
-
test
-
getType
-
asString
- Specified by:
asStringin interfaceStringIdentifiable
-
choose
public abstract int choose(int x, int y, int z) -
choose
public abstract double choose(double x, double y, double z)
-