Class RootTransformsBuilder
java.lang.Object
net.neoforged.neoforge.client.model.generators.template.RootTransformsBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Quaternionfprivate static final Vector3fprivate @Nullable Vector3fprivate Quaternionfprivate Vector3fprivate Vector3f -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidcopyFrom(RootTransformsBuilder other) leftRotation(float x, float y, float z, boolean isDegrees) Sets the left rotation of the root transform.leftRotation(Quaternionf leftRotation) Sets the left rotation of the root transform.Sets the origin of the root transform.Sets the origin of the root transform.postRotation(float x, float y, float z, boolean isDegrees) Sets the right rotation of the root transform.postRotation(Quaternionf postRotation) Sets the right rotation of the root transform.rightRotation(float x, float y, float z, boolean isDegrees) Sets the right rotation of the root transform.rightRotation(Quaternionf rightRotation) Sets the right rotation of the root transform.rotation(float x, float y, float z, boolean isDegrees) Sets the left rotation of the root transform.rotation(Quaternionf rotation) Sets the left rotation of the root transform.scale(float scale) Sets the scale of the root transform.scale(float xScale, float yScale, float zScale) Sets the scale of the root transform.Sets the scale of the root transform.(package private) JsonObjecttoJson()transform(Transformation transformation) Sets the root transform.translation(float x, float y, float z) Sets the translation of the root transform.translation(Vector3f translation) Sets the translation of the root transform.private static JsonArraywriteQuaternion(Quaternionf quaternion) private static JsonArray
-
Field Details
-
ONE
-
translation
-
leftRotation
-
rightRotation
-
scale
-
origin
-
originVec
-
-
Constructor Details
-
RootTransformsBuilder
public RootTransformsBuilder()
-
-
Method Details
-
translation
Sets the translation of the root transform.- Parameters:
translation- the translation- Returns:
- this builder
- Throws:
NullPointerException- iftranslationisnull
-
translation
Sets the translation of the root transform.- Parameters:
x- x translationy- y translationz- z translation- Returns:
- this builder
-
rotation
Sets the left rotation of the root transform.- Parameters:
rotation- the left rotation- Returns:
- this builder
- Throws:
NullPointerException- ifrotationisnull
-
rotation
Sets the left rotation of the root transform.- Parameters:
x- x rotationy- y rotationz- z rotationisDegrees- whether the rotation is in degrees or radians- Returns:
- this builder
-
leftRotation
Sets the left rotation of the root transform.- Parameters:
leftRotation- the left rotation- Returns:
- this builder
- Throws:
NullPointerException- ifleftRotationisnull
-
leftRotation
Sets the left rotation of the root transform.- Parameters:
x- x rotationy- y rotationz- z rotationisDegrees- whether the rotation is in degrees or radians- Returns:
- this builder
-
rightRotation
Sets the right rotation of the root transform.- Parameters:
rightRotation- the right rotation- Returns:
- this builder
- Throws:
NullPointerException- ifrightRotationisnull
-
rightRotation
Sets the right rotation of the root transform.- Parameters:
x- x rotationy- y rotationz- z rotationisDegrees- whether the rotation is in degrees or radians- Returns:
- this builder
-
postRotation
Sets the right rotation of the root transform.- Parameters:
postRotation- the right rotation- Returns:
- this builder
- Throws:
NullPointerException- ifrightRotationisnull
-
postRotation
Sets the right rotation of the root transform.- Parameters:
x- x rotationy- y rotationz- z rotationisDegrees- whether the rotation is in degrees or radians- Returns:
- this builder
-
scale
Sets the scale of the root transform.- Parameters:
scale- the scale- Returns:
- this builder
-
scale
Sets the scale of the root transform.- Parameters:
xScale- x scaleyScale- y scalezScale- z scale- Returns:
- this builder
-
scale
Sets the scale of the root transform.- Parameters:
scale- the scale vector- Returns:
- this builder
- Throws:
NullPointerException- ifscaleisnull
-
transform
Sets the root transform.- Parameters:
transformation- the transformation to use- Returns:
- this builder
- Throws:
NullPointerException- iftransformationisnull
-
origin
Sets the origin of the root transform.- Parameters:
origin- the origin vector- Returns:
- this builder
- Throws:
NullPointerException- iforiginisnull
-
origin
Sets the origin of the root transform.- Parameters:
origin- the origin name- Returns:
- this builder
- Throws:
NullPointerException- iforiginisnullIllegalArgumentException- iforiginis notcenter,corneroropposing-corner
-
toJson
JsonObject toJson() -
writeVec3
-
writeQuaternion
-
copyFrom
-