Package net.minecraft.world.entity
Class InterpolationHandler
java.lang.Object
net.minecraft.world.entity.InterpolationHandler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate final Entityprivate final InterpolationHandler.InterpolationDataprivate intprivate final Consumer<InterpolationHandler> private Vec3private Vec2 -
Constructor Summary
ConstructorsConstructorDescriptionInterpolationHandler(Entity pEntity) InterpolationHandler(Entity pEntity, int pInterpolationSteps) InterpolationHandler(Entity pEntity, int pInterpolationSteps, Consumer<InterpolationHandler> pOnInterpolationStart) InterpolationHandler(Entity pEntity, Consumer<InterpolationHandler> pOnInterpolationStart) -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()booleanvoidvoidinterpolateTo(Vec3 pPos, float pYRot, float pXRot) position()voidsetInterpolationLength(int pInterpolationLength) 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 pEntity, @Nullable Consumer<InterpolationHandler> pOnInterpolationStart) -
InterpolationHandler
public InterpolationHandler(Entity pEntity, int pInterpolationSteps, @Nullable Consumer<InterpolationHandler> pOnInterpolationStart)
-
-
Method Details
-
position
-
yRot
public float yRot() -
xRot
public float xRot() -
interpolateTo
-
hasActiveInterpolation
public boolean hasActiveInterpolation() -
setInterpolationLength
public void setInterpolationLength(int pInterpolationLength) -
interpolate
public void interpolate() -
cancel
public void cancel()
-