Record Class CompositePartModel

java.lang.Object
java.lang.Record
appeng.client.api.model.parts.CompositePartModel
All Implemented Interfaces:
PartModel

public record CompositePartModel(List<PartModel> models) extends Record implements PartModel
Combines multiple part models into one.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a CompositePartModel record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    collectParts(net.minecraft.client.renderer.block.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.model.data.ModelData partModelData, net.minecraft.util.RandomSource random, List<net.minecraft.client.renderer.block.dispatch.BlockStateModelPart> parts)
    Collects model parts of this part model.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the models record component.
    net.minecraft.client.resources.model.sprite.Material.Baked
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface PartModel

    canAttachToStraightCable
  • Constructor Details

    • CompositePartModel

      public CompositePartModel(List<PartModel> models)
      Creates an instance of a CompositePartModel record class.
      Parameters:
      models - the value for the models record component
  • Method Details

    • collectParts

      public void collectParts(net.minecraft.client.renderer.block.BlockAndTintGetter level, net.minecraft.core.BlockPos pos, net.neoforged.neoforge.model.data.ModelData partModelData, net.minecraft.util.RandomSource random, List<net.minecraft.client.renderer.block.dispatch.BlockStateModelPart> parts)
      Description copied from interface: PartModel
      Collects model parts of this part model.
      Specified by:
      collectParts in interface PartModel
      Parameters:
      level - The level the part host is in.
      pos - The position the part host is located at.
      partModelData - Any part model state previously collected from IPart.collectModelData(ModelData.Builder).
    • particleMaterial

      public net.minecraft.client.resources.model.sprite.Material.Baked particleMaterial()
      Specified by:
      particleMaterial in interface PartModel
    • 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<PartModel> models()
      Returns the value of the models record component.
      Returns:
      the value of the models record component