Class InterpolationHandler

java.lang.Object
net.minecraft.world.entity.InterpolationHandler

public class InterpolationHandler extends Object
  • Field Details

    • DEFAULT_INTERPOLATION_STEPS

      public static final int DEFAULT_INTERPOLATION_STEPS
      See Also:
    • entity

      private final Entity entity
    • interpolationSteps

      private int interpolationSteps
    • interpolationData

      private final InterpolationHandler.InterpolationData interpolationData
    • previousTickPosition

      @Nullable private Vec3 previousTickPosition
    • previousTickRot

      @Nullable private Vec2 previousTickRot
    • onInterpolationStart

      @Nullable private final Consumer<InterpolationHandler> onInterpolationStart
  • Constructor Details

    • InterpolationHandler

      public InterpolationHandler(Entity pEntity)
    • InterpolationHandler

      public InterpolationHandler(Entity pEntity, int pInterpolationSteps)
    • InterpolationHandler

      public InterpolationHandler(Entity pEntity, @Nullable Consumer<InterpolationHandler> pOnInterpolationStart)
    • InterpolationHandler

      public InterpolationHandler(Entity pEntity, int pInterpolationSteps, @Nullable Consumer<InterpolationHandler> pOnInterpolationStart)
  • Method Details

    • position

      public Vec3 position()
    • yRot

      public float yRot()
    • xRot

      public float xRot()
    • interpolateTo

      public void interpolateTo(Vec3 pPos, float pYRot, float pXRot)
    • hasActiveInterpolation

      public boolean hasActiveInterpolation()
    • setInterpolationLength

      public void setInterpolationLength(int pInterpolationLength)
    • interpolate

      public void interpolate()
    • cancel

      public void cancel()