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 BooleanThe field for theambientOcclusionrecord component.private final UnbakedModel.GuiLightThe field for theguiLightrecord component.private final @Nullable ItemTransformsThe field for theitemTransformsrecord component.private final @Nullable ResourceLocationThe field for theparentrecord component.The field for thepartVisibilityrecord component.private final RenderTypeGroupThe field for therenderTypeGrouprecord component.private final @Nullable TransformationThe field for therootTransformrecord component.private final TextureSlots.DataThe field for thetexturesrecord 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 aStandardModelParametersrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of theambientOcclusionrecord component.final booleanIndicates whether some other object is "equal to" this one.guiLight()Returns the value of theguiLightrecord component.final inthashCode()Returns a hash code value for this object.@Nullable ItemTransformsReturns the value of theitemTransformsrecord component.@Nullable ResourceLocationparent()Returns the value of theparentrecord component.static StandardModelParametersparse(JsonObject jsonObject, JsonDeserializationContext context) Returns the value of thepartVisibilityrecord component.Returns the value of therenderTypeGrouprecord component.@Nullable TransformationReturns the value of therootTransformrecord component.textures()Returns the value of thetexturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
parent
The field for theparentrecord component. -
textures
The field for thetexturesrecord component. -
itemTransforms
The field for theitemTransformsrecord component. -
ambientOcclusion
The field for theambientOcclusionrecord component. -
guiLight
The field for theguiLightrecord component. -
rootTransform
The field for therootTransformrecord component. -
renderTypeGroup
The field for therenderTypeGrouprecord component. -
partVisibility
The field for thepartVisibilityrecord 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 aStandardModelParametersrecord class.- Parameters:
parent- the value for theparentrecord componenttextures- the value for thetexturesrecord componentitemTransforms- the value for theitemTransformsrecord componentambientOcclusion- the value for theambientOcclusionrecord componentguiLight- the value for theguiLightrecord componentrootTransform- the value for therootTransformrecord componentrenderTypeGroup- the value for therenderTypeGrouprecord componentpartVisibility- the value for thepartVisibilityrecord component
-
-
Method Details
-
parse
public static StandardModelParameters parse(JsonObject jsonObject, 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 theparentrecord component.- Returns:
- the value of the
parentrecord component
-
textures
Returns the value of thetexturesrecord component.- Returns:
- the value of the
texturesrecord component
-
itemTransforms
Returns the value of theitemTransformsrecord component.- Returns:
- the value of the
itemTransformsrecord component
-
ambientOcclusion
Returns the value of theambientOcclusionrecord component.- Returns:
- the value of the
ambientOcclusionrecord component
-
guiLight
Returns the value of theguiLightrecord component.- Returns:
- the value of the
guiLightrecord component
-
rootTransform
Returns the value of therootTransformrecord component.- Returns:
- the value of the
rootTransformrecord component
-
renderTypeGroup
Returns the value of therenderTypeGrouprecord component.- Returns:
- the value of the
renderTypeGrouprecord component
-
partVisibility
Returns the value of thepartVisibilityrecord component.- Returns:
- the value of the
partVisibilityrecord component
-