Record Class ExtrudedModel

java.lang.Object
java.lang.Record
com.petrolpark.client.rendering.model.extruded.ExtrudedModel
All Implemented Interfaces:
net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<ExtrudedModel>

public record ExtrudedModel(net.minecraft.client.renderer.block.model.BlockModel baseModel, Mask mask, float minZ, float maxZ) extends Record implements net.neoforged.neoforge.client.model.geometry.IUnbakedGeometry<ExtrudedModel>
A model based on a top, side and bottom texture, and a Mask. The Mask is applied to the top and bottom textures and the model is generated with these as the south and north faces respectively. They are joined by several side faces that follow the edge of the Mask.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
     
    static final net.minecraft.resources.ResourceLocation
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExtrudedModel(net.minecraft.client.renderer.block.model.BlockModel baseModel, Mask mask, float minZ, float maxZ)
    Creates an instance of a ExtrudedModel 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)
     
    net.minecraft.client.renderer.block.model.BlockModel
    Returns the value of the baseModel 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 mask record component.
    float
    Returns the value of the maxZ record component.
    float
    Returns the value of the minZ record component.
    static final void
    onRegisterGeometryLoaders(net.neoforged.neoforge.client.event.ModelEvent.RegisterGeometryLoaders event)
     
    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.neoforged.neoforge.client.model.geometry.IUnbakedGeometry

    getConfigurableComponentNames, resolveParents
  • Field Details

    • LOADER_ID

      public static final net.minecraft.resources.ResourceLocation LOADER_ID
    • LOADER

      public static final ExtrudedModel.Loader LOADER
    • EXTRUDED_MODEL_GENERATOR

      public static final ExtrudedModelGenerator EXTRUDED_MODEL_GENERATOR
  • Constructor Details

    • ExtrudedModel

      public ExtrudedModel(net.minecraft.client.renderer.block.model.BlockModel baseModel, Mask mask, float minZ, float maxZ)
      Creates an instance of a ExtrudedModel record class.
      Parameters:
      baseModel - the value for the baseModel record component
      mask - the value for the mask record component
      minZ - the value for the minZ record component
      maxZ - the value for the maxZ record component
  • Method Details

    • bake

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

      public static final void onRegisterGeometryLoaders(net.neoforged.neoforge.client.event.ModelEvent.RegisterGeometryLoaders event)
    • 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.
    • baseModel

      public net.minecraft.client.renderer.block.model.BlockModel baseModel()
      Returns the value of the baseModel record component.
      Returns:
      the value of the baseModel record component
    • mask

      public Mask mask()
      Returns the value of the mask record component.
      Returns:
      the value of the mask record component
    • minZ

      public float minZ()
      Returns the value of the minZ record component.
      Returns:
      the value of the minZ record component
    • maxZ

      public float maxZ()
      Returns the value of the maxZ record component.
      Returns:
      the value of the maxZ record component