Class InterpolationHandler
java.lang.Object
net.minecraft.world.entity.InterpolationHandler
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate final Entityprivate final InterpolationHandler.InterpolationDataprivate intprivate final @Nullable Consumer<InterpolationHandler> private @Nullable Vec3private @Nullable Vec2 -
Constructor Summary
ConstructorsConstructorDescriptionInterpolationHandler(Entity entity) InterpolationHandler(Entity entity, int interpolationSteps) InterpolationHandler(Entity entity, int interpolationSteps, @Nullable Consumer<InterpolationHandler> onInterpolationStart) InterpolationHandler(Entity entity, @Nullable Consumer<InterpolationHandler> onInterpolationStart) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()booleanvoidvoidinterpolateTo(Vec3 position, float yRot, float xRot) position()voidsetInterpolationLength(int steps) floatxRot()floatyRot()
-
Field Details
-
DEFAULT_INTERPOLATION_STEPS
public static final int DEFAULT_INTERPOLATION_STEPS- See Also:
-
entity
-
interpolationSteps
private int interpolationSteps -
interpolationData
-
previousTickPosition
-
previousTickRot
-
onInterpolationStart
-
-
Constructor Details
-
InterpolationHandler
-
InterpolationHandler
-
InterpolationHandler
public InterpolationHandler(Entity entity, @Nullable Consumer<InterpolationHandler> onInterpolationStart) -
InterpolationHandler
public InterpolationHandler(Entity entity, int interpolationSteps, @Nullable Consumer<InterpolationHandler> onInterpolationStart)
-
-
Method Details
-
position
-
yRot
public float yRot() -
xRot
public float xRot() -
interpolateTo
-
hasActiveInterpolation
public boolean hasActiveInterpolation() -
setInterpolationLength
public void setInterpolationLength(int steps) -
interpolate
public void interpolate() -
cancel
public void cancel()
-