Record Class PositionStep
java.lang.Object
java.lang.Record
net.minecraft.world.entity.PositionStep
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Vec3The field for thepositionrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, PositionStep> private final intThe field for thetickOffsetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPositionStep(Vec3 position, int tickOffset) Creates an instance of aPositionSteprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.position()Returns the value of thepositionrecord component.intReturns the value of thetickOffsetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
position
The field for thepositionrecord component. -
tickOffset
private final int tickOffsetThe field for thetickOffsetrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
PositionStep
Creates an instance of aPositionSteprecord class.- Parameters:
position- the value for thepositionrecord componenttickOffset- the value for thetickOffsetrecord component
-
-
Method Details
-
addDelta
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
position
Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
tickOffset
public int tickOffset()Returns the value of thetickOffsetrecord component.- Returns:
- the value of the
tickOffsetrecord component
-