Enum Class Side
- All Implemented Interfaces:
Serializable,Comparable<Side>,Constable
It is intended to be used by RPCDevice APIs,
providing both convenience for the caller by providing a range of aliases, and also
stability, in case Mojang decide to rename the enum fields of the Direction
enum at some time in the future.
Sides come in two flavors. Absolute sides (north, south, west
and east) always refer to the same direction in the world. Relative sides
(front, back, left and right) are resolved against the
orientation of the device's container, and hence refer to different directions in the
world as that container is rotated. up and down are the same either way.
getDirection() returns the underlying direction as-is. For relative sides that
is a direction in the container's local frame, which must be rotated into world space
before use; see isRelative().
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SidebyIndex(int index) net.minecraft.core.DirectionbooleantoString()static SideReturns the enum constant of this class with the specified name.static Side[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOWN
-
down
-
d
-
UP
-
up
-
u
-
NORTH
-
north
-
n
-
SOUTH
-
south
-
s
-
WEST
-
west
-
w
-
EAST
-
east
-
e
-
BACK
-
back
-
b
-
FRONT
-
front
-
f
-
LEFT
-
left
-
l
-
RIGHT
-
right
-
r
-
-
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
-
byIndex
-
getDirection
public net.minecraft.core.Direction getDirection() -
isRelative
public boolean isRelative() -
toString
-