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
FieldsModifier and TypeFieldDescriptionprivate final @Nullable Boolean
The field for theambientOcclusion
record component.private final net.minecraft.client.resources.model.UnbakedModel.GuiLight
The field for theguiLight
record component.private final @Nullable net.minecraft.client.renderer.block.model.ItemTransforms
The field for theitemTransforms
record component.private final @Nullable net.minecraft.resources.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 com.mojang.math.Transformation
The field for therootTransform
record component.private final net.minecraft.client.renderer.block.model.TextureSlots.Data
The field for thetextures
record component. -
Constructor Summary
ConstructorsConstructorDescriptionStandardModelParameters
(@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 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.net.minecraft.client.resources.model.UnbakedModel.GuiLight
guiLight()
Returns the value of theguiLight
record component.final int
hashCode()
Returns a hash code value for this object.@Nullable net.minecraft.client.renderer.block.model.ItemTransforms
Returns the value of theitemTransforms
record component.@Nullable net.minecraft.resources.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 com.mojang.math.Transformation
Returns the value of therootTransform
record component.net.minecraft.client.renderer.block.model.TextureSlots.Data
textures()
Returns the value of thetextures
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
parent
@Nullable private final @Nullable net.minecraft.resources.ResourceLocation parentThe field for theparent
record component. -
textures
private final net.minecraft.client.renderer.block.model.TextureSlots.Data texturesThe field for thetextures
record component. -
itemTransforms
@Nullable private final @Nullable net.minecraft.client.renderer.block.model.ItemTransforms itemTransformsThe field for theitemTransforms
record component. -
ambientOcclusion
The field for theambientOcclusion
record component. -
guiLight
@Nullable private final net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLightThe field for theguiLight
record component. -
rootTransform
@Nullable private final @Nullable com.mojang.math.Transformation rootTransformThe 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 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 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
@Nullable public @Nullable net.minecraft.resources.ResourceLocation parent()Returns the value of theparent
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 thetextures
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 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
@Nullable public net.minecraft.client.resources.model.UnbakedModel.GuiLight guiLight()Returns the value of theguiLight
record component.- Returns:
- the value of the
guiLight
record component
-
rootTransform
@Nullable public @Nullable com.mojang.math.Transformation 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
-