Enum Class Orientation

java.lang.Object
java.lang.Enum<Orientation>
petrolpark.mc.library.util.Orientation
All Implemented Interfaces:
Serializable, Comparable<Orientation>, Constable, net.minecraft.util.StringRepresentable

@ParametersAreNonnullByDefault public enum Orientation extends Enum<Orientation> implements net.minecraft.util.StringRepresentable
  • Enum Constant Details

  • Field Details

    • name

      public final String name
    • top

      public final net.minecraft.core.Direction top
    • front

      public final net.minecraft.core.Direction front
    • blockStateXRotation

      public final int blockStateXRotation
      The blockstate x then y rotation (each a multiple of 90) rendering this orientation from a model authored as UP_SOUTH (if top is vertical) or EAST_SOUTH (otherwise)
    • blockStateYRotation

      public final int blockStateYRotation
    • topVec

      public final net.minecraft.world.phys.Vec3 topVec
    • frontVec

      public final net.minecraft.world.phys.Vec3 frontVec
    • rightVec

      public final net.minecraft.world.phys.Vec3 rightVec
    • rotationFromUpSouth

      public final org.joml.Quaternionf rotationFromUpSouth
      Rotation from the default UP_SOUTH orientation to this orientation.
    • EDGE_ORIENTATIONS

      public static final Orientation[] EDGE_ORIENTATIONS
    • ORIENTATION_PROPERTY

      public static final net.minecraft.world.level.block.state.properties.EnumProperty<Orientation> ORIENTATION_PROPERTY
    • EDGE_ORIENTATION_PROPERTY

      public static final net.minecraft.world.level.block.state.properties.EnumProperty<Orientation> EDGE_ORIENTATION_PROPERTY
  • Method Details

    • values

      public static Orientation[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Orientation valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromTopAndFront

      public static final Orientation fromTopAndFront(net.minecraft.core.Direction top, net.minecraft.core.Direction front)
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable
    • topAndFront

      public net.minecraft.core.Direction[] topAndFront()
    • rotate

      public Orientation rotate(net.minecraft.core.Direction.Axis axis, net.minecraft.world.level.block.Rotation rotation)
    • mirror

      public Orientation mirror(net.minecraft.world.level.block.Mirror mirror)
    • asEdge

      public Orientation asEdge()
    • asEdgeBlockStateRotation

      public Orientation asEdgeBlockStateRotation()
      The Orientation whose blockStateXRotation/blockStateYRotation to use when rendering this Orientation from a single model authored as EAST_SOUTH. For most orientations this is just this, but UP_SOUTH, UP_NORTH, DOWN_SOUTH and DOWN_NORTH aren't reachable from EAST_SOUTH at all, so their front/top-swapped counterpart is used instead - which renders the correct edge, but with "front" and "top" swapped relative to this orientation's true pose.
    • transform

      public net.minecraft.world.phys.Vec3 transform(net.minecraft.world.phys.Vec3 point)
    • isTopVertical

      public boolean isTopVertical()