Interface IForgeTransformation

All Known Implementing Classes:
Transformation

public interface IForgeTransformation
Extension interface for Transformation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a new transformation with a changed origin by applying the given parameter (which is relative to the current origin).
    Converts and returns a new transformation based on this transformation from assuming a center-block system to an opposing-corner-block system.
    Converts and returns a new transformation based on this transformation from assuming an opposing-corner-block system to a center-block system.
    default boolean
    Returns whether this transformation is the identity transformation.
    default void
    push(PoseStack stack)
    Deprecated, for removal: This API element is subject to removal in a future version.
    default Direction
    Rotates the direction according to this transformation and returns the nearest Direction to the resulting direction.
     
    default void
    Transforms the normal according to this transformation and normalizes it.
    default void
    Transforms the position according to this transformation.
  • Method Details

    • self

      private Transformation self()
    • isIdentity

      default boolean isIdentity()
      Returns whether this transformation is the identity transformation.
      Returns:
      whether this transformation is the identity transformation
      See Also:
    • push

      @Deprecated(forRemoval=true, since="1.19.2") default void push(PoseStack stack)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Pushes and applies this transformation to the pose stack. The effects of this method can be reversed by a corresponding PoseStack.popPose().
      Parameters:
      stack - the pose stack to modify
    • transformPosition

      default void transformPosition(Vector4f position)
      Transforms the position according to this transformation.
      Parameters:
      position - the position to transform
    • transformNormal

      default void transformNormal(Vector3f normal)
      Transforms the normal according to this transformation and normalizes it.
      Parameters:
      normal - the normal to transform
    • rotateTransform

      default Direction rotateTransform(Direction facing)
      Rotates the direction according to this transformation and returns the nearest Direction to the resulting direction.
      Parameters:
      facing - the direction to transform
      Returns:
      the Direction value nearest to the resulting transformed direction
      See Also:
    • blockCenterToCorner

      default Transformation blockCenterToCorner()
      Converts and returns a new transformation based on this transformation from assuming a center-block system to an opposing-corner-block system.
      Returns:
      a new transformation using the opposing-corner-block system
    • blockCornerToCenter

      default Transformation blockCornerToCenter()
      Converts and returns a new transformation based on this transformation from assuming an opposing-corner-block system to a center-block system.
      Returns:
      a new transformation using the center-block system
    • applyOrigin

      default Transformation applyOrigin(Vector3f origin)
      Returns a new transformation with a changed origin by applying the given parameter (which is relative to the current origin). This can be used for switching between coordinate systems.
      Parameters:
      origin - the new origin as relative to the current origin
      Returns:
      a new transformation with a changed origin