Record Class BakedQuad
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BakedQuad
- Record Components:
hasAmbientOcclusion-falseto force-disable AO for this quad ortrueto use the behavior dictated byinvalid reference
net.neoforged.neoforge.client.extensions.IBakedModelExtension#useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState, net.neoforged.neoforge.model.data.ModelData, net.minecraft.client.renderer.RenderType)
public record BakedQuad(int[] vertices, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission, boolean hasAmbientOcclusion)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DirectionThe field for thedirectionrecord component.private final booleanThe field for thehasAmbientOcclusionrecord 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.private final int[]The field for theverticesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBakedQuad(int[] vertices, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission) BakedQuad(int[] vertices, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission, boolean hasAmbientOcclusion) Creates an instance of aBakedQuadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasAmbientOcclusionrecord component.final inthashCode()Returns a hash code value for this object.booleanisTinted()intReturns the value of thelightEmissionrecord component.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.int[]vertices()Returns the value of theverticesrecord component.
-
Field Details
-
vertices
private final int[] verticesThe field for theverticesrecord component. -
tintIndex
private final int tintIndexThe field for thetintIndexrecord component. -
direction
The field for thedirectionrecord component. -
sprite
The field for thespriterecord component. -
shade
private final boolean shadeThe field for theshaderecord component. -
lightEmission
private final int lightEmissionThe field for thelightEmissionrecord component. -
hasAmbientOcclusion
private final boolean hasAmbientOcclusionThe field for thehasAmbientOcclusionrecord component.
-
-
Constructor Details
-
BakedQuad
public BakedQuad(int[] vertices, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission) -
BakedQuad
public BakedQuad(int[] vertices, int tintIndex, Direction direction, TextureAtlasSprite sprite, boolean shade, int lightEmission, boolean hasAmbientOcclusion) Creates an instance of aBakedQuadrecord class.- Parameters:
vertices- the value for theverticesrecord componenttintIndex- the value for thetintIndexrecord componentdirection- the value for thedirectionrecord componentsprite- the value for thespriterecord componentshade- the value for theshaderecord componentlightEmission- the value for thelightEmissionrecord componenthasAmbientOcclusion- the value for thehasAmbientOcclusionrecord component
-
-
Method Details
-
isTinted
public boolean isTinted() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
vertices
public int[] vertices()Returns the value of theverticesrecord component.- Returns:
- the value of the
verticesrecord component
-
tintIndex
public int tintIndex()Returns the value of thetintIndexrecord component.- Returns:
- the value of the
tintIndexrecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
sprite
Returns the value of thespriterecord component.- Returns:
- the value of the
spriterecord 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
-
hasAmbientOcclusion
public boolean hasAmbientOcclusion()Returns the value of thehasAmbientOcclusionrecord component.- Returns:
- the value of the
hasAmbientOcclusionrecord component
-