Package net.minecraft.client.util
Class Screenshooter
java.lang.Object
net.minecraft.client.util.Screenshooter
A screenshooter takes screenshots and saves them into tga file format. It also
holds a few utility methods for other types of screenshots.
- Mappings:
Namespace Name official dvx
intermediary net/minecraft/class_318
named net/minecraft/client/util/Screenshooter
-
Field Summary
Modifier and TypeFieldDescriptionprivate byte[]
private static DateFormat
private File
private int
private static Logger
private DataOutputStream
private int
private int
-
Constructor Summary
ConstructorDescriptionScreenshooter(File gameDirectory, int width, int height, int unitHeight)
Creates a screenshooter for huge screenshots. -
Method Summary
Modifier and TypeMethodDescriptionfinish()
Finish taking the screenshot and return the complete tga file.void
getIntoBuffer(ByteBuffer data, int startWidth, int startHeight, int unitWidth, int unitHeight)
Transports image data fromdata
intobuffer
.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, @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)
static NativeImage
takeScreenshot(int width, int height, Framebuffer framebuffer)
void
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Ldvx;a:Lorg/apache/logging/log4j/Logger;
intermediary field_1974
Lnet/minecraft/class_318;field_1974:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/client/util/Screenshooter;LOGGER:Lorg/apache/logging/log4j/Logger;
-
DATE_FORMAT
- Mappings:
Namespace Name Mixin selector official b
Ldvx;b:Ljava/text/DateFormat;
intermediary field_1973
Lnet/minecraft/class_318;field_1973:Ljava/text/DateFormat;
named DATE_FORMAT
Lnet/minecraft/client/util/Screenshooter;DATE_FORMAT:Ljava/text/DateFormat;
-
unitHeight
private int unitHeight- Mappings:
Namespace Name Mixin selector official c
Ldvx;c:I
intermediary field_32157
Lnet/minecraft/class_318;field_32157:I
named unitHeight
Lnet/minecraft/client/util/Screenshooter;unitHeight:I
-
stream
- Mappings:
Namespace Name Mixin selector official d
Ldvx;d:Ljava/io/DataOutputStream;
intermediary field_32158
Lnet/minecraft/class_318;field_32158:Ljava/io/DataOutputStream;
named stream
Lnet/minecraft/client/util/Screenshooter;stream:Ljava/io/DataOutputStream;
-
buffer
private final byte[] buffer- Mappings:
Namespace Name Mixin selector official e
Ldvx;e:[B
intermediary field_32159
Lnet/minecraft/class_318;field_32159:[B
named buffer
Lnet/minecraft/client/util/Screenshooter;buffer:[B
-
width
private final int width- Mappings:
Namespace Name Mixin selector official f
Ldvx;f:I
intermediary field_32160
Lnet/minecraft/class_318;field_32160:I
named width
Lnet/minecraft/client/util/Screenshooter;width:I
-
height
private final int height- Mappings:
Namespace Name Mixin selector official g
Ldvx;g:I
intermediary field_32161
Lnet/minecraft/class_318;field_32161:I
named height
Lnet/minecraft/client/util/Screenshooter;height:I
-
file
- Mappings:
Namespace Name Mixin selector official h
Ldvx;h:Ljava/io/File;
intermediary field_32162
Lnet/minecraft/class_318;field_32162:Ljava/io/File;
named file
Lnet/minecraft/client/util/Screenshooter;file:Ljava/io/File;
-
-
Constructor Details
-
Screenshooter
Creates a screenshooter for huge screenshots.- Throws:
IOException
- See Also:
MinecraftClient.takeHugeScreenshot(java.io.File, int, int, int, int)
- Mappings:
Namespace Name Mixin selector official <init>
Ldvx;<init>(Ljava/io/File;III)V
intermediary <init>
Lnet/minecraft/class_318;<init>(Ljava/io/File;III)V
named <init>
Lnet/minecraft/client/util/Screenshooter;<init>(Ljava/io/File;III)V
-
-
Method Details
-
saveScreenshot
public static void saveScreenshot(File gameDirectory, int framebufferWidth, int framebufferHeight, Framebuffer framebuffer, Consumer<Text> messageReceiver)- Mappings:
Namespace Name Mixin selector official a
Ldvx;a(Ljava/io/File;IILdoy;Ljava/util/function/Consumer;)V
intermediary method_1659
Lnet/minecraft/class_318;method_1659(Ljava/io/File;IILnet/minecraft/class_276;Ljava/util/function/Consumer;)V
named saveScreenshot
Lnet/minecraft/client/util/Screenshooter;saveScreenshot(Ljava/io/File;IILnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)V
-
saveScreenshot
public static void saveScreenshot(File gameDirectory, @Nullable @Nullable String fileName, int framebufferWidth, int framebufferHeight, Framebuffer framebuffer, Consumer<Text> messageReceiver)- Mappings:
Namespace Name Mixin selector official a
Ldvx;a(Ljava/io/File;Ljava/lang/String;IILdoy;Ljava/util/function/Consumer;)V
intermediary method_22690
Lnet/minecraft/class_318;method_22690(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/class_276;Ljava/util/function/Consumer;)V
named saveScreenshot
Lnet/minecraft/client/util/Screenshooter;saveScreenshot(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)V
-
saveScreenshotInner
private static void saveScreenshotInner(File gameDirectory, @Nullable @Nullable String fileName, int framebufferWidth, int framebufferHeight, Framebuffer framebuffer, Consumer<Text> messageReceiver)- Mappings:
Namespace Name Mixin selector official b
Ldvx;b(Ljava/io/File;Ljava/lang/String;IILdoy;Ljava/util/function/Consumer;)V
intermediary method_1662
Lnet/minecraft/class_318;method_1662(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/class_276;Ljava/util/function/Consumer;)V
named saveScreenshotInner
Lnet/minecraft/client/util/Screenshooter;saveScreenshotInner(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)V
-
takeScreenshot
- Mappings:
Namespace Name Mixin selector official a
Ldvx;a(IILdoy;)Ldpl;
intermediary method_1663
Lnet/minecraft/class_318;method_1663(IILnet/minecraft/class_276;)Lnet/minecraft/class_1011;
named takeScreenshot
Lnet/minecraft/client/util/Screenshooter;takeScreenshot(IILnet/minecraft/client/gl/Framebuffer;)Lnet/minecraft/client/texture/NativeImage;
-
getScreenshotFilename
- Mappings:
Namespace Name Mixin selector official a
Ldvx;a(Ljava/io/File;)Ljava/io/File;
intermediary method_1660
Lnet/minecraft/class_318;method_1660(Ljava/io/File;)Ljava/io/File;
named getScreenshotFilename
Lnet/minecraft/client/util/Screenshooter;getScreenshotFilename(Ljava/io/File;)Ljava/io/File;
-
getIntoBuffer
public void getIntoBuffer(ByteBuffer data, int startWidth, int startHeight, int unitWidth, int unitHeight)Transports image data fromdata
intobuffer
.- Mappings:
Namespace Name Mixin selector official a
Ldvx;a(Ljava/nio/ByteBuffer;IIII)V
intermediary method_35711
Lnet/minecraft/class_318;method_35711(Ljava/nio/ByteBuffer;IIII)V
named getIntoBuffer
Lnet/minecraft/client/util/Screenshooter;getIntoBuffer(Ljava/nio/ByteBuffer;IIII)V
-
writeToStream
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Ldvx;a()V
intermediary method_35710
Lnet/minecraft/class_318;method_35710()V
named writeToStream
Lnet/minecraft/client/util/Screenshooter;writeToStream()V
-
finish
Finish taking the screenshot and return the complete tga file.- Returns:
- the tga file
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official b
Ldvx;b()Ljava/io/File;
intermediary method_35712
Lnet/minecraft/class_318;method_35712()Ljava/io/File;
named finish
Lnet/minecraft/client/util/Screenshooter;finish()Ljava/io/File;
-