Record Class CompositeBlockModel.Unbaked

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.block.CompositeBlockModel.Unbaked
All Implemented Interfaces:
net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked, net.minecraft.client.resources.model.ResolvableModel, CustomUnbakedBlockStateModel
Enclosing class:
CompositeBlockModel

public static record CompositeBlockModel.Unbaked(List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> models) extends Record implements CustomUnbakedBlockStateModel
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.client.resources.model.ResolvableModel

    net.minecraft.client.resources.model.ResolvableModel.Resolver
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.MapCodec<CompositeBlockModel.Unbaked>
     
    private final List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked>
    The field for the models record component.

    Fields inherited from interface net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked

    CODEC, ELEMENT_CODEC, HARDCODED_WEIGHTED_CODEC, SINGLE_MODEL_CODEC, WEIGHTED_MODEL_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    Unbaked(List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> models)
    Creates an instance of a Unbaked record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.renderer.block.model.BlockStateModel
    bake(net.minecraft.client.resources.model.ModelBaker baker)
     
    com.mojang.serialization.MapCodec<? extends CustomUnbakedBlockStateModel>
    Returns the codec for this type of unbaked block state model.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked>
    Returns the value of the models record component.
    void
    resolveDependencies(net.minecraft.client.resources.model.ResolvableModel.Resolver resolver)
     
    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

    Methods inherited from interface net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked

    asRoot
  • Field Details

    • models

      private final List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> models
      The field for the models record component.
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<CompositeBlockModel.Unbaked> MAP_CODEC
  • Constructor Details

    • Unbaked

      public Unbaked(List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> models)
      Creates an instance of a Unbaked record class.
      Parameters:
      models - the value for the models record component
  • Method Details

    • bake

      public net.minecraft.client.renderer.block.model.BlockStateModel bake(net.minecraft.client.resources.model.ModelBaker baker)
      Specified by:
      bake in interface net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked
    • resolveDependencies

      public void resolveDependencies(net.minecraft.client.resources.model.ResolvableModel.Resolver resolver)
      Specified by:
      resolveDependencies in interface net.minecraft.client.resources.model.ResolvableModel
    • codec

      public com.mojang.serialization.MapCodec<? extends CustomUnbakedBlockStateModel> codec()
      Description copied from interface: CustomUnbakedBlockStateModel
      Returns the codec for this type of unbaked block state model.
      Specified by:
      codec in interface CustomUnbakedBlockStateModel
    • 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.
    • models

      public List<net.minecraft.client.renderer.block.model.BlockStateModel.Unbaked> models()
      Returns the value of the models record component.
      Returns:
      the value of the models record component