Record Class StandardModelParameters

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

public record StandardModelParameters(@Nullable net.minecraft.resources.ResourceLocation parent, net.minecraft.client.renderer.block.model.TextureSlots.Data textures, @Nullable net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms, @Nullable Boolean ambientOcclusion, net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLight, @Nullable com.mojang.math.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 Summary

    Fields
    Modifier and Type
    Field
    Description
    private final @Nullable Boolean
    The field for the ambientOcclusion record component.
    private final net.minecraft.client.resources.model.UnbakedModel.GuiLight
    The field for the guiLight record component.
    private final @Nullable net.minecraft.client.renderer.block.model.ItemTransforms
    The field for the itemTransforms record component.
    private final @Nullable net.minecraft.resources.ResourceLocation
    The field for the parent record component.
    private final Map<String,Boolean>
    The field for the partVisibility record component.
    private final RenderTypeGroup
    The field for the renderTypeGroup record component.
    private final @Nullable com.mojang.math.Transformation
    The field for the rootTransform record component.
    private final net.minecraft.client.renderer.block.model.TextureSlots.Data
    The field for the textures record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StandardModelParameters(@Nullable net.minecraft.resources.ResourceLocation parent, net.minecraft.client.renderer.block.model.TextureSlots.Data textures, @Nullable net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms, @Nullable Boolean ambientOcclusion, net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLight, @Nullable com.mojang.math.Transformation rootTransform, RenderTypeGroup renderTypeGroup, Map<String,Boolean> partVisibility)
    Creates an instance of a StandardModelParameters record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Boolean
    Returns the value of the ambientOcclusion record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraft.client.resources.model.UnbakedModel.GuiLight
    Returns the value of the guiLight record component.
    final int
    Returns a hash code value for this object.
    @Nullable net.minecraft.client.renderer.block.model.ItemTransforms
    Returns the value of the itemTransforms record component.
    @Nullable net.minecraft.resources.ResourceLocation
    Returns the value of the parent record component.
    parse(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext context)
     
    Returns the value of the partVisibility record component.
    Returns the value of the renderTypeGroup record component.
    @Nullable com.mojang.math.Transformation
    Returns the value of the rootTransform record component.
    net.minecraft.client.renderer.block.model.TextureSlots.Data
    Returns the value of the textures record component.
    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
  • Field Details

    • parent

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

      private final net.minecraft.client.renderer.block.model.TextureSlots.Data textures
      The field for the textures record component.
    • itemTransforms

      @Nullable private final @Nullable net.minecraft.client.renderer.block.model.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 net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLight
      The field for the guiLight record component.
    • rootTransform

      @Nullable private final @Nullable com.mojang.math.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 net.minecraft.resources.ResourceLocation parent, net.minecraft.client.renderer.block.model.TextureSlots.Data textures, @Nullable @Nullable net.minecraft.client.renderer.block.model.ItemTransforms itemTransforms, @Nullable @Nullable Boolean ambientOcclusion, @Nullable net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLight, @Nullable @Nullable com.mojang.math.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 net.minecraft.resources.ResourceLocation parent()
      Returns the value of the parent record component.
      Returns:
      the value of the parent record component
    • textures

      public net.minecraft.client.renderer.block.model.TextureSlots.Data textures()
      Returns the value of the textures record component.
      Returns:
      the value of the textures record component
    • itemTransforms

      @Nullable public @Nullable net.minecraft.client.renderer.block.model.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 net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLight()
      Returns the value of the guiLight record component.
      Returns:
      the value of the guiLight record component
    • rootTransform

      @Nullable public @Nullable com.mojang.math.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