Record Class BakedQuad.MaterialInfo
java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.geometry.BakedQuad.MaterialInfo
- Record Components:
ambientOcclusion-falseto force-disable AO for this quad ortrueto use the behavior dictated byBlockStateModelPartExtension.ambientOcclusion().
- Enclosing class:
BakedQuad
public static record BakedQuad.MaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, int tintIndex, boolean shade, int lightEmission, boolean ambientOcclusion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theambientOcclusionrecord component.private final RenderTypeThe field for theitemRenderTyperecord component.private final ChunkSectionLayerThe field for thelayerrecord component.private final intThe field for thelightEmissionrecord component.private final booleanThe field for theshaderecord component.private final TextureAtlasSpriteThe field for thespriterecord component.private final intThe field for thetintIndexrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, int tintIndex, boolean shade, int lightEmission) Deprecated.MaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, int tintIndex, boolean shade, int lightEmission, boolean ambientOcclusion) Creates an instance of aMaterialInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theambientOcclusionrecord component.final booleanIndicates whether some other object is "equal to" this one.intflags()final inthashCode()Returns a hash code value for this object.booleanisTinted()Returns the value of theitemRenderTyperecord component.layer()Returns the value of thelayerrecord component.intReturns the value of thelightEmissionrecord component.static BakedQuad.MaterialInfoof(Material.Baked material, Transparency transparency, int tintIndex, boolean shade, int lightEmission) static BakedQuad.MaterialInfoof(Material.Baked material, Transparency transparency, int tintIndex, boolean shade, int lightEmission, boolean ambientOcclusion) booleanshade()Returns the value of theshaderecord component.sprite()Returns the value of thespriterecord component.intReturns the value of thetintIndexrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sprite
The field for thespriterecord component. -
layer
The field for thelayerrecord component. -
itemRenderType
The field for theitemRenderTyperecord component. -
tintIndex
private final int tintIndexThe field for thetintIndexrecord component. -
shade
private final boolean shadeThe field for theshaderecord component. -
lightEmission
private final int lightEmissionThe field for thelightEmissionrecord component. -
ambientOcclusion
private final boolean ambientOcclusionThe field for theambientOcclusionrecord component.
-
-
Constructor Details
-
MaterialInfo
@Deprecated public MaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, int tintIndex, boolean shade, int lightEmission) Deprecated. -
MaterialInfo
public MaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, int tintIndex, boolean shade, int lightEmission, boolean ambientOcclusion) Creates an instance of aMaterialInforecord class.- Parameters:
sprite- the value for thespriterecord componentlayer- the value for thelayerrecord componentitemRenderType- the value for theitemRenderTyperecord componenttintIndex- the value for thetintIndexrecord componentshade- the value for theshaderecord componentlightEmission- the value for thelightEmissionrecord componentambientOcclusion- the value for theambientOcclusionrecord component
-
-
Method Details
-
of
@Deprecated public static BakedQuad.MaterialInfo of(Material.Baked material, Transparency transparency, int tintIndex, boolean shade, int lightEmission) -
of
public static BakedQuad.MaterialInfo of(Material.Baked material, Transparency transparency, int tintIndex, boolean shade, int lightEmission, boolean ambientOcclusion) -
isTinted
public boolean isTinted() -
flags
public int flags() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord component
-
layer
Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
itemRenderType
Returns the value of theitemRenderTyperecord component.- Returns:
- the value of the
itemRenderTyperecord component
-
tintIndex
public int tintIndex()Returns the value of thetintIndexrecord component.- Returns:
- the value of the
tintIndexrecord component
-
shade
public boolean shade()Returns the value of theshaderecord component.- Returns:
- the value of the
shaderecord component
-
lightEmission
public int lightEmission()Returns the value of thelightEmissionrecord component.- Returns:
- the value of the
lightEmissionrecord component
-
ambientOcclusion
public boolean ambientOcclusion()Returns the value of theambientOcclusionrecord component.- Returns:
- the value of the
ambientOcclusionrecord component
-
MaterialInfo(TextureAtlasSprite, ChunkSectionLayer, RenderType, int, boolean, int, boolean)instead