Record Class VibrationInfo
java.lang.Object
java.lang.Record
net.minecraft.world.level.gameevent.vibrations.VibrationInfo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<VibrationInfo> private final float
The field for thedistance
record component.private final Entity
The field for theentity
record component.The field for thegameEvent
record component.private final Vec3
The field for thepos
record component.private final UUID
The field for theprojectileOwnerUuid
record component.private final UUID
The field for theuuid
record component. -
Constructor Summary
ConstructorDescriptionVibrationInfo
(Holder<GameEvent> p_332399_, float p_250190_, Vec3 p_251692_, UUID p_249849_, UUID p_249731_) VibrationInfo
(Holder<GameEvent> gameEvent, float distance, Vec3 pos, UUID uuid, UUID projectileOwnerUuid, Entity entity) Creates an instance of aVibrationInfo
record class.VibrationInfo
(Holder<GameEvent> p_333558_, float p_251086_, Vec3 p_250935_, Entity p_249432_) -
Method Summary
Modifier and TypeMethodDescriptionfloat
distance()
Returns the value of thedistance
record component.entity()
Returns the value of theentity
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegameEvent
record component.getEntity
(ServerLevel p_249184_) getProjectileOwner
(ServerLevel p_249217_) private static UUID
getProjectileOwner
(Entity p_251531_) final int
hashCode()
Returns a hash code value for this object.pos()
Returns the value of thepos
record component.Returns the value of theprojectileOwnerUuid
record component.final String
toString()
Returns a string representation of this record class.uuid()
Returns the value of theuuid
record component.
-
Field Details
-
gameEvent
The field for thegameEvent
record component. -
distance
private final float distanceThe field for thedistance
record component. -
pos
The field for thepos
record component. -
uuid
The field for theuuid
record component. -
projectileOwnerUuid
The field for theprojectileOwnerUuid
record component. -
entity
The field for theentity
record component. -
CODEC
-
-
Constructor Details
-
VibrationInfo
-
VibrationInfo
-
VibrationInfo
public VibrationInfo(Holder<GameEvent> gameEvent, float distance, Vec3 pos, @Nullable UUID uuid, @Nullable UUID projectileOwnerUuid, @Nullable Entity entity) Creates an instance of aVibrationInfo
record class.- Parameters:
gameEvent
- the value for thegameEvent
record componentdistance
- the value for thedistance
record componentpos
- the value for thepos
record componentuuid
- the value for theuuid
record componentprojectileOwnerUuid
- the value for theprojectileOwnerUuid
record componententity
- the value for theentity
record component
-
-
Method Details
-
getProjectileOwner
-
getEntity
-
getProjectileOwner
-
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 '=='. -
gameEvent
Returns the value of thegameEvent
record component.- Returns:
- the value of the
gameEvent
record component
-
distance
public float distance()Returns the value of thedistance
record component.- Returns:
- the value of the
distance
record component
-
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
uuid
Returns the value of theuuid
record component.- Returns:
- the value of the
uuid
record component
-
projectileOwnerUuid
Returns the value of theprojectileOwnerUuid
record component.- Returns:
- the value of the
projectileOwnerUuid
record component
-
entity
Returns the value of theentity
record component.- Returns:
- the value of the
entity
record component
-