java.lang.Object
net.neoforged.neoforge.client.model.generators.template.RotationBuilder

public final class RotationBuilder extends Object
  • Field Details

    • origin

      @Nullable private @Nullable org.joml.Vector3f origin
    • axis

      @Nullable private net.minecraft.core.Direction.Axis axis
    • angle

      private float angle
    • rescale

      private boolean rescale
  • Constructor Details

    • RotationBuilder

      public RotationBuilder()
  • Method Details

    • origin

      public RotationBuilder origin(float x, float y, float z)
      Sets the origin point for this rotation.
    • axis

      public RotationBuilder axis(net.minecraft.core.Direction.Axis axis)
      Parameters:
      axis - the axis of rotation
      Returns:
      this builder
      Throws:
      NullPointerException - if axis is null
    • angle

      public RotationBuilder angle(float angle)
      Parameters:
      angle - the rotation angle
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if angle is invalid (not one of 0, +/-22.5, +/-45)
    • rescale

      public RotationBuilder rescale(boolean rescale)
      Sets whether or not the quad should be scaled after rotation to maintain its relative size.
    • build

      net.minecraft.client.renderer.block.model.BlockElementRotation build()
    • copy