@Environment(value=CLIENT) public class ScreenshotUtils extends Object
Modifier and Type | Field and Description |
---|---|
private static DateFormat |
DATE_FORMAT |
private static Logger |
LOGGER |
Constructor and Description |
---|
ScreenshotUtils() |
Modifier and Type | Method and Description |
---|---|
private static File |
getScreenshotFilename(File directory) |
static void |
saveScreenshot(File gameDirectory,
int framebufferWidth,
int framebufferHeight,
Framebuffer framebuffer,
Consumer<Text> messageReceiver) |
static void |
saveScreenshot(File gameDirectory,
String fileName,
int framebufferWidth,
int framebufferHeight,
Framebuffer framebuffer,
Consumer<Text> messageReceiver) |
private static void |
saveScreenshotInner(File gameDirectory,
String fileName,
int framebufferWidth,
int framebufferHeight,
Framebuffer framebuffer,
Consumer<Text> messageReceiver) |
static NativeImage |
takeScreenshot(int width,
int height,
Framebuffer framebuffer) |
private static final Logger LOGGER
private static final DateFormat DATE_FORMAT
public static void saveScreenshot(File gameDirectory, int framebufferWidth, int framebufferHeight, Framebuffer framebuffer, Consumer<Text> messageReceiver)
public static void saveScreenshot(File gameDirectory, @Nullable String fileName, int framebufferWidth, int framebufferHeight, Framebuffer framebuffer, Consumer<Text> messageReceiver)
private static void saveScreenshotInner(File gameDirectory, @Nullable String fileName, int framebufferWidth, int framebufferHeight, Framebuffer framebuffer, Consumer<Text> messageReceiver)
public static NativeImage takeScreenshot(int width, int height, Framebuffer framebuffer)