Record Class BlockElement
java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.BlockElement
public record BlockElement(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction,BlockElementFace> faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission, ExtraFaceData faceData)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private final ExtraFaceData
The field for thefaceData
record component.private final Map
<Direction, BlockElementFace> The field for thefaces
record component.private final org.joml.Vector3fc
The field for thefrom
record component.private final int
The field for thelightEmission
record component.private static final float
private static final float
private final BlockElementRotation
The field for therotation
record component.private final boolean
The field for theshade
record component.private final org.joml.Vector3fc
The field for theto
record component. -
Constructor Summary
ConstructorsConstructorDescriptionBlockElement
(org.joml.Vector3fc p_405527_, org.joml.Vector3fc p_405454_, Map<Direction, BlockElementFace> p_362722_) BlockElement
(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction, BlockElementFace> faces, BlockElementRotation rotation, boolean shade, int lightEmission) BlockElement
(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction, BlockElementFace> faces, BlockElementRotation rotation, boolean shade, int lightEmission, ExtraFaceData faceData) Creates an instance of aBlockElement
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.faceData()
Returns the value of thefaceData
record component.faces()
Returns the value of thefaces
record component.org.joml.Vector3fc
from()
Returns the value of thefrom
record component.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of thelightEmission
record component.rotation()
Returns the value of therotation
record component.boolean
shade()
Returns the value of theshade
record component.org.joml.Vector3fc
to()
Returns the value of theto
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
from
private final org.joml.Vector3fc fromThe field for thefrom
record component. -
to
private final org.joml.Vector3fc toThe field for theto
record component. -
faces
The field for thefaces
record component. -
rotation
The field for therotation
record component. -
shade
private final boolean shadeThe field for theshade
record component. -
lightEmission
private final int lightEmissionThe field for thelightEmission
record component. -
faceData
The field for thefaceData
record component. -
DEFAULT_RESCALE
private static final boolean DEFAULT_RESCALE- See Also:
-
MIN_EXTENT
private static final float MIN_EXTENT- See Also:
-
MAX_EXTENT
private static final float MAX_EXTENT- See Also:
-
-
Constructor Details
-
BlockElement
public BlockElement(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction, BlockElementFace> faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission, ExtraFaceData faceData) Creates an instance of aBlockElement
record class.- Parameters:
from
- the value for thefrom
record componentto
- the value for theto
record componentfaces
- the value for thefaces
record componentrotation
- the value for therotation
record componentshade
- the value for theshade
record componentlightEmission
- the value for thelightEmission
record componentfaceData
- the value for thefaceData
record component
-
BlockElement
public BlockElement(org.joml.Vector3fc from, org.joml.Vector3fc to, Map<Direction, BlockElementFace> faces, @Nullable BlockElementRotation rotation, boolean shade, int lightEmission) -
BlockElement
public BlockElement(org.joml.Vector3fc p_405527_, org.joml.Vector3fc p_405454_, Map<Direction, BlockElementFace> p_362722_)
-
-
Method Details
-
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 '=='. -
from
public org.joml.Vector3fc from()Returns the value of thefrom
record component.- Returns:
- the value of the
from
record component
-
to
public org.joml.Vector3fc to()Returns the value of theto
record component.- Returns:
- the value of the
to
record component
-
faces
Returns the value of thefaces
record component.- Returns:
- the value of the
faces
record component
-
rotation
Returns the value of therotation
record component.- Returns:
- the value of the
rotation
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
-
faceData
Returns the value of thefaceData
record component.- Returns:
- the value of the
faceData
record component
-