Record Class Vibration
java.lang.Object
java.lang.Record
net.minecraft.world.event.listener.Vibration
- Record Components:
gameEvent-distance-pos-uuid-projectileOwnerUuid-entity-
public record Vibration(RegistryEntry<GameEvent> gameEvent, float distance, Vec3d pos, @Nullable UUID uuid, @Nullable UUID projectileOwnerUuid, @Nullable Entity entity)
extends Record
- Mappings:
Namespace Name named net/minecraft/world/event/listener/Vibrationintermediary net/minecraft/class_7269official ersnamed gameEventintermediary comp_657official bnamed distanceintermediary comp_658official cnamed posintermediary comp_659official dnamed uuidintermediary comp_660official enamed projectileOwnerUuidintermediary comp_681official fnamed entityintermediary comp_661official g
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Vibration> private final floatThe field for thedistancerecord component.The field for theentityrecord component.private final RegistryEntry<GameEvent> The field for thegameEventrecord component.private final Vec3dThe field for theposrecord component.The field for theprojectileOwnerUuidrecord component.The field for theuuidrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionVibration(RegistryEntry<GameEvent> gameEvent, float distance, Vec3d pos, @Nullable UUID uuid, @Nullable UUID projectileOwnerUuid) Vibration(RegistryEntry<GameEvent> gameEvent, float distance, Vec3d pos, @Nullable UUID uuid, @Nullable UUID projectileOwnerUuid, @Nullable Entity entity) Creates an instance of aVibrationrecord class. -
Method Summary
Modifier 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(ServerWorld world) getOwner(ServerWorld world) getOwnerUuid(@Nullable Entity entity) 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
-
gameEvent
The field for thegameEventrecord component. -
distance
private final float distanceThe field for thedistancerecord component. -
pos
The field for theposrecord component. -
uuid
The field for theuuidrecord component. -
projectileOwnerUuid
The field for theprojectileOwnerUuidrecord component. -
entity
The field for theentityrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/world/event/listener/Vibration;CODEC:Lcom/mojang/serialization/Codec;intermediary field_38245Lnet/minecraft/class_7269;field_38245:Lcom/mojang/serialization/Codec;official aLers;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
Vibration
public Vibration(RegistryEntry<GameEvent> gameEvent, float distance, Vec3d pos, @Nullable @Nullable UUID uuid, @Nullable @Nullable UUID projectileOwnerUuid) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/world/event/listener/Vibration;<init>(Lnet/minecraft/registry/entry/RegistryEntry;FLnet/minecraft/util/math/Vec3d;Ljava/util/UUID;Ljava/util/UUID;)Vintermediary <init>Lnet/minecraft/class_7269;<init>(Lnet/minecraft/class_6880;FLnet/minecraft/class_243;Ljava/util/UUID;Ljava/util/UUID;)Vofficial <init>Lers;<init>(Ljj;FLfrd;Ljava/util/UUID;Ljava/util/UUID;)V
-
Vibration
public Vibration(RegistryEntry<GameEvent> gameEvent, float distance, Vec3d pos, @Nullable @Nullable Entity entity) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/world/event/listener/Vibration;<init>(Lnet/minecraft/registry/entry/RegistryEntry;FLnet/minecraft/util/math/Vec3d;Lnet/minecraft/entity/Entity;)Vintermediary <init>Lnet/minecraft/class_7269;<init>(Lnet/minecraft/class_6880;FLnet/minecraft/class_243;Lnet/minecraft/class_1297;)Vofficial <init>Lers;<init>(Ljj;FLfrd;Lcgd;)V
-
Vibration
public Vibration(RegistryEntry<GameEvent> gameEvent, float distance, Vec3d pos, @Nullable @Nullable UUID uuid, @Nullable @Nullable UUID projectileOwnerUuid, @Nullable @Nullable Entity entity) Creates an instance of aVibrationrecord class.- Parameters:
gameEvent- the value for thegameEventrecord componentdistance- the value for thedistancerecord componentpos- the value for theposrecord componentuuid- the value for theuuidrecord componentprojectileOwnerUuid- the value for theprojectileOwnerUuidrecord componententity- the value for theentityrecord component
-
-
Method Details
-
getOwnerUuid
- Mappings:
Namespace Name Mixin selector named getOwnerUuidLnet/minecraft/world/event/listener/Vibration;getOwnerUuid(Lnet/minecraft/entity/Entity;)Ljava/util/UUID;intermediary method_42684Lnet/minecraft/class_7269;method_42684(Lnet/minecraft/class_1297;)Ljava/util/UUID;official aLers;a(Lcgd;)Ljava/util/UUID;
-
getEntity
- Mappings:
Namespace Name Mixin selector named getEntityLnet/minecraft/world/event/listener/Vibration;getEntity(Lnet/minecraft/server/world/ServerWorld;)Ljava/util/Optional;intermediary method_42348Lnet/minecraft/class_7269;method_42348(Lnet/minecraft/class_3218;)Ljava/util/Optional;official aLers;a(Laxl;)Ljava/util/Optional;
-
getOwner
- Mappings:
Namespace Name Mixin selector named getOwnerLnet/minecraft/world/event/listener/Vibration;getOwner(Lnet/minecraft/server/world/ServerWorld;)Ljava/util/Optional;intermediary method_42687Lnet/minecraft/class_7269;method_42687(Lnet/minecraft/class_3218;)Ljava/util/Optional;official bLers;b(Laxl;)Ljava/util/Optional;
-
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 thegameEventrecord component.- Returns:
- the value of the
gameEventrecord component
-
distance
public float distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
projectileOwnerUuid
Returns the value of theprojectileOwnerUuidrecord component.- Returns:
- the value of the
projectileOwnerUuidrecord component
-
entity
Returns the value of theentityrecord component.- Returns:
- the value of the
entityrecord component
-