| Modifier and Type | Field and Description |
|---|---|
static Port[] |
CLOCKWISE
List of ports in a clockwise fashion, starting at
UP. |
static Port[] |
HORIZONTAL
Mapping of
EnumFacings to a horizontal Port equivalent. |
static Port[] |
OPPOSITES
Mapping ports to their opposites (by ordinal()).
|
static Port[] |
ROTATED
Mapping of port to next port in clockwise order.
|
static int[] |
ROTATION
Mapping of port id to rotation relative to
UP. |
static Port[] |
VALUES
All possible enum values for quick indexing.
|
| Modifier and Type | Method and Description |
|---|---|
static Port |
fromEnumFacing(net.minecraft.util.EnumFacing facing)
Convert a facing from Forge's format to a port, assuming a top or bottom face.
|
static Port |
fromUVQuadrant(net.minecraft.util.Vec3 uv)
Convert a UV coordinate to the port on the side of the quadrant the UV
coordinate falls into.
|
Port |
getOpposite()
The the opposite port to this one.
|
Port |
rotated()
Get the next port in clockwise rotation.
|
Port |
rotated(int steps)
Get the n-th next port in clockwise rotation.
|
static Port |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Port[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Port LEFT
public static final Port RIGHT
public static final Port UP
public static final Port DOWN
public static final Port[] VALUES
public static final Port[] OPPOSITES
public static final Port[] ROTATED
public static final Port[] CLOCKWISE
UP.public static final int[] ROTATION
UP.public static Port[] values()
for (Port c : Port.values()) System.out.println(c);
public static Port valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic Port getOpposite()
OPPOSITESpublic Port rotated()
public Port rotated(int steps)
steps - how many steps to make.public static Port fromEnumFacing(net.minecraft.util.EnumFacing facing)
facing - the facing to convert.Port representing that facing.public static Port fromUVQuadrant(net.minecraft.util.Vec3 uv)
uv - the UV coordinate in (0,0,0) to (1,1,0).