Record Class BakedQuad
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BakedQuad
- Record Components:
hasAmbientOcclusion
-false
to force-disable AO for this quad ortrue
to 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 Direction
The field for thedirection
record component.private final boolean
The field for thehasAmbientOcclusion
record component.private final int
The field for thelightEmission
record component.private final boolean
The field for theshade
record component.private final TextureAtlasSprite
The field for thesprite
record component.private final int
The field for thetintIndex
record component.private final int[]
The field for thevertices
record 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 aBakedQuad
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedirection
record component.final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of thehasAmbientOcclusion
record component.final int
hashCode()
Returns a hash code value for this object.boolean
isTinted()
int
Returns the value of thelightEmission
record component.boolean
shade()
Returns the value of theshade
record component.sprite()
Returns the value of thesprite
record component.int
Returns the value of thetintIndex
record component.final String
toString()
Returns a string representation of this record class.int[]
vertices()
Returns the value of thevertices
record component.
-
Field Details
-
vertices
private final int[] verticesThe field for thevertices
record component. -
tintIndex
private final int tintIndexThe field for thetintIndex
record component. -
direction
The field for thedirection
record component. -
sprite
The field for thesprite
record component. -
shade
private final boolean shadeThe field for theshade
record component. -
lightEmission
private final int lightEmissionThe field for thelightEmission
record component. -
hasAmbientOcclusion
private final boolean hasAmbientOcclusionThe field for thehasAmbientOcclusion
record 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 aBakedQuad
record class.- Parameters:
vertices
- the value for thevertices
record componenttintIndex
- the value for thetintIndex
record componentdirection
- the value for thedirection
record componentsprite
- the value for thesprite
record componentshade
- the value for theshade
record componentlightEmission
- the value for thelightEmission
record componenthasAmbientOcclusion
- the value for thehasAmbientOcclusion
record 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 thevertices
record component.- Returns:
- the value of the
vertices
record component
-
tintIndex
public int tintIndex()Returns the value of thetintIndex
record component.- Returns:
- the value of the
tintIndex
record component
-
direction
Returns the value of thedirection
record component.- Returns:
- the value of the
direction
record component
-
sprite
Returns the value of thesprite
record component.- Returns:
- the value of the
sprite
record component
-
shade
public boolean shade()Returns the value of theshade
record component.- Returns:
- the value of the
shade
record component
-
lightEmission
public int lightEmission()Returns the value of thelightEmission
record component.- Returns:
- the value of the
lightEmission
record component
-
hasAmbientOcclusion
public boolean hasAmbientOcclusion()Returns the value of thehasAmbientOcclusion
record component.- Returns:
- the value of the
hasAmbientOcclusion
record component
-