Class ScreenshotRecorder

java.lang.Object
net.minecraft.client.util.ScreenshotRecorder

@Environment(CLIENT) public class ScreenshotRecorder extends Object
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
official dvv
intermediary net/minecraft/class_318
named net/minecraft/client/util/ScreenshotRecorder
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;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/ScreenshotRecorder;LOGGER:Lorg/apache/logging/log4j/Logger;
    • DATE_FORMAT

      private static final DateFormat DATE_FORMAT
      Mappings:
      Namespace Name Mixin selector
      official b Ldvv;b:Ljava/text/DateFormat;
      intermediary field_1973 Lnet/minecraft/class_318;field_1973:Ljava/text/DateFormat;
      named DATE_FORMAT Lnet/minecraft/client/util/ScreenshotRecorder;DATE_FORMAT:Ljava/text/DateFormat;
    • unitHeight

      private int unitHeight
      Mappings:
      Namespace Name Mixin selector
      official c Ldvv;c:I
      intermediary field_32157 Lnet/minecraft/class_318;field_32157:I
      named unitHeight Lnet/minecraft/client/util/ScreenshotRecorder;unitHeight:I
    • stream

      private final DataOutputStream stream
      Mappings:
      Namespace Name Mixin selector
      official d Ldvv;d:Ljava/io/DataOutputStream;
      intermediary field_32158 Lnet/minecraft/class_318;field_32158:Ljava/io/DataOutputStream;
      named stream Lnet/minecraft/client/util/ScreenshotRecorder;stream:Ljava/io/DataOutputStream;
    • buffer

      private final byte[] buffer
      Mappings:
      Namespace Name Mixin selector
      official e Ldvv;e:[B
      intermediary field_32159 Lnet/minecraft/class_318;field_32159:[B
      named buffer Lnet/minecraft/client/util/ScreenshotRecorder;buffer:[B
    • width

      private final int width
      Mappings:
      Namespace Name Mixin selector
      official f Ldvv;f:I
      intermediary field_32160 Lnet/minecraft/class_318;field_32160:I
      named width Lnet/minecraft/client/util/ScreenshotRecorder;width:I
    • height

      private final int height
      Mappings:
      Namespace Name Mixin selector
      official g Ldvv;g:I
      intermediary field_32161 Lnet/minecraft/class_318;field_32161:I
      named height Lnet/minecraft/client/util/ScreenshotRecorder;height:I
    • file

      private File file
      Mappings:
      Namespace Name Mixin selector
      official h Ldvv;h:Ljava/io/File;
      intermediary field_32162 Lnet/minecraft/class_318;field_32162:Ljava/io/File;
      named file Lnet/minecraft/client/util/ScreenshotRecorder;file: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
      official <init> Ldvv;<init>(Ljava/io/File;III)V
      intermediary <init> Lnet/minecraft/class_318;<init>(Ljava/io/File;III)V
      named <init> Lnet/minecraft/client/util/ScreenshotRecorder;<init>(Ljava/io/File;III)V
  • Method Details

    • method_1659

      public static void method_1659(File file, int int2, int int3, Framebuffer framebuffer, Consumer<Text> consumer)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;a(Ljava/io/File;IILdow;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 method_1659 Lnet/minecraft/client/util/ScreenshotRecorder;method_1659(Ljava/io/File;IILnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)V
    • method_22690

      public static void method_22690(File file, @Nullable @Nullable String string, int int2, int int3, Framebuffer framebuffer, Consumer<Text> consumer)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;a(Ljava/io/File;Ljava/lang/String;IILdow;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 method_22690 Lnet/minecraft/client/util/ScreenshotRecorder;method_22690(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)V
    • method_1662

      private static void method_1662(File file, @Nullable @Nullable String string, int int2, int int3, Framebuffer framebuffer, Consumer<Text> consumer)
      Mappings:
      Namespace Name Mixin selector
      official b Ldvv;b(Ljava/io/File;Ljava/lang/String;IILdow;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 method_1662 Lnet/minecraft/client/util/ScreenshotRecorder;method_1662(Ljava/io/File;Ljava/lang/String;IILnet/minecraft/client/gl/Framebuffer;Ljava/util/function/Consumer;)V
    • method_1663

      public static NativeImage method_1663(int int2, int int3, Framebuffer framebuffer)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;a(IILdow;)Ldpj;
      intermediary method_1663 Lnet/minecraft/class_318;method_1663(IILnet/minecraft/class_276;)Lnet/minecraft/class_1011;
      named method_1663 Lnet/minecraft/client/util/ScreenshotRecorder;method_1663(IILnet/minecraft/client/gl/Framebuffer;)Lnet/minecraft/client/texture/NativeImage;
    • getScreenshotFilename

      private static File getScreenshotFilename(File directory)
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;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/ScreenshotRecorder;getScreenshotFilename(Ljava/io/File;)Ljava/io/File;
    • getIntoBuffer

      public void getIntoBuffer(ByteBuffer data, int startWidth, int startHeight, int unitWidth, int unitHeight)
      Transports image data from data into buffer.
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;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/ScreenshotRecorder;getIntoBuffer(Ljava/nio/ByteBuffer;IIII)V
    • writeToStream

      public void writeToStream() throws IOException
      Writes the contents in the buffer into the stream.
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Ldvv;a()V
      intermediary method_35710 Lnet/minecraft/class_318;method_35710()V
      named writeToStream Lnet/minecraft/client/util/ScreenshotRecorder;writeToStream()V
    • finish

      public File finish() throws IOException
      Finish taking the screenshot and return the complete tga file.
      Returns:
      the tga file
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official b Ldvv;b()Ljava/io/File;
      intermediary method_35712 Lnet/minecraft/class_318;method_35712()Ljava/io/File;
      named finish Lnet/minecraft/client/util/ScreenshotRecorder;finish()Ljava/io/File;