Enum Class PartMap

java.lang.Object
java.lang.Enum<PartMap>
codechicken.multipart.util.PartMap
All Implemented Interfaces:
Serializable, Comparable<PartMap>, Constable

public enum PartMap extends Enum<PartMap>
Defines what each slot in a multipart tile corresponds to and provides some utility functions. For performance reasons, it is recommended that integer constants be used as opposed to this enum
  • Enum Constant Details

    • BOTTOM

      public static final PartMap BOTTOM
    • TOP

      public static final PartMap TOP
    • NORTH

      public static final PartMap NORTH
    • SOUTH

      public static final PartMap SOUTH
    • WEST

      public static final PartMap WEST
    • EAST

      public static final PartMap EAST
    • CENTER

      public static final PartMap CENTER
    • CORNER_NNN

      public static final PartMap CORNER_NNN
    • CORNER_NPN

      public static final PartMap CORNER_NPN
    • CORNER_NNP

      public static final PartMap CORNER_NNP
    • CORNER_NPP

      public static final PartMap CORNER_NPP
    • CORNER_PNN

      public static final PartMap CORNER_PNN
    • CORNER_PPN

      public static final PartMap CORNER_PPN
    • CORNER_PNP

      public static final PartMap CORNER_PNP
    • CORNER_PPP

      public static final PartMap CORNER_PPP
    • EDGE_NYN

      public static final PartMap EDGE_NYN
    • EDGE_NYP

      public static final PartMap EDGE_NYP
    • EDGE_PYN

      public static final PartMap EDGE_PYN
    • EDGE_PYP

      public static final PartMap EDGE_PYP
    • EDGE_NNZ

      public static final PartMap EDGE_NNZ
    • EDGE_PNZ

      public static final PartMap EDGE_PNZ
    • EDGE_NPZ

      public static final PartMap EDGE_NPZ
    • EDGE_PPZ

      public static final PartMap EDGE_PPZ
    • EDGE_XNN

      public static final PartMap EDGE_XNN
    • EDGE_XPN

      public static final PartMap EDGE_XPN
    • EDGE_XNP

      public static final PartMap EDGE_XNP
    • EDGE_XPP

      public static final PartMap EDGE_XPP
  • Field Details

    • i

      public final int i
    • mask

      public final int mask
  • Method Details

    • values

      public static PartMap[] 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 PartMap 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
    • face

      public static PartMap face(int i)
      Don't actually use this.
    • edge

      public static PartMap edge(int i)
      Don't actually use this.
    • corner

      public static PartMap corner(int i)
      Don't actually use this.
    • edgeAxisMask

      public static int edgeAxisMask(int e)
      Returns a 3 bit mask of the axis xzy that are variable in this edge. For example, the first 4 edges (15-18) are along the Y axis, variable in x and z, so the mask is 110b. Note axis y is 1invalid input: '<'invalid input: '<'0, z is 1invalid input: '<'invalid input: '<'1 and x is 1invalid input: '<'invalid input: '<'2 Note the parameter e is relative to the first edge slot and can range from 0-11
    • unpackEdgeBits

      public static int unpackEdgeBits(int e)
      Unpacks an edge index, to a mask where high values indicate positive positions in that axis. Note the parameter e is relative to the first edge slot and can range from 0-11 For example, edge 1 (slot 16), is EDGE_NYP so the mask returned would be 010 as z is positive.
    • packEdgeBits

      public static int packEdgeBits(int e, int bits)
      Repacks a mask of axis bits indicating positive positions, into an edge in along the same axis as e. Note the parameter e is relative to the first edge slot and can range from 0-11
    • edgeBetween

      public static int edgeBetween(int s1, int s2)
      Returns the slot of the edge between 2 sides.