Record Class BlockModel
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BlockModel
- All Implemented Interfaces:
ResolvableModel, UnbakedModel, UnbakedModelExtension
public record BlockModel(@Nullable UnbakedGeometry geometry, @Nullable UnbakedModel.GuiLight guiLight, @Nullable Boolean ambientOcclusion, @Nullable ItemTransforms transforms, TextureSlots.Data textureSlots, @Nullable Identifier parent, @Nullable Transformation rootTransform, Map<String,Boolean> partVisibility)
extends Record
implements UnbakedModel
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface ResolvableModel
ResolvableModel.ResolverNested classes/interfaces inherited from interface UnbakedModel
UnbakedModel.GuiLight -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @Nullable BooleanThe field for theambientOcclusionrecord component.private final @Nullable UnbakedGeometryThe field for thegeometryrecord component.static final Gsonprivate final @Nullable UnbakedModel.GuiLightThe field for theguiLightrecord component.private final @Nullable IdentifierThe field for theparentrecord component.The field for thepartVisibilityrecord component.private final @Nullable TransformationThe field for therootTransformrecord component.private final TextureSlots.DataThe field for thetextureSlotsrecord component.private final @Nullable ItemTransformsThe field for thetransformsrecord component.Fields inherited from interface UnbakedModel
PARTICLE_TEXTURE_REFERENCE -
Constructor Summary
ConstructorsConstructorDescriptionBlockModel(@Nullable UnbakedGeometry geometry, @Nullable UnbakedModel.GuiLight guiLight, @Nullable Boolean ambientOcclusion, @Nullable ItemTransforms transforms, TextureSlots.Data textureSlots, @Nullable Identifier parent) BlockModel(@Nullable UnbakedGeometry geometry, @Nullable UnbakedModel.GuiLight guiLight, @Nullable Boolean ambientOcclusion, @Nullable ItemTransforms transforms, TextureSlots.Data textureSlots, @Nullable Identifier parent, @Nullable Transformation rootTransform, Map<String, Boolean> partVisibility) Creates an instance of aBlockModelrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of theambientOcclusionrecord component.final booleanIndicates whether some other object is "equal to" this one.voidfillAdditionalProperties(ContextMap.Builder propertiesBuilder) Appends additional properties for this model to the builder.static BlockModelfromStream(Reader reader) Deprecated.@Nullable UnbakedGeometrygeometry()Returns the value of thegeometryrecord component.@Nullable UnbakedModel.GuiLightguiLight()Returns the value of theguiLightrecord component.final inthashCode()Returns a hash code value for this object.@Nullable Identifierparent()Returns the value of theparentrecord component.Returns the value of thepartVisibilityrecord component.@Nullable TransformationReturns the value of therootTransformrecord component.Returns the value of thetextureSlotsrecord component.final StringtoString()Returns a string representation of this record class.@Nullable ItemTransformsReturns the value of thetransformsrecord component.Methods inherited from interface UnbakedModelExtension
resolveDependencies
-
Field Details
-
geometry
The field for thegeometryrecord component. -
guiLight
The field for theguiLightrecord component. -
ambientOcclusion
The field for theambientOcclusionrecord component. -
transforms
The field for thetransformsrecord component. -
textureSlots
The field for thetextureSlotsrecord component. -
parent
The field for theparentrecord component. -
rootTransform
The field for therootTransformrecord component. -
partVisibility
-
GSON
-
-
Constructor Details
-
BlockModel
public BlockModel(@Nullable UnbakedGeometry geometry, @Nullable UnbakedModel.GuiLight guiLight, @Nullable Boolean ambientOcclusion, @Nullable ItemTransforms transforms, TextureSlots.Data textureSlots, @Nullable Identifier parent) -
BlockModel
public BlockModel(@Nullable UnbakedGeometry geometry, @Nullable UnbakedModel.GuiLight guiLight, @Nullable Boolean ambientOcclusion, @Nullable ItemTransforms transforms, TextureSlots.Data textureSlots, @Nullable Identifier parent, @Nullable Transformation rootTransform, Map<String, Boolean> partVisibility) Creates an instance of aBlockModelrecord class.- Parameters:
geometry- the value for thegeometryrecord componentguiLight- the value for theguiLightrecord componentambientOcclusion- the value for theambientOcclusionrecord componenttransforms- the value for thetransformsrecord componenttextureSlots- the value for thetextureSlotsrecord componentparent- the value for theparentrecord componentrootTransform- the value for therootTransformrecord componentpartVisibility- the value for thepartVisibilityrecord component
-
-
Method Details
-
fromStream
Deprecated.Neo: useUnbakedModelParser.parse(Reader)instead -
fillAdditionalProperties
Description copied from interface:UnbakedModelExtensionAppends additional properties for this model to the builder.This method will already have been called on the parent models. It can modify the properties added by a parent model and/or add its own. This ensures that the properties are merged across the model parent-child chain.
The context map containing all the properties can be retrieved later using
ResolvedModelExtension.getTopAdditionalProperties().- Specified by:
fillAdditionalPropertiesin interfaceUnbakedModelExtension- See Also:
-
toString
-
hashCode
-
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). -
geometry
Returns the value of thegeometryrecord component.- Specified by:
geometryin interfaceUnbakedModel- Returns:
- the value of the
geometryrecord component
-
guiLight
Returns the value of theguiLightrecord component.- Specified by:
guiLightin interfaceUnbakedModel- Returns:
- the value of the
guiLightrecord component
-
ambientOcclusion
Returns the value of theambientOcclusionrecord component.- Specified by:
ambientOcclusionin interfaceUnbakedModel- Returns:
- the value of the
ambientOcclusionrecord component
-
transforms
Returns the value of thetransformsrecord component.- Specified by:
transformsin interfaceUnbakedModel- Returns:
- the value of the
transformsrecord component
-
textureSlots
Returns the value of thetextureSlotsrecord component.- Specified by:
textureSlotsin interfaceUnbakedModel- Returns:
- the value of the
textureSlotsrecord component
-
parent
Returns the value of theparentrecord component.- Specified by:
parentin interfaceUnbakedModel- Returns:
- the value of the
parentrecord component
-
rootTransform
Returns the value of therootTransformrecord component.- Returns:
- the value of the
rootTransformrecord component
-
partVisibility
-
UnbakedModelParser.parse(Reader)instead