Package net.minecraft.world.entity
Record Class PositionMoveRotation
java.lang.Object
java.lang.Record
net.minecraft.world.entity.PositionMoveRotation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Vec3
The field for thedeltaMovement
record component.private final Vec3
The field for theposition
record component.static final StreamCodec
<FriendlyByteBuf, PositionMoveRotation> private final float
The field for thexRot
record component.private final float
The field for theyRot
record component. -
Constructor Summary
ConstructorsConstructorDescriptionPositionMoveRotation
(Vec3 position, Vec3 deltaMovement, float yRot, float xRot) Creates an instance of aPositionMoveRotation
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic PositionMoveRotation
calculateAbsolute
(PositionMoveRotation p_371265_, PositionMoveRotation p_371276_, Set<Relative> p_371779_) private static double
calculateDelta
(double p_371633_, double p_371363_, Set<Relative> p_371682_, Relative p_371585_) Returns the value of thedeltaMovement
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static PositionMoveRotation
static PositionMoveRotation
of
(TeleportTransition p_379436_) position()
Returns the value of theposition
record component.final String
toString()
Returns a string representation of this record class.float
xRot()
Returns the value of thexRot
record component.float
yRot()
Returns the value of theyRot
record component.
-
Field Details
-
position
The field for theposition
record component. -
deltaMovement
The field for thedeltaMovement
record component. -
yRot
private final float yRotThe field for theyRot
record component. -
xRot
private final float xRotThe field for thexRot
record component. -
STREAM_CODEC
-
-
Constructor Details
-
PositionMoveRotation
Creates an instance of aPositionMoveRotation
record class.- Parameters:
position
- the value for theposition
record componentdeltaMovement
- the value for thedeltaMovement
record componentyRot
- the value for theyRot
record componentxRot
- the value for thexRot
record component
-
-
Method Details
-
of
-
of
-
calculateAbsolute
public static PositionMoveRotation calculateAbsolute(PositionMoveRotation p_371265_, PositionMoveRotation p_371276_, Set<Relative> p_371779_) -
calculateDelta
-
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 '=='. -
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
deltaMovement
Returns the value of thedeltaMovement
record component.- Returns:
- the value of the
deltaMovement
record component
-
yRot
public float yRot()Returns the value of theyRot
record component.- Returns:
- the value of the
yRot
record component
-
xRot
public float xRot()Returns the value of thexRot
record component.- Returns:
- the value of the
xRot
record component
-