public class Variant
extends java.lang.Object
implements net.kyori.examination.Examinable
| Modifier and Type | Class and Description |
|---|---|
static class |
Variant.Builder |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_UV_LOCK |
static int |
DEFAULT_WEIGHT |
static int |
DEFAULT_X_ROTATION |
static int |
DEFAULT_Y_ROTATION |
| Modifier and Type | Method and Description |
|---|---|
static Variant.Builder |
builder() |
boolean |
equals(java.lang.Object o) |
@NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> |
examinableProperties() |
int |
hashCode() |
net.kyori.adventure.key.Key |
model()
Returns the
Key instance which specifies
the new model location (resource location) |
java.lang.String |
toString() |
boolean |
uvLock()
Can be true or false (default).
|
int |
weight()
Sets the probability of the model for being used in the game,
defaults to 1 (=100%).
|
int |
x()
Returns the rotation of the model on the x-axis in
increments of 90 degrees
|
int |
y()
Returns the rotation of the model on the y-axis in
increments of 90 degrees
|
public static final int DEFAULT_X_ROTATION
public static final int DEFAULT_Y_ROTATION
public static final boolean DEFAULT_UV_LOCK
public static final int DEFAULT_WEIGHT
public net.kyori.adventure.key.Key model()
Key instance which specifies
the new model location (resource location)public int x()
public int y()
public boolean uvLock()
public int weight()
If more than one model is used for the same variant, the probability is calculated by dividing the individual model's weight by the sum of the weights of all models
@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 Variant.Builder builder()