Record Class BlendFactorPair

java.lang.Object
java.lang.Record
dev.latvian.mods.klib.util.BlendFactorPair

public record BlendFactorPair(com.mojang.blaze3d.platform.SourceFactor src, com.mojang.blaze3d.platform.DestFactor dst) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<BlendFactorPair>
     
    static final com.mojang.serialization.Codec<com.mojang.blaze3d.platform.DestFactor>
     
    static final com.mojang.serialization.Codec<com.mojang.blaze3d.platform.SourceFactor>
     
    static final BlendFactorPair
     
    static final BlendFactorPair
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlendFactorPair(com.mojang.blaze3d.platform.SourceFactor src, com.mojang.blaze3d.platform.DestFactor dst)
    Creates an instance of a BlendFactorPair record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    alpha(com.mojang.blaze3d.pipeline.BlendFunction function)
     
    color(com.mojang.blaze3d.pipeline.BlendFunction function)
     
    com.mojang.blaze3d.platform.DestFactor
    dst()
    Returns the value of the dst record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    com.mojang.blaze3d.platform.SourceFactor
    src()
    Returns the value of the src record component.
    com.mojang.blaze3d.pipeline.BlendFunction
     
    static com.mojang.blaze3d.pipeline.BlendFunction
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • SRC_FACTOR_CODEC

      public static final com.mojang.serialization.Codec<com.mojang.blaze3d.platform.SourceFactor> SRC_FACTOR_CODEC
    • DST_FACTOR_CODEC

      public static final com.mojang.serialization.Codec<com.mojang.blaze3d.platform.DestFactor> DST_FACTOR_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<BlendFactorPair> CODEC
    • TRANSLUCENT_COLOR

      public static final BlendFactorPair TRANSLUCENT_COLOR
    • TRANSLUCENT_ALPHA

      public static final BlendFactorPair TRANSLUCENT_ALPHA
  • Constructor Details

    • BlendFactorPair

      public BlendFactorPair(com.mojang.blaze3d.platform.SourceFactor src, com.mojang.blaze3d.platform.DestFactor dst)
      Creates an instance of a BlendFactorPair record class.
      Parameters:
      src - the value for the src record component
      dst - the value for the dst record component
  • Method Details

    • toFunction

      public static com.mojang.blaze3d.pipeline.BlendFunction toFunction(BlendFactorPair color, BlendFactorPair alpha)
    • color

      public static BlendFactorPair color(com.mojang.blaze3d.pipeline.BlendFunction function)
    • alpha

      public static BlendFactorPair alpha(com.mojang.blaze3d.pipeline.BlendFunction function)
    • toFunction

      public com.mojang.blaze3d.pipeline.BlendFunction toFunction()
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • src

      public com.mojang.blaze3d.platform.SourceFactor src()
      Returns the value of the src record component.
      Returns:
      the value of the src record component
    • dst

      public com.mojang.blaze3d.platform.DestFactor dst()
      Returns the value of the dst record component.
      Returns:
      the value of the dst record component