Interface TestScreenshotOptions
@NonExtendable
public interface TestScreenshotOptions
Options to customize a screenshot.
-
Method Summary
Modifier and TypeMethodDescriptionBy default, screenshot file names will be prefixed by a counter so that the screenshots appear in sequence in the screenshots directory.static TestScreenshotOptions
Creates aTestScreenshotOptions
with the given screenshot name.withDestinationDir
(Path destinationDir) Changes the directory in which this screenshot is saved, which defaults to thescreenshots
directory in the game's run directory.withSize
(int width, int height) Changes the resolution of the screenshot, which defaults to the resolution of the Minecraft window.withTickDelta
(float tickDelta) Changes the tick delta to take this screenshot with.
-
Method Details
-
of
Creates aTestScreenshotOptions
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
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 to1
, 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
Changes the resolution of the screenshot, which defaults to the resolution of the Minecraft window.- Parameters:
width
- The width of the screenshotheight
- The height of the screenshot- Returns:
- This screenshot options instance
-
withDestinationDir
Changes the directory in which this screenshot is saved, which defaults to thescreenshots
directory in the game's run directory.- Parameters:
destinationDir
- The directory in which to save the screenshot- Returns:
- This screenshot options instance
-