I am trying to use ScreenshotHelper methods createScreenshot and saveScreenshot, but it's only creating a blank file.
Framebuffer buffer = new Framebuffer(minecraft.displayWidth, minecraft.displayHeight, true);
ScreenShotHelper.createScreenshot(minecraft.displayHeight, minecraft.displayWidth, buffer);
ScreenShotHelper.saveScreenshot(gameDirectory, "screenshot.png", minecraft.displayWidth, minecraft.displayHeight, buffer);
This is what I'm doing. I'm pretty sure the issue is the buffer argument. I'm not too sure what the correct value should be. What am I doing wrong here? I know createScreenshot returns a BufferedImage, but is that BufferedImage the actual screenshot?
I attached the result png of this code: