public class ElementRotation
extends java.lang.Object
implements net.kyori.examination.Examinable
Element
rotations in a single axis| Modifier and Type | Class and Description |
|---|---|
static class |
ElementRotation.Builder
Builder implementation for creating
ElementRotation instances |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_RESCALE |
| Modifier and Type | Method and Description |
|---|---|
float |
angle()
Returns the actual rotation angle,
must a multiple of 22.5 and exist in
range of [-45.0, 45.0]
|
ElementRotation |
angle(float angle) |
Axis3D |
axis()
Returns the axis of the element
rotation, because elements can only
use rotation in a single axis
|
ElementRotation |
axis(Axis3D axis) |
static ElementRotation.Builder |
builder()
Static factory method for instantiating our
builder implementation
|
boolean |
equals(java.lang.Object o) |
@NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> |
examinableProperties() |
int |
hashCode() |
static ElementRotation |
of(Vector3Float origin,
Axis3D axis,
float angle,
boolean rescale)
Creates a new
ElementRotation instance
from the provided values |
Vector3Float |
origin()
Returns the rotation origin, a.k.a.
|
ElementRotation |
origin(Vector3Float origin) |
boolean |
rescale()
Returns true if faces will be
scaled across the whole block
|
ElementRotation |
rescale(boolean rescale) |
java.lang.String |
toString() |
public static final boolean DEFAULT_RESCALE
public Vector3Float origin()
public Axis3D axis()
public float angle()
public boolean rescale()
public ElementRotation origin(Vector3Float origin)
public ElementRotation axis(Axis3D axis)
public ElementRotation angle(float angle)
public ElementRotation rescale(boolean rescale)
@NotNull public @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
examinableProperties in interface net.kyori.examination.Examinablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static ElementRotation of(Vector3Float origin, Axis3D axis, float angle, boolean rescale)
ElementRotation instance
from the provided valuesorigin - The rotation origin or pivotaxis - The rotation axisangle - The rotation angle (value)rescale - Whether to rescale the faces
to the whole blockElementRotation instancepublic static ElementRotation.Builder builder()
ElementRotation
instances