Package net.minecraft.client.util
Class ScreenshotRecorder
java.lang.Object
net.minecraft.client.util.ScreenshotRecorder
A screenshot recorder takes screenshots and saves them into tga file format. It also
holds a few utility methods for other types of screenshots.
- Mappings:
Namespace Name named net/minecraft/client/util/ScreenshotRecorderintermediary net/minecraft/class_318official fgg
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private Fileprivate final intprivate static final Loggerstatic final Stringprivate final DataOutputStreamprivate intprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionScreenshotRecorder(File gameDirectory, int width, int height, int unitHeight) Creates a screenshot recorder for huge screenshots. -
Method Summary
Modifier and TypeMethodDescriptionfinish()Finish taking the screenshot and return the complete tga file.voidgetIntoBuffer(ByteBuffer data, int startWidth, int startHeight, int unitWidth, int unitHeight) Transports image data fromdataintobuffer.private static FilegetScreenshotFilename(File directory) static voidsaveScreenshot(File gameDirectory, @Nullable String fileName, Framebuffer framebuffer, Consumer<Text> messageReceiver) static voidsaveScreenshot(File gameDirectory, Framebuffer framebuffer, Consumer<Text> messageReceiver) private static voidsaveScreenshotInner(File gameDirectory, @Nullable String fileName, Framebuffer framebuffer, Consumer<Text> messageReceiver) static NativeImagetakeScreenshot(Framebuffer framebuffer) void
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/util/ScreenshotRecorder;LOGGER:Lorg/slf4j/Logger;intermediary field_1974Lnet/minecraft/class_318;field_1974:Lorg/slf4j/Logger;official bLfgg;b:Lorg/slf4j/Logger;
-
SCREENSHOTS_DIRECTORY
- See Also:
- Mappings:
Namespace Name Mixin selector named SCREENSHOTS_DIRECTORYLnet/minecraft/client/util/ScreenshotRecorder;SCREENSHOTS_DIRECTORY:Ljava/lang/String;intermediary field_41337Lnet/minecraft/class_318;field_41337:Ljava/lang/String;official aLfgg;a:Ljava/lang/String;
-
unitHeight
private int unitHeight- Mappings:
Namespace Name Mixin selector named unitHeightLnet/minecraft/client/util/ScreenshotRecorder;unitHeight:Iintermediary field_32157Lnet/minecraft/class_318;field_32157:Iofficial cLfgg;c:I
-
stream
- Mappings:
Namespace Name Mixin selector named streamLnet/minecraft/client/util/ScreenshotRecorder;stream:Ljava/io/DataOutputStream;intermediary field_32158Lnet/minecraft/class_318;field_32158:Ljava/io/DataOutputStream;official dLfgg;d:Ljava/io/DataOutputStream;
-
buffer
private final byte[] buffer- Mappings:
Namespace Name Mixin selector named bufferLnet/minecraft/client/util/ScreenshotRecorder;buffer:[Bintermediary field_32159Lnet/minecraft/class_318;field_32159:[Bofficial eLfgg;e:[B
-
width
private final int width- Mappings:
Namespace Name Mixin selector named widthLnet/minecraft/client/util/ScreenshotRecorder;width:Iintermediary field_32160Lnet/minecraft/class_318;field_32160:Iofficial fLfgg;f:I
-
height
private final int height- Mappings:
Namespace Name Mixin selector named heightLnet/minecraft/client/util/ScreenshotRecorder;height:Iintermediary field_32161Lnet/minecraft/class_318;field_32161:Iofficial gLfgg;g:I
-
file
- Mappings:
Namespace Name Mixin selector named fileLnet/minecraft/client/util/ScreenshotRecorder;file:Ljava/io/File;intermediary field_32162Lnet/minecraft/class_318;field_32162:Ljava/io/File;official hLfgg;h:Ljava/io/File;
-
-
Constructor Details
-
ScreenshotRecorder
public ScreenshotRecorder(File gameDirectory, int width, int height, int unitHeight) throws IOException Creates a screenshot recorder for huge screenshots.- Throws:
IOException- See Also:
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/util/ScreenshotRecorder;<init>(Ljava/io/File;III)Vintermediary <init>Lnet/minecraft/class_318;<init>(Ljava/io/File;III)Vofficial <init>Lfgg;<init>(Ljava/io/File;III)V
-
-
Method Details
-
saveScreenshot
public static void saveScreenshot(File gameDirectory, Framebuffer framebuffer, Consumer<Text> messageReceiver) - Mappings:
Namespace Name Mixin selector named saveScreenshotLnet/minecraft/client/util/ScreenshotRecorder;saveScreenshot(Ljava/io/File;Lnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)Vintermediary method_1659Lnet/minecraft/class_318;method_1659(Ljava/io/File;Lnet/minecraft/class_276;Ljava/util/function/Consumer;)Vofficial aLfgg;a(Ljava/io/File;Leza;Ljava/util/function/Consumer;)V
-
saveScreenshot
public static void saveScreenshot(File gameDirectory, @Nullable @Nullable String fileName, Framebuffer framebuffer, Consumer<Text> messageReceiver) - Mappings:
Namespace Name Mixin selector named saveScreenshotLnet/minecraft/client/util/ScreenshotRecorder;saveScreenshot(Ljava/io/File;Ljava/lang/String;Lnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)Vintermediary method_22690Lnet/minecraft/class_318;method_22690(Ljava/io/File;Ljava/lang/String;Lnet/minecraft/class_276;Ljava/util/function/Consumer;)Vofficial aLfgg;a(Ljava/io/File;Ljava/lang/String;Leza;Ljava/util/function/Consumer;)V
-
saveScreenshotInner
private static void saveScreenshotInner(File gameDirectory, @Nullable @Nullable String fileName, Framebuffer framebuffer, Consumer<Text> messageReceiver) - Mappings:
Namespace Name Mixin selector named saveScreenshotInnerLnet/minecraft/client/util/ScreenshotRecorder;saveScreenshotInner(Ljava/io/File;Ljava/lang/String;Lnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)Vintermediary method_1662Lnet/minecraft/class_318;method_1662(Ljava/io/File;Ljava/lang/String;Lnet/minecraft/class_276;Ljava/util/function/Consumer;)Vofficial bLfgg;b(Ljava/io/File;Ljava/lang/String;Leza;Ljava/util/function/Consumer;)V
-
takeScreenshot
- Mappings:
Namespace Name Mixin selector named takeScreenshotLnet/minecraft/client/util/ScreenshotRecorder;takeScreenshot(Lnet/minecraft/client/gl/Framebuffer;)Lnet/minecraft/client/texture/NativeImage;intermediary method_1663Lnet/minecraft/class_318;method_1663(Lnet/minecraft/class_276;)Lnet/minecraft/class_1011;official aLfgg;a(Leza;)Lezp;
-
getScreenshotFilename
- Mappings:
Namespace Name Mixin selector named getScreenshotFilenameLnet/minecraft/client/util/ScreenshotRecorder;getScreenshotFilename(Ljava/io/File;)Ljava/io/File;intermediary method_1660Lnet/minecraft/class_318;method_1660(Ljava/io/File;)Ljava/io/File;official aLfgg;a(Ljava/io/File;)Ljava/io/File;
-
getIntoBuffer
public void getIntoBuffer(ByteBuffer data, int startWidth, int startHeight, int unitWidth, int unitHeight) Transports image data fromdataintobuffer.- Mappings:
Namespace Name Mixin selector named getIntoBufferLnet/minecraft/client/util/ScreenshotRecorder;getIntoBuffer(Ljava/nio/ByteBuffer;IIII)Vintermediary method_35711Lnet/minecraft/class_318;method_35711(Ljava/nio/ByteBuffer;IIII)Vofficial aLfgg;a(Ljava/nio/ByteBuffer;IIII)V
-
writeToStream
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named writeToStreamLnet/minecraft/client/util/ScreenshotRecorder;writeToStream()Vintermediary method_35710Lnet/minecraft/class_318;method_35710()Vofficial aLfgg;a()V
-
finish
Finish taking the screenshot and return the complete tga file.- Returns:
- the tga file
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named finishLnet/minecraft/client/util/ScreenshotRecorder;finish()Ljava/io/File;intermediary method_35712Lnet/minecraft/class_318;method_35712()Ljava/io/File;official bLfgg;b()Ljava/io/File;
-