Class ModelBuilder.RootTransformsBuilder
java.lang.Object
net.minecraftforge.client.model.generators.ModelBuilder.RootTransformsBuilder
- Enclosing class:
- ModelBuilder<T extends ModelBuilder<T>>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate org.joml.Quaternionfprivate static final org.joml.Vector3fprivate @Nullable org.joml.Vector3fprivate org.joml.Quaternionfprivate org.joml.Vector3fprivate org.joml.Vector3f
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionend()Finish configuring the parent builderleftRotation(float x, float y, float z, boolean isDegrees) Sets the left rotation of the root transform.leftRotation(org.joml.Quaternionf leftRotation) Sets the left rotation of the root transform.Sets the origin of the root transform.origin(org.joml.Vector3f origin) 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(org.joml.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(org.joml.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(org.joml.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.scale(org.joml.Vector3f scale) Sets the scale of the root transform.com.google.gson.JsonObjecttoJson()transform(Transformation transformation) Sets the root transform.translation(float x, float y, float z) Sets the translation of the root transform.translation(org.joml.Vector3f translation) Sets the translation of the root transform.private static com.google.gson.JsonArraywriteQuaternion(org.joml.Quaternionf quaternion) private static com.google.gson.JsonArraywriteVec3(org.joml.Vector3f vector) 
- 
Field Details- 
ONEprivate static final org.joml.Vector3f ONE
- 
translationprivate org.joml.Vector3f translation
- 
leftRotationprivate org.joml.Quaternionf leftRotation
- 
rightRotationprivate org.joml.Quaternionf rightRotation
- 
scaleprivate org.joml.Vector3f scale
- 
origin
- 
originVec@Nullable private @Nullable org.joml.Vector3f originVec
 
- 
- 
Constructor Details- 
RootTransformsBuilderRootTransformsBuilder()
 
- 
- 
Method Details- 
translationSets the translation of the root transform.- Parameters:
- translation- the translation
- Returns:
- this builder
- Throws:
- NullPointerException- if- translationis- null
 
- 
translationSets the translation of the root transform.- Parameters:
- x- x translation
- y- y translation
- z- z translation
- Returns:
- this builder
 
- 
rotationSets the left rotation of the root transform.- Parameters:
- rotation- the left rotation
- Returns:
- this builder
- Throws:
- NullPointerException- if- rotationis- null
 
- 
rotationSets the left rotation of the root transform.- Parameters:
- x- x rotation
- y- y rotation
- z- z rotation
- isDegrees- whether the rotation is in degrees or radians
- Returns:
- this builder
 
- 
leftRotationSets the left rotation of the root transform.- Parameters:
- leftRotation- the left rotation
- Returns:
- this builder
- Throws:
- NullPointerException- if- leftRotationis- null
 
- 
leftRotationpublic ModelBuilder<T>.RootTransformsBuilder leftRotation(float x, float y, float z, boolean isDegrees) Sets the left rotation of the root transform.- Parameters:
- x- x rotation
- y- y rotation
- z- z rotation
- isDegrees- whether the rotation is in degrees or radians
- Returns:
- this builder
 
- 
rightRotationSets the right rotation of the root transform.- Parameters:
- rightRotation- the right rotation
- Returns:
- this builder
- Throws:
- NullPointerException- if- rightRotationis- null
 
- 
rightRotationpublic ModelBuilder<T>.RootTransformsBuilder rightRotation(float x, float y, float z, boolean isDegrees) Sets the right rotation of the root transform.- Parameters:
- x- x rotation
- y- y rotation
- z- z rotation
- isDegrees- whether the rotation is in degrees or radians
- Returns:
- this builder
 
- 
postRotationSets the right rotation of the root transform.- Parameters:
- postRotation- the right rotation
- Returns:
- this builder
- Throws:
- NullPointerException- if- rightRotationis- null
 
- 
postRotationpublic ModelBuilder<T>.RootTransformsBuilder postRotation(float x, float y, float z, boolean isDegrees) Sets the right rotation of the root transform.- Parameters:
- x- x rotation
- y- y rotation
- z- z rotation
- isDegrees- whether the rotation is in degrees or radians
- Returns:
- this builder
 
- 
scaleSets the scale of the root transform.- Parameters:
- scale- the scale
- Returns:
- this builder
 
- 
scaleSets the scale of the root transform.- Parameters:
- xScale- x scale
- yScale- y scale
- zScale- z scale
- Returns:
- this builder
 
- 
scaleSets the scale of the root transform.- Parameters:
- scale- the scale vector
- Returns:
- this builder
- Throws:
- NullPointerException- if- scaleis- null
 
- 
transformSets the root transform.- Parameters:
- transformation- the transformation to use
- Returns:
- this builder
- Throws:
- NullPointerException- if- transformationis- null
 
- 
originSets the origin of the root transform.- Parameters:
- origin- the origin vector
- Returns:
- this builder
- Throws:
- NullPointerException- if- originis- null
 
- 
originSets the origin of the root transform.- Parameters:
- origin- the origin name
- Returns:
- this builder
- Throws:
- NullPointerException- if- originis- null
- IllegalArgumentException- if- originis not- center,- corneror- opposing-corner
 
- 
endFinish configuring the parent builder- Returns:
- the parent block model builder
 
- 
toJsonpublic com.google.gson.JsonObject toJson()
- 
writeVec3private static com.google.gson.JsonArray writeVec3(org.joml.Vector3f vector) 
- 
writeQuaternionprivate static com.google.gson.JsonArray writeQuaternion(org.joml.Quaternionf quaternion) 
 
-