Class RotationBuilder
java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.RotationBuilder
Instantiate this class in order to provide an optional
rotation to an element of a JSON model.-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRotationBuilder(double x, double y, double z, net.minecraft.core.Direction.Axis axis, RotationBuilder.Angle angle) Create a new rotation builder with a given origin, axis, angle and optional rescaling.RotationBuilder(org.joml.Vector3d origin, net.minecraft.core.Direction.Axis axis, RotationBuilder.Angle angle) Create a new rotation builder with a given origin, axis, angle and optional rescaling. -
Method Summary
-
Constructor Details
-
RotationBuilder
public RotationBuilder(org.joml.Vector3d origin, net.minecraft.core.Direction.Axis axis, RotationBuilder.Angle angle) Create a new rotation builder with a given origin, axis, angle and optional rescaling.- Parameters:
origin- An origin point to rotate around, passed as aVector3d.axis- The coordinate axis to rotate around (either X, Y or Z).angle- The angle of rotation. Limited to 45° through -45° in increments of 22.5°.
-
RotationBuilder
public RotationBuilder(double x, double y, double z, net.minecraft.core.Direction.Axis axis, RotationBuilder.Angle angle) Create a new rotation builder with a given origin, axis, angle and optional rescaling.- Parameters:
x- The X-coordinate of the origin point to rotate around.y- The Y-coordinate of the origin point to rotate around.z- The Z-coordinate of the origin point to rotate around.axis- The coordinate axis to rotate around (either X, Y or Z).angle- The angle of rotation. Limited to 45° through -45° in increments of 22.5°.
-
-
Method Details
-
rescale
Toggles whether to scale the rotated faces across the whole block. Defaults tofalse. -
build
@Internal public com.google.gson.JsonObject build()
-