记录类 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
-
字段概要
字段修饰符和类型字段说明private final EntityAttachments
attachments
记录组件的字段。private final float
eyeHeight
记录组件的字段。private final boolean
fixed
记录组件的字段。private final float
height
记录组件的字段。private final float
width
记录组件的字段。 -
构造器概要
构造器限定符构造器说明private
EntityDimensions
(float p_20381_, float p_20382_, boolean p_20383_) EntityDimensions
(float width, float height, float eyeHeight, EntityAttachments attachments, boolean fixed) 创建EntityDimensions
记录类的实例。 -
方法概要
修饰符和类型方法说明返回attachments
记录组件的值。private static float
defaultEyeHeight
(float p_316329_) final boolean
指示某个其他对象是否“等于”此对象。float
返回eyeHeight
记录组件的值。boolean
fixed()
返回fixed
记录组件的值。static EntityDimensions
fixed
(float p_20399_, float p_20400_) final int
hashCode()
返回此对象的哈希代码值。float
height()
返回height
记录组件的值。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()
返回此记录类的字符串表示形式。float
width()
返回width
记录组件的值。withAttachments
(EntityAttachments.Builder p_316576_) withEyeHeight
(float p_316487_)
-
字段详细资料
-
width
private final float widthwidth
记录组件的字段。 -
height
private final float heightheight
记录组件的字段。 -
eyeHeight
private final float eyeHeighteyeHeight
记录组件的字段。 -
attachments
attachments
记录组件的字段。 -
fixed
private final boolean fixedfixed
记录组件的字段。
-
-
构造器详细资料
-
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) 创建EntityDimensions
记录类的实例。- 参数:
width
-width
记录组件的值height
-height
记录组件的值eyeHeight
-eyeHeight
记录组件的值attachments
-attachments
记录组件的值fixed
-fixed
记录组件的值
-
-
方法详细资料
-
defaultEyeHeight
private static float defaultEyeHeight(float p_316329_) -
makeBoundingBox
-
makeBoundingBox
-
scale
-
scale
-
scalable
-
fixed
-
withEyeHeight
-
withAttachments
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
width
public float width()返回width
记录组件的值。- 返回:
width
记录组件的值
-
height
public float height()返回height
记录组件的值。- 返回:
height
记录组件的值
-
eyeHeight
public float eyeHeight()返回eyeHeight
记录组件的值。- 返回:
eyeHeight
记录组件的值
-
attachments
返回attachments
记录组件的值。- 返回:
attachments
记录组件的值
-
fixed
public boolean fixed()返回fixed
记录组件的值。- 返回:
fixed
记录组件的值
-