Interface HitboxVRMovementInfoBuilder

All Known Implementing Classes:
HitboxVRMovementInfoBuilderImpl

public interface HitboxVRMovementInfoBuilder
  • Method Details

    • create

      static HitboxVRMovementInfoBuilder create()
      Starts creation of a HitboxVRMovementInfo.
      Returns:
      A builder object to begin creation.
    • axis

      HitboxVRMovementInfoBuilder axis(@Nullable net.minecraft.core.Direction.Axis axis)
      Sets the axis of movement for the HitboxVRMovementInfo.
      Parameters:
      axis - The axis of movement to detect motion on, or null to detect on all axes combined.
      Returns:
      Builder object.
    • threshold

      HitboxVRMovementInfoBuilder threshold(double threshold)
      Sets the amount of distance that should be covered within a game tick for the movement to have succeeded.
      One positive and one negative threshold can be set. Future sets will override the value already there. For example, setting the thresholds 0.03, -0.02, and 0.02, will have the thresholds for movement detection be 0.02 positive movement and 0.02 negative movement.
      Setting a threshold of 0 will clear both the positive and negative thresholds.
      Parameters:
      threshold - Threshold of movement.
      Returns:
      Builder object.
    • controllerMode

      Sets which controllers are detected for meeting the threshold of movement.
      Parameters:
      controllerMode - Which controller(s) should be watched for meeting the movement threshold.
      Returns:
      Builder object.
    • actionConsumer

      HitboxVRMovementInfoBuilder actionConsumer(BiConsumer<BuiltImmersiveInfo<?>,List<net.minecraft.world.InteractionHand>> actionConsumer)
      Sets a callback to run when the threshold is met.
      Parameters:
      actionConsumer - The callback to run when the threshold is met, taking the info and the hand(s) that met the threshold.
      Returns:
      Builder object.
    • build

      Builds this builder into a HitboxVRMovementInfo.
      Returns:
      The built HitboxVRMovementInfo.