Record Class SingleVariant.Unbaked

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.SingleVariant.Unbaked
All Implemented Interfaces:
BlockStateModel.Unbaked, ResolvableModel
Enclosing class:
SingleVariant

public static record SingleVariant.Unbaked(Variant variant) extends Record implements BlockStateModel.Unbaked
  • Field Details

    • variant

      private final Variant variant
      The field for the variant record component.
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<SingleVariant.Unbaked> MAP_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<SingleVariant.Unbaked> CODEC
  • Constructor Details

    • Unbaked

      public Unbaked(Variant variant)
      Creates an instance of a Unbaked record class.
      Parameters:
      variant - the value for the variant record component
  • Method Details

    • bake

      public BlockStateModel bake(ModelBaker p_410856_)
      Specified by:
      bake in interface BlockStateModel.Unbaked
    • resolveDependencies

      public void resolveDependencies(ResolvableModel.Resolver p_410724_)
      Specified by:
      resolveDependencies in interface ResolvableModel
    • 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.
    • variant

      public Variant variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component