Interface TestScreenshotOptions


@NonExtendable public interface TestScreenshotOptions
Options to customize a screenshot.
  • Method Details

    • of

      static TestScreenshotOptions of(String name)
      Creates a TestScreenshotOptions with the given screenshot name.
      Parameters:
      name - The name of the screenshot
      Returns:
      The new screenshot options instance
    • disableCounterPrefix

      TestScreenshotOptions disableCounterPrefix()
      By default, screenshot file names will be prefixed by a counter so that the screenshots appear in sequence in the screenshots directory. Use this method to disable this behavior.
      Returns:
      This screenshot options instance
    • withTickDelta

      TestScreenshotOptions withTickDelta(float tickDelta)
      Changes the tick delta to take this screenshot with. Tick delta controls interpolation between the previous tick and the current tick to make objects appear to move more smoothly when there are multiple frames in a tick. Defaults to 1, which renders all objects as their appear in the current tick.
      Parameters:
      tickDelta - The tick delta to take this screenshot with
      Returns:
      This screenshot options instance
    • withSize

      TestScreenshotOptions withSize(int width, int height)
      Changes the resolution of the screenshot, which defaults to the resolution of the Minecraft window.
      Parameters:
      width - The width of the screenshot
      height - The height of the screenshot
      Returns:
      This screenshot options instance
    • withDestinationDir

      TestScreenshotOptions withDestinationDir(Path destinationDir)
      Changes the directory in which this screenshot is saved, which defaults to the screenshots directory in the game's run directory.
      Parameters:
      destinationDir - The directory in which to save the screenshot
      Returns:
      This screenshot options instance