Package net.minecraft.world.entity
Record Class EntityDimensions
java.lang.Object
java.lang.Record
net.minecraft.world.entity.EntityDimensions
public record EntityDimensions(float width, float height, float eyeHeight, EntityAttachments attachments, boolean fixed)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final EntityAttachments
The field for theattachments
record component.private final float
The field for theeyeHeight
record component.private final boolean
The field for thefixed
record component.private final float
The field for theheight
record component.private final float
The field for thewidth
record component. -
Constructor Summary
ModifierConstructorDescriptionprivate
EntityDimensions
(float p_20381_, float p_20382_, boolean p_20383_) EntityDimensions
(float width, float height, float eyeHeight, EntityAttachments attachments, boolean fixed) Creates an instance of aEntityDimensions
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachments
record component.private static float
defaultEyeHeight
(float p_316329_) final boolean
Indicates whether some other object is "equal to" this one.float
Returns the value of theeyeHeight
record component.boolean
fixed()
Returns the value of thefixed
record component.static EntityDimensions
fixed
(float p_20399_, float p_20400_) final int
hashCode()
Returns a hash code value for this object.float
height()
Returns the value of theheight
record component.makeBoundingBox
(double p_20385_, double p_20386_, double p_20387_) makeBoundingBox
(Vec3 p_20394_) static EntityDimensions
scalable
(float p_20396_, float p_20397_) scale
(float p_20389_) scale
(float p_20391_, float p_20392_) final String
toString()
Returns a string representation of this record class.float
width()
Returns the value of thewidth
record component.withAttachments
(EntityAttachments.Builder p_316576_) withEyeHeight
(float p_316487_)
-
Field Details
-
width
private final float widthThe field for thewidth
record component. -
height
private final float heightThe field for theheight
record component. -
eyeHeight
private final float eyeHeightThe field for theeyeHeight
record component. -
attachments
The field for theattachments
record component. -
fixed
private final boolean fixedThe field for thefixed
record component.
-
-
Constructor Details
-
EntityDimensions
private EntityDimensions(float p_20381_, float p_20382_, boolean p_20383_) -
EntityDimensions
public EntityDimensions(float width, float height, float eyeHeight, EntityAttachments attachments, boolean fixed) Creates an instance of aEntityDimensions
record class.- Parameters:
width
- the value for thewidth
record componentheight
- the value for theheight
record componenteyeHeight
- the value for theeyeHeight
record componentattachments
- the value for theattachments
record componentfixed
- the value for thefixed
record component
-
-
Method Details
-
defaultEyeHeight
private static float defaultEyeHeight(float p_316329_) -
makeBoundingBox
-
makeBoundingBox
-
scale
-
scale
-
scalable
-
fixed
-
withEyeHeight
-
withAttachments
-
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 '=='. -
width
public float width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
height
public float height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
eyeHeight
public float eyeHeight()Returns the value of theeyeHeight
record component.- Returns:
- the value of the
eyeHeight
record component
-
attachments
Returns the value of theattachments
record component.- Returns:
- the value of the
attachments
record component
-
fixed
public boolean fixed()Returns the value of thefixed
record component.- Returns:
- the value of the
fixed
record component
-