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
FieldsModifier and TypeFieldDescriptionprivate final EntityAttachmentsThe field for theattachmentsrecord component.private final floatThe field for theeyeHeightrecord component.private final booleanThe field for thefixedrecord component.private final floatThe field for theheightrecord component.private final floatThe field for thewidthrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEntityDimensions(float p_20381_, float p_20382_, boolean p_20383_) EntityDimensions(float width, float height, float eyeHeight, EntityAttachments attachments, boolean fixed) Creates an instance of aEntityDimensionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattachmentsrecord component.private static floatdefaultEyeHeight(float p_316329_) final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of theeyeHeightrecord component.booleanfixed()Returns the value of thefixedrecord component.static EntityDimensionsfixed(float p_20399_, float p_20400_) final inthashCode()Returns a hash code value for this object.floatheight()Returns the value of theheightrecord component.makeBoundingBox(double p_20385_, double p_20386_, double p_20387_) makeBoundingBox(Vec3 p_20394_) static EntityDimensionsscalable(float p_20396_, float p_20397_) scale(float p_20389_) scale(float p_20391_, float p_20392_) final StringtoString()Returns a string representation of this record class.floatwidth()Returns the value of thewidthrecord component.withAttachments(EntityAttachments.Builder p_316576_) withEyeHeight(float p_316487_)
-
Field Details
-
width
private final float widthThe field for thewidthrecord component. -
height
private final float heightThe field for theheightrecord component. -
eyeHeight
private final float eyeHeightThe field for theeyeHeightrecord component. -
attachments
The field for theattachmentsrecord component. -
fixed
private final boolean fixedThe field for thefixedrecord 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 aEntityDimensionsrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componenteyeHeight- the value for theeyeHeightrecord componentattachments- the value for theattachmentsrecord componentfixed- the value for thefixedrecord 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 thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
eyeHeight
public float eyeHeight()Returns the value of theeyeHeightrecord component.- Returns:
- the value of the
eyeHeightrecord component
-
attachments
Returns the value of theattachmentsrecord component.- Returns:
- the value of the
attachmentsrecord component
-
fixed
public boolean fixed()Returns the value of thefixedrecord component.- Returns:
- the value of the
fixedrecord component
-