Record Class StandardModelParameters

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.StandardModelParameters

public record StandardModelParameters(@Nullable ResourceLocation parent, TextureSlots.Data textures, @Nullable ItemTransforms itemTransforms, @Nullable Boolean ambientOcclusion, UnbakedModel.GuiLight guiLight, @Nullable Transformation rootTransform, RenderTypeGroup renderTypeGroup, Map<String,Boolean> partVisibility) extends Record
Wrapper around all standard top-level model parameters added by vanilla and NeoForge except elements.

For use in custom model loaders which want to respect these properties but create the quads from something other than the vanilla elements spec.

  • Field Details

    • parent

      @Nullable private final @Nullable ResourceLocation parent
      The field for the parent record component.
    • textures

      private final TextureSlots.Data textures
      The field for the textures record component.
    • itemTransforms

      @Nullable private final @Nullable ItemTransforms itemTransforms
      The field for the itemTransforms record component.
    • ambientOcclusion

      @Nullable private final @Nullable Boolean ambientOcclusion
      The field for the ambientOcclusion record component.
    • guiLight

      @Nullable private final UnbakedModel.GuiLight guiLight
      The field for the guiLight record component.
    • rootTransform

      @Nullable private final @Nullable Transformation rootTransform
      The field for the rootTransform record component.
    • renderTypeGroup

      private final RenderTypeGroup renderTypeGroup
      The field for the renderTypeGroup record component.
    • partVisibility

      private final Map<String,Boolean> partVisibility
      The field for the partVisibility record component.
  • Constructor Details

    • StandardModelParameters

      public StandardModelParameters(@Nullable @Nullable ResourceLocation parent, TextureSlots.Data textures, @Nullable @Nullable ItemTransforms itemTransforms, @Nullable @Nullable Boolean ambientOcclusion, @Nullable UnbakedModel.GuiLight guiLight, @Nullable @Nullable Transformation rootTransform, RenderTypeGroup renderTypeGroup, Map<String,Boolean> partVisibility)
      Creates an instance of a StandardModelParameters record class.
      Parameters:
      parent - the value for the parent record component
      textures - the value for the textures record component
      itemTransforms - the value for the itemTransforms record component
      ambientOcclusion - the value for the ambientOcclusion record component
      guiLight - the value for the guiLight record component
      rootTransform - the value for the rootTransform record component
      renderTypeGroup - the value for the renderTypeGroup record component
      partVisibility - the value for the partVisibility record component
  • Method Details

    • parse

      public static StandardModelParameters parse(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext context)
    • 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.
    • parent

      @Nullable public @Nullable ResourceLocation parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • textures

      public TextureSlots.Data textures()
      Returns the value of the textures record component.
      Returns:
      the value of the textures record component
    • itemTransforms

      @Nullable public @Nullable ItemTransforms itemTransforms()
      Returns the value of the itemTransforms record component.
      Returns:
      the value of the itemTransforms record component
    • ambientOcclusion

      @Nullable public @Nullable Boolean ambientOcclusion()
      Returns the value of the ambientOcclusion record component.
      Returns:
      the value of the ambientOcclusion record component
    • guiLight

      @Nullable public UnbakedModel.GuiLight guiLight()
      Returns the value of the guiLight record component.
      Returns:
      the value of the guiLight record component
    • rootTransform

      @Nullable public @Nullable Transformation rootTransform()
      Returns the value of the rootTransform record component.
      Returns:
      the value of the rootTransform record component
    • renderTypeGroup

      public RenderTypeGroup renderTypeGroup()
      Returns the value of the renderTypeGroup record component.
      Returns:
      the value of the renderTypeGroup record component
    • partVisibility

      public Map<String,Boolean> partVisibility()
      Returns the value of the partVisibility record component.
      Returns:
      the value of the partVisibility record component