Record Class CustomHeadLayer.Transforms

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.entity.layers.CustomHeadLayer.Transforms
Enclosing class:
CustomHeadLayer<S extends LivingEntityRenderState, M extends EntityModel<S> & HeadedModel>

public static record CustomHeadLayer.Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale, Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver) extends Record
  • Field Details

    • yOffset

      private final float yOffset
      The field for the yOffset record component.
    • skullYOffset

      private final float skullYOffset
      The field for the skullYOffset record component.
    • horizontalScale

      private final float horizontalScale
      The field for the horizontalScale record component.
    • verticalScale

      private final float verticalScale
      The field for the verticalScale record component.
    • playerSkinRenderTypeResolver

      private final Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver
      The field for the playerSkinRenderTypeResolver record component.
    • TRANSLUCENT_PLAYER_SKIN_RESOLVER

      public static final Function<PlayerSkinRenderCache.RenderInfo, RenderType> TRANSLUCENT_PLAYER_SKIN_RESOLVER
    • CUTOUT_PLAYER_SKIN_RESOLVER

      public static final Function<PlayerSkinRenderCache.RenderInfo, RenderType> CUTOUT_PLAYER_SKIN_RESOLVER
    • DEFAULT

      public static final CustomHeadLayer.Transforms DEFAULT
  • Constructor Details

    • Transforms

      public Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale)
    • Transforms

      public Transforms(float yOffset, float skullYOffset, float horizontalScale)
    • Transforms

      public Transforms(float yOffset, float skullYOffset, float horizontalScale, float verticalScale, Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver)
      Creates an instance of a Transforms record class.
      Parameters:
      yOffset - the value for the yOffset record component
      skullYOffset - the value for the skullYOffset record component
      horizontalScale - the value for the horizontalScale record component
      verticalScale - the value for the verticalScale record component
      playerSkinRenderTypeResolver - the value for the playerSkinRenderTypeResolver record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • yOffset

      public float yOffset()
      Returns the value of the yOffset record component.
      Returns:
      the value of the yOffset record component
    • skullYOffset

      public float skullYOffset()
      Returns the value of the skullYOffset record component.
      Returns:
      the value of the skullYOffset record component
    • horizontalScale

      public float horizontalScale()
      Returns the value of the horizontalScale record component.
      Returns:
      the value of the horizontalScale record component
    • verticalScale

      public float verticalScale()
      Returns the value of the verticalScale record component.
      Returns:
      the value of the verticalScale record component
    • playerSkinRenderTypeResolver

      public Function<PlayerSkinRenderCache.RenderInfo, RenderType> playerSkinRenderTypeResolver()
      Returns the value of the playerSkinRenderTypeResolver record component.
      Returns:
      the value of the playerSkinRenderTypeResolver record component