Class SweepResult

java.lang.Object
net.minestom.server.collision.SweepResult

public final class SweepResult extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final SweepResult
    Deprecated, for removal: This API element is subject to removal in a future version.
    sweep results are mutable and must not be shared
  • Constructor Summary

    Constructors
    Constructor
    Description
    SweepResult(double res, double normalX, double normalY, double normalZ, @Nullable Shape collidedShape, double collidedPosX, double collidedPosY, double collidedPosZ, double collidedShapeX, double collidedShapeY, double collidedShapeZ)
    Store the result of a movement operation
  • Method Summary

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NO_COLLISION

      @Deprecated(forRemoval=true) public static final SweepResult NO_COLLISION
      Deprecated, for removal: This API element is subject to removal in a future version.
      sweep results are mutable and must not be shared
  • Constructor Details

    • SweepResult

      public SweepResult(double res, double normalX, double normalY, double normalZ, @Nullable @Nullable Shape collidedShape, double collidedPosX, double collidedPosY, double collidedPosZ, double collidedShapeX, double collidedShapeY, double collidedShapeZ)
      Store the result of a movement operation
      Parameters:
      res - Percentage of move completed
      normalX - -1 if intersected on left, 1 if intersected on right
      normalY - -1 if intersected on bottom, 1 if intersected on top
      normalZ - -1 if intersected on front, 1 if intersected on back