Record Class CompositeItemModel.Geometry

java.lang.Object
java.lang.Record
codechicken.lib.model.CompositeItemModel.Geometry
All Implemented Interfaces:
net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<CompositeItemModel.Geometry>
Enclosing class:
CompositeItemModel

public static record CompositeItemModel.Geometry(Map<String,net.minecraft.client.renderer.block.model.BlockModel> children, List<String> itemPasses) extends Record implements net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<CompositeItemModel.Geometry>
  • Constructor Summary

    Constructors
    Constructor
    Description
    Geometry(Map<String,net.minecraft.client.renderer.block.model.BlockModel> children, List<String> itemPasses)
    Creates an instance of a Geometry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.resources.model.BakedModel
    bake(net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext context, net.minecraft.client.resources.model.ModelBaker baker, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, net.minecraft.client.renderer.block.model.ItemOverrides overrides)
     
    Map<String,net.minecraft.client.renderer.block.model.BlockModel>
    Returns the value of the children record component.
    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 itemPasses record component.
    void
    resolveParents(Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.resources.model.UnbakedModel> modelGetter, net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext context)
     
    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
  • Constructor Details

    • Geometry

      public Geometry(Map<String,net.minecraft.client.renderer.block.model.BlockModel> children, List<String> itemPasses)
      Creates an instance of a Geometry record class.
      Parameters:
      children - the value for the children record component
      itemPasses - the value for the itemPasses record component
  • Method Details

    • bake

      public net.minecraft.client.resources.model.BakedModel bake(net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext context, net.minecraft.client.resources.model.ModelBaker baker, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.resources.model.ModelState modelState, net.minecraft.client.renderer.block.model.ItemOverrides overrides)
      Specified by:
      bake in interface net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<CompositeItemModel.Geometry>
    • resolveParents

      public void resolveParents(Function<net.minecraft.resources.ResourceLocation,net.minecraft.client.resources.model.UnbakedModel> modelGetter, net.neoforged.neoforge.client.model.geometry.IGeometryBakingContext context)
      Specified by:
      resolveParents in interface net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<CompositeItemModel.Geometry>
    • getConfigurableComponentNames

      public Set<String> getConfigurableComponentNames()
      Specified by:
      getConfigurableComponentNames in interface net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<CompositeItemModel.Geometry>
    • 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.
    • children

      public Map<String,net.minecraft.client.renderer.block.model.BlockModel> children()
      Returns the value of the children record component.
      Returns:
      the value of the children record component
    • itemPasses

      public List<String> itemPasses()
      Returns the value of the itemPasses record component.
      Returns:
      the value of the itemPasses record component