Record Class BakedModelRenderable.Context

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.renderable.BakedModelRenderable.Context
Enclosing class:
BakedModelRenderable

public static record BakedModelRenderable.Context(@Nullable BlockState state, Direction[] faces, RandomSource randomSource, long seed, ModelData data, org.joml.Vector4f tint) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Direction[]
     
    private final ModelData
    The field for the data record component.
    private final Direction[]
    The field for the faces record component.
    private final RandomSource
    The field for the randomSource record component.
    private final long
    The field for the seed record component.
    private final @Nullable BlockState
    The field for the state record component.
    private final org.joml.Vector4f
    The field for the tint record component.
    private static final org.joml.Vector4f
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Context(@Nullable BlockState state, Direction[] faces, RandomSource randomSource, long seed, ModelData data, org.joml.Vector4f tint)
    Creates an instance of a Context record class.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the data record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the faces record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the randomSource record component.
    long
    Returns the value of the seed record component.
    @Nullable BlockState
    Returns the value of the state record component.
    org.joml.Vector4f
    Returns the value of the tint record component.
    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

    • state

      @Nullable private final @Nullable BlockState state
      The field for the state record component.
    • faces

      private final Direction[] faces
      The field for the faces record component.
    • randomSource

      private final RandomSource randomSource
      The field for the randomSource record component.
    • seed

      private final long seed
      The field for the seed record component.
    • data

      private final ModelData data
      The field for the data record component.
    • tint

      private final org.joml.Vector4f tint
      The field for the tint record component.
    • ALL_FACES_AND_NULL

      private static final Direction[] ALL_FACES_AND_NULL
    • WHITE

      private static final org.joml.Vector4f WHITE
  • Constructor Details

    • Context

      public Context(ModelData data)
    • Context

      public Context(@Nullable @Nullable BlockState state, Direction[] faces, RandomSource randomSource, long seed, ModelData data, org.joml.Vector4f tint)
      Creates an instance of a Context record class.
      Parameters:
      state - the value for the state record component
      faces - the value for the faces record component
      randomSource - the value for the randomSource record component
      seed - the value for the seed record component
      data - the value for the data record component
      tint - the value for the tint 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 '=='.
      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.
    • state

      @Nullable public @Nullable BlockState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • faces

      public Direction[] faces()
      Returns the value of the faces record component.
      Returns:
      the value of the faces record component
    • randomSource

      public RandomSource randomSource()
      Returns the value of the randomSource record component.
      Returns:
      the value of the randomSource record component
    • seed

      public long seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component
    • data

      public ModelData data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • tint

      public org.joml.Vector4f tint()
      Returns the value of the tint record component.
      Returns:
      the value of the tint record component