Record Class VibrationInfo
java.lang.Object
java.lang.Record
net.minecraft.world.level.gameevent.vibrations.VibrationInfo
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<VibrationInfo>private final floatThe field for thedistancerecord component.private final EntityThe field for theentityrecord component.private final GameEventThe field for thegameEventrecord component.private final Vec3The field for theposrecord component.private final UUIDThe field for theprojectileOwnerUuidrecord component.private final UUIDThe field for theuuidrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionVibrationInfo(GameEvent p_249055_, float p_250190_, Vec3 p_251692_, UUID p_249849_, UUID p_249731_) VibrationInfo(GameEvent gameEvent, float distance, Vec3 pos, UUID uuid, UUID projectileOwnerUuid, Entity entity) Creates an instance of aVibrationInforecord class.VibrationInfo(GameEvent p_252023_, float p_251086_, Vec3 p_250935_, Entity p_249432_) 
- 
Method SummaryModifier and TypeMethodDescriptionfloatdistance()Returns the value of thedistancerecord component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegameEventrecord component.getEntity(ServerLevel p_249184_) getProjectileOwner(ServerLevel p_249217_) private static UUIDgetProjectileOwner(Entity p_251531_) final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.Returns the value of theprojectileOwnerUuidrecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
- 
Field Details- 
gameEventThe field for thegameEventrecord component.
- 
distanceprivate final float distanceThe field for thedistancerecord component.
- 
posThe field for theposrecord component.
- 
uuidThe field for theuuidrecord component.
- 
projectileOwnerUuidThe field for theprojectileOwnerUuidrecord component.
- 
entityThe field for theentityrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
VibrationInfo
- 
VibrationInfo
- 
VibrationInfopublic VibrationInfo(GameEvent gameEvent, float distance, Vec3 pos, @Nullable UUID uuid, @Nullable UUID projectileOwnerUuid, @Nullable Entity entity) Creates an instance of aVibrationInforecord class.- Parameters:
- gameEvent- the value for the- gameEventrecord component
- distance- the value for the- distancerecord component
- pos- the value for the- posrecord component
- uuid- the value for the- uuidrecord component
- projectileOwnerUuid- the value for the- projectileOwnerUuidrecord component
- entity- the value for the- entityrecord component
 
 
- 
- 
Method Details- 
getProjectileOwner
- 
getEntity
- 
getProjectileOwner
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
gameEventReturns the value of thegameEventrecord component.- Returns:
- the value of the gameEventrecord component
 
- 
distancepublic float distance()Returns the value of thedistancerecord component.- Returns:
- the value of the distancerecord component
 
- 
posReturns the value of theposrecord component.- Returns:
- the value of the posrecord component
 
- 
uuidReturns the value of theuuidrecord component.- Returns:
- the value of the uuidrecord component
 
- 
projectileOwnerUuidReturns the value of theprojectileOwnerUuidrecord component.- Returns:
- the value of the projectileOwnerUuidrecord component
 
- 
entityReturns the value of theentityrecord component.- Returns:
- the value of the entityrecord component
 
 
-