Class BlockModelBuilder.RootTransformBuilder
java.lang.Object
net.minecraftforge.client.model.generators.BlockModelBuilder.RootTransformBuilder
- Enclosing class:
- BlockModelBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate Quaternion
private static final Vector3f
private @Nullable BlockModelBuilder.RootTransformBuilder.TransformOrigin
private @Nullable Vector3f
private Quaternion
private Vector3f
private Vector3f
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionend()
Finish configuring the parent builderleftRotation
(float x, float y, float z, boolean isDegrees) Sets the left rotation of the root transform.leftRotation
(Quaternion 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
(Quaternion 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
(Quaternion 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
(Quaternion 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.com.google.gson.JsonObject
toJson()
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 com.google.gson.JsonArray
writeQuaternion
(Quaternion quaternion) private com.google.gson.JsonArray
-
Field Details
-
ONE
-
translation
-
leftRotation
-
rightRotation
-
scale
-
origin
-
originVec
-
-
Constructor Details
-
RootTransformBuilder
private RootTransformBuilder()
-
-
Method Details
-
translation
Sets the translation of the root transform.- Parameters:
translation
- the translation- Returns:
- this builder
- Throws:
NullPointerException
- iftranslation
isnull
-
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
- ifrotation
isnull
-
rotation
public BlockModelBuilder.RootTransformBuilder rotation(float x, float y, float z, boolean isDegrees) 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
- ifleftRotation
isnull
-
leftRotation
public BlockModelBuilder.RootTransformBuilder leftRotation(float x, float y, float z, boolean isDegrees) 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
- ifrightRotation
isnull
-
rightRotation
public BlockModelBuilder.RootTransformBuilder rightRotation(float x, float y, float z, boolean isDegrees) 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
- ifrightRotation
isnull
-
postRotation
public BlockModelBuilder.RootTransformBuilder postRotation(float x, float y, float z, boolean isDegrees) 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
- Throws:
NullPointerException
- ifscale
isnull
-
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
- ifscale
isnull
-
transform
Sets the root transform.- Parameters:
transformation
- the transformation to use- Returns:
- this builder
- Throws:
NullPointerException
- iftransformation
isnull
-
origin
Sets the origin of the root transform.- Parameters:
origin
- the origin vector- Returns:
- this builder
- Throws:
NullPointerException
- iforigin
isnull
-
origin
public BlockModelBuilder.RootTransformBuilder origin(BlockModelBuilder.RootTransformBuilder.TransformOrigin origin) Sets the origin of the root transform.- Parameters:
origin
- the origin name- Returns:
- this builder
- Throws:
NullPointerException
- iforigin
isnull
IllegalArgumentException
- iforigin
is notcenter
,corner
oropposing-corner
-
end
Finish configuring the parent builder- Returns:
- the parent block model builder
-
toJson
public com.google.gson.JsonObject toJson() -
writeVec3
-
writeQuaternion
-