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 Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable Boolean
The field for theambientOcclusion
record component.private final UnbakedModel.GuiLight
The field for theguiLight
record component.private final @Nullable ItemTransforms
The field for theitemTransforms
record component.private final @Nullable ResourceLocation
The field for theparent
record component.The field for thepartVisibility
record component.private final RenderTypeGroup
The field for therenderTypeGroup
record component.private final @Nullable Transformation
The field for therootTransform
record component.private final TextureSlots.Data
The field for thetextures
record component. -
Constructor Summary
ConstructorsConstructorDescriptionStandardModelParameters
(@Nullable ResourceLocation parent, TextureSlots.Data textures, @Nullable ItemTransforms itemTransforms, @Nullable Boolean ambientOcclusion, UnbakedModel.GuiLight guiLight, @Nullable Transformation rootTransform, RenderTypeGroup renderTypeGroup, Map<String, Boolean> partVisibility) Creates an instance of aStandardModelParameters
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Boolean
Returns the value of theambientOcclusion
record component.final boolean
Indicates whether some other object is "equal to" this one.guiLight()
Returns the value of theguiLight
record component.final int
hashCode()
Returns a hash code value for this object.@Nullable ItemTransforms
Returns the value of theitemTransforms
record component.@Nullable ResourceLocation
parent()
Returns the value of theparent
record component.static StandardModelParameters
parse
(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext context) Returns the value of thepartVisibility
record component.Returns the value of therenderTypeGroup
record component.@Nullable Transformation
Returns the value of therootTransform
record component.textures()
Returns the value of thetextures
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
parent
The field for theparent
record component. -
textures
The field for thetextures
record component. -
itemTransforms
The field for theitemTransforms
record component. -
ambientOcclusion
The field for theambientOcclusion
record component. -
guiLight
The field for theguiLight
record component. -
rootTransform
The field for therootTransform
record component. -
renderTypeGroup
The field for therenderTypeGroup
record component. -
partVisibility
The field for thepartVisibility
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 aStandardModelParameters
record class.- Parameters:
parent
- the value for theparent
record componenttextures
- the value for thetextures
record componentitemTransforms
- the value for theitemTransforms
record componentambientOcclusion
- the value for theambientOcclusion
record componentguiLight
- the value for theguiLight
record componentrootTransform
- the value for therootTransform
record componentrenderTypeGroup
- the value for therenderTypeGroup
record componentpartVisibility
- the value for thepartVisibility
record component
-
-
Method Details
-
parse
public static StandardModelParameters parse(com.google.gson.JsonObject jsonObject, com.google.gson.JsonDeserializationContext context) -
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
parent
Returns the value of theparent
record component.- Returns:
- the value of the
parent
record component
-
textures
Returns the value of thetextures
record component.- Returns:
- the value of the
textures
record component
-
itemTransforms
Returns the value of theitemTransforms
record component.- Returns:
- the value of the
itemTransforms
record component
-
ambientOcclusion
Returns the value of theambientOcclusion
record component.- Returns:
- the value of the
ambientOcclusion
record component
-
guiLight
Returns the value of theguiLight
record component.- Returns:
- the value of the
guiLight
record component
-
rootTransform
Returns the value of therootTransform
record component.- Returns:
- the value of the
rootTransform
record component
-
renderTypeGroup
Returns the value of therenderTypeGroup
record component.- Returns:
- the value of the
renderTypeGroup
record component
-
partVisibility
Returns the value of thepartVisibility
record component.- Returns:
- the value of the
partVisibility
record component
-