Class RotationBuilder

java.lang.Object
io.github.vampirestudios.vampirelib.api.datagen.RotationBuilder

public class RotationBuilder extends Object
Instantiate this class in order to provide an optional rotation to an element of a JSON model.
  • 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 a Vector3d.
      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

      public RotationBuilder rescale(boolean rescale)
      Toggles whether to scale the rotated faces across the whole block. Defaults to false.
    • build

      @Internal public com.google.gson.JsonObject build()