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 int
private final Entity
private final InterpolationHandler.InterpolationData
private int
private final Consumer
<InterpolationHandler> private Vec3
private 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 TypeMethodDescriptionvoid
cancel()
boolean
void
void
interpolateTo
(Vec3 pPos, float pYRot, float pXRot) position()
void
setInterpolationLength
(int pInterpolationLength) float
xRot()
float
yRot()
-
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()
-