Package net.minecraft.util
Enum Direction.Axis
- java.lang.Object
-
- java.lang.Enum<Direction.Axis>
-
- net.minecraft.util.Direction.Axis
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Direction.Axis>
,java.util.function.Predicate<Direction>
,IStringSerializable
- Enclosing class:
- Direction
public static enum Direction.Axis extends java.lang.Enum<Direction.Axis> implements IStringSerializable, java.util.function.Predicate<Direction>
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,Direction.Axis>
BY_NAME
static com.mojang.serialization.Codec<Direction.Axis>
CODEC
private java.lang.String
name
private static Direction.Axis[]
VALUES
-
Constructor Summary
Constructors Modifier Constructor Description private
Axis(java.lang.String p_i49394_3_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static Direction.Axis
byName(java.lang.String p_176717_0_)
abstract double
choose(double p_196051_1_, double p_196051_3_, double p_196051_5_)
abstract int
choose(int p_196052_1_, int p_196052_2_, int p_196052_3_)
java.lang.String
getName()
Direction.Plane
getPlane()
static Direction.Axis
getRandom(java.util.Random p_239634_0_)
java.lang.String
getSerializedName()
boolean
isHorizontal()
boolean
isVertical()
boolean
test(Direction p_test_1_)
java.lang.String
toString()
static Direction.Axis
valueOf(java.lang.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 Detail
-
X
public static final Direction.Axis X
-
Y
public static final Direction.Axis Y
-
Z
public static final Direction.Axis Z
-
-
Field Detail
-
VALUES
private static final Direction.Axis[] VALUES
-
CODEC
public static final com.mojang.serialization.Codec<Direction.Axis> CODEC
-
BY_NAME
private static final java.util.Map<java.lang.String,Direction.Axis> BY_NAME
-
name
private final java.lang.String name
-
-
Method Detail
-
values
public static Direction.Axis[] 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 (Direction.Axis c : Direction.Axis.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Direction.Axis 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
-
byName
@Nullable public static Direction.Axis byName(java.lang.String p_176717_0_)
-
getName
public java.lang.String getName()
-
isVertical
public boolean isVertical()
-
isHorizontal
public boolean isHorizontal()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<Direction.Axis>
-
getRandom
public static Direction.Axis getRandom(java.util.Random p_239634_0_)
-
test
public boolean test(@Nullable Direction p_test_1_)
- Specified by:
test
in interfacejava.util.function.Predicate<Direction>
-
getPlane
public Direction.Plane getPlane()
-
getSerializedName
public java.lang.String getSerializedName()
- Specified by:
getSerializedName
in interfaceIStringSerializable
-
choose
public abstract int choose(int p_196052_1_, int p_196052_2_, int p_196052_3_)
-
choose
public abstract double choose(double p_196051_1_, double p_196051_3_, double p_196051_5_)
-
-