public static enum Direction.Axis extends Enum<Direction.Axis> implements StringIdentifiable, Predicate<Direction>
Modifier and Type | Field and Description |
---|---|
private static Map<String,Direction.Axis> |
BY_NAME |
static com.mojang.serialization.Codec<Direction.Axis> |
CODEC |
private String |
name |
private static Direction.Axis[] |
VALUES |
Modifier and Type | Method and Description |
---|---|
String |
asString() |
abstract double |
choose(double x,
double y,
double z) |
abstract int |
choose(int x,
int y,
int z) |
static Direction.Axis |
fromName(String name) |
String |
getName() |
Direction.Type |
getType() |
boolean |
isHorizontal() |
boolean |
isVertical() |
static Direction.Axis |
pickRandomAxis(Random random) |
boolean |
test(Direction direction) |
String |
toString() |
static Direction.Axis |
valueOf(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.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
createCodec, createCodec, method_28142
public static final Direction.Axis X
public static final Direction.Axis Y
public static final Direction.Axis Z
private static final Direction.Axis[] VALUES
public static final com.mojang.serialization.Codec<Direction.Axis> CODEC
private static final Map<String,Direction.Axis> BY_NAME
private final String name
public static Direction.Axis[] values()
for (Direction.Axis c : Direction.Axis.values()) System.out.println(c);
public static Direction.Axis valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Nullable public static Direction.Axis fromName(String name)
public String getName()
public boolean isVertical()
public boolean isHorizontal()
public String toString()
toString
in class Enum<Direction.Axis>
public static Direction.Axis pickRandomAxis(Random random)
public Direction.Type getType()
public String asString()
asString
in interface StringIdentifiable
public abstract int choose(int x, int y, int z)
public abstract double choose(double x, double y, double z)