Record Class VibrationInfo
java.lang.Object
java.lang.Record
net.minecraft.world.level.gameevent.vibrations.VibrationInfo
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.Codec<VibrationInfo>
private final float
distance
记录组件的字段。private final Entity
entity
记录组件的字段。private final GameEvent
gameEvent
记录组件的字段。private final Vec3
pos
记录组件的字段。private final UUID
projectileOwnerUuid
记录组件的字段。private final UUID
uuid
记录组件的字段。 -
构造器概要
构造器构造器说明VibrationInfo
(GameEvent pGameEvent, float pDistance, Vec3 pPos, UUID pUuid, UUID pProjectileOwnerUuid) VibrationInfo
(GameEvent gameEvent, float distance, Vec3 pos, UUID uuid, UUID projectileOwnerUuid, Entity entity) 创建VibrationInfo
记录的实例。VibrationInfo
(GameEvent pGameEvent, float pDistance, Vec3 pPos, Entity pEntity) -
方法概要
修饰符和类型方法说明float
distance()
返回distance
记录组件的值。entity()
返回entity
记录组件的值。final boolean
指示某个其他对象是否“等于”此对象。返回gameEvent
记录组件的值。getEntity
(ServerLevel pLevel) getProjectileOwner
(ServerLevel pLevel) private static UUID
getProjectileOwner
(Entity pEntity) final int
hashCode()
返回此对象的哈希代码值。pos()
返回pos
记录组件的值。返回projectileOwnerUuid
记录组件的值。final String
toString()
返回此记录的字符串表示形式。uuid()
返回uuid
记录组件的值。
-
字段详细资料
-
gameEvent
gameEvent
记录组件的字段。 -
distance
private final float distancedistance
记录组件的字段。 -
pos
pos
记录组件的字段。 -
uuid
uuid
记录组件的字段。 -
projectileOwnerUuid
projectileOwnerUuid
记录组件的字段。 -
entity
entity
记录组件的字段。 -
CODEC
-
-
构造器详细资料
-
VibrationInfo
-
VibrationInfo
-
VibrationInfo
public VibrationInfo(GameEvent gameEvent, float distance, Vec3 pos, @Nullable UUID uuid, @Nullable UUID projectileOwnerUuid, @Nullable Entity entity) 创建VibrationInfo
记录的实例。- 参数:
gameEvent
-gameEvent
记录组件的值distance
-distance
记录组件的值pos
-pos
记录组件的值uuid
-uuid
记录组件的值projectileOwnerUuid
-projectileOwnerUuid
记录组件的值entity
-entity
记录组件的值
-
-
方法详细资料
-
getProjectileOwner
-
getEntity
-
getProjectileOwner
-
toString
返回此记录的字符串表示形式。此表示形式包含类型的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
gameEvent
返回gameEvent
记录组件的值。- 返回:
gameEvent
记录组件的值
-
distance
public float distance()返回distance
记录组件的值。- 返回:
distance
记录组件的值
-
pos
返回pos
记录组件的值。- 返回:
pos
记录组件的值
-
uuid
返回uuid
记录组件的值。- 返回:
uuid
记录组件的值
-
projectileOwnerUuid
返回projectileOwnerUuid
记录组件的值。- 返回:
projectileOwnerUuid
记录组件的值
-
entity
返回entity
记录组件的值。- 返回:
entity
记录组件的值
-