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, RenderType itemGlintRenderType, RenderType itemGlintSpecialRenderType, int tintIndex, @Nullable Direction shadeDirectionOverride, int lightEmission, boolean ambientOcclusion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theambientOcclusionrecord component.private final RenderTypeThe field for theitemGlintRenderTyperecord component.private final RenderTypeThe field for theitemGlintSpecialRenderTyperecord component.private final RenderTypeThe field for theitemRenderTyperecord component.private final ChunkSectionLayerThe field for thelayerrecord component.private final intThe field for thelightEmissionrecord component.The field for theshadeDirectionOverriderecord component.private final TextureAtlasSpriteThe field for thespriterecord component.private final intThe field for thetintIndexrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, RenderType itemGlintRenderType, RenderType itemGlintSpecialRenderType, int tintIndex, @Nullable Direction shadeDirectionOverride, int lightEmission) Deprecated.MaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, RenderType itemGlintRenderType, RenderType itemGlintSpecialRenderType, int tintIndex, @Nullable Direction shadeDirectionOverride, 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 theitemGlintRenderTyperecord component.Returns the value of theitemGlintSpecialRenderTyperecord component.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, @Nullable Direction shadeDirectionOverride, int lightEmission) static BakedQuad.MaterialInfoof(Material.Baked material, Transparency transparency, int tintIndex, @Nullable Direction shadeDirectionOverride, int lightEmission, boolean ambientOcclusion) Returns the value of theshadeDirectionOverriderecord 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. -
itemGlintRenderType
The field for theitemGlintRenderTyperecord component. -
itemGlintSpecialRenderType
The field for theitemGlintSpecialRenderTyperecord component. -
tintIndex
private final int tintIndexThe field for thetintIndexrecord component. -
shadeDirectionOverride
-
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, RenderType itemGlintRenderType, RenderType itemGlintSpecialRenderType, int tintIndex, @Nullable Direction shadeDirectionOverride, int lightEmission) -
MaterialInfo
public MaterialInfo(TextureAtlasSprite sprite, ChunkSectionLayer layer, RenderType itemRenderType, RenderType itemGlintRenderType, RenderType itemGlintSpecialRenderType, int tintIndex, @Nullable Direction shadeDirectionOverride, 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 componentitemGlintRenderType- the value for theitemGlintRenderTyperecord componentitemGlintSpecialRenderType- the value for theitemGlintSpecialRenderTyperecord componenttintIndex- the value for thetintIndexrecord componentshadeDirectionOverride- the value for theshadeDirectionOverriderecord 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, @Nullable Direction shadeDirectionOverride, int lightEmission) -
of
public static BakedQuad.MaterialInfo of(Material.Baked material, Transparency transparency, int tintIndex, @Nullable Direction shadeDirectionOverride, 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
-
itemGlintRenderType
Returns the value of theitemGlintRenderTyperecord component.- Returns:
- the value of the
itemGlintRenderTyperecord component
-
itemGlintSpecialRenderType
Returns the value of theitemGlintSpecialRenderTyperecord component.- Returns:
- the value of the
itemGlintSpecialRenderTyperecord component
-
tintIndex
public int tintIndex()Returns the value of thetintIndexrecord component.- Returns:
- the value of the
tintIndexrecord component
-
shadeDirectionOverride
-
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, RenderType, RenderType, int, Direction, int, boolean)instead