Interface TestScreenshotCommonOptions<SELF extends TestScreenshotCommonOptions<SELF>>
- Type Parameters:
SELF
- The builder class
- All Known Subinterfaces:
TestScreenshotComparisonOptions
,TestScreenshotOptions
@NonExtendable
public interface TestScreenshotCommonOptions<SELF extends TestScreenshotCommonOptions<SELF>>
Base class for screenshot customization options common to taking screenshots and comparing them.
-
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.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
-
disableCounterPrefix
SELF 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
-