Class NativeImage

java.lang.Object
net.minecraft.client.texture.NativeImage
All Implemented Interfaces:
AutoCloseable

@Environment(CLIENT) public final class NativeImage extends Object implements AutoCloseable
Mappings:
Namespace Name
named net/minecraft/client/texture/NativeImage
intermediary net/minecraft/class_1011
official faj
  • Field Details Link icon

    • LOGGER Link icon

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/client/texture/NativeImage;LOGGER:Lorg/slf4j/Logger;
      intermediary field_21684 Lnet/minecraft/class_1011;field_21684:Lorg/slf4j/Logger;
      official a Lfaj;a:Lorg/slf4j/Logger;
    • WRITE_TO_FILE_OPEN_OPTIONS Link icon

      private static final Set<StandardOpenOption> WRITE_TO_FILE_OPEN_OPTIONS
      Mappings:
      Namespace Name Mixin selector
      named WRITE_TO_FILE_OPEN_OPTIONS Lnet/minecraft/client/texture/NativeImage;WRITE_TO_FILE_OPEN_OPTIONS:Ljava/util/Set;
      intermediary field_4992 Lnet/minecraft/class_1011;field_4992:Ljava/util/Set;
      official b Lfaj;b:Ljava/util/Set;
    • format Link icon

      private final NativeImage.Format format
      Mappings:
      Namespace Name Mixin selector
      named format Lnet/minecraft/client/texture/NativeImage;format:Lnet/minecraft/client/texture/NativeImage$Format;
      intermediary field_4986 Lnet/minecraft/class_1011;field_4986:Lnet/minecraft/class_1011$class_1012;
      official c Lfaj;c:Lfaj$a;
    • width Link icon

      private final int width
      Mappings:
      Namespace Name Mixin selector
      named width Lnet/minecraft/client/texture/NativeImage;width:I
      intermediary field_4991 Lnet/minecraft/class_1011;field_4991:I
      official d Lfaj;d:I
    • height Link icon

      private final int height
      Mappings:
      Namespace Name Mixin selector
      named height Lnet/minecraft/client/texture/NativeImage;height:I
      intermediary field_4989 Lnet/minecraft/class_1011;field_4989:I
      official e Lfaj;e:I
    • isStbImage Link icon

      private final boolean isStbImage
      Mappings:
      Namespace Name Mixin selector
      named isStbImage Lnet/minecraft/client/texture/NativeImage;isStbImage:Z
      intermediary field_4990 Lnet/minecraft/class_1011;field_4990:Z
      official f Lfaj;f:Z
    • pointer Link icon

      private long pointer
      Mappings:
      Namespace Name Mixin selector
      named pointer Lnet/minecraft/client/texture/NativeImage;pointer:J
      intermediary field_4988 Lnet/minecraft/class_1011;field_4988:J
      official g Lfaj;g:J
    • sizeBytes Link icon

      private final long sizeBytes
      Mappings:
      Namespace Name Mixin selector
      named sizeBytes Lnet/minecraft/client/texture/NativeImage;sizeBytes:J
      intermediary field_4987 Lnet/minecraft/class_1011;field_4987:J
      official h Lfaj;h:J
  • Constructor Details Link icon

    • NativeImage Link icon

      public NativeImage(int width, int height, boolean useStb)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/texture/NativeImage;<init>(IIZ)V
      intermediary <init> Lnet/minecraft/class_1011;<init>(IIZ)V
      official <init> Lfaj;<init>(IIZ)V
    • NativeImage Link icon

      public NativeImage(NativeImage.Format format, int width, int height, boolean useStb)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZ)V
      intermediary <init> Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZ)V
      official <init> Lfaj;<init>(Lfaj$a;IIZ)V
    • NativeImage Link icon

      private NativeImage(NativeImage.Format format, int width, int height, boolean useStb, long pointer)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZJ)V
      intermediary <init> Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZJ)V
      official <init> Lfaj;<init>(Lfaj$a;IIZJ)V
  • Method Details Link icon

    • toString Link icon

      public String toString()
      Overrides:
      toString in class Object
    • isOutOfBounds Link icon

      private boolean isOutOfBounds(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      named isOutOfBounds Lnet/minecraft/client/texture/NativeImage;isOutOfBounds(II)Z
      intermediary method_36559 Lnet/minecraft/class_1011;method_36559(II)Z
      official f Lfaj;f(II)Z
    • read Link icon

      public static NativeImage read(InputStream stream) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/client/texture/NativeImage;read(Ljava/io/InputStream;)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_4309 Lnet/minecraft/class_1011;method_4309(Ljava/io/InputStream;)Lnet/minecraft/class_1011;
      official a Lfaj;a(Ljava/io/InputStream;)Lfaj;
    • read Link icon

      public static NativeImage read(@Nullable @Nullable NativeImage.Format format, InputStream stream) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/client/texture/NativeImage;read(Lnet/minecraft/client/texture/NativeImage$Format;Ljava/io/InputStream;)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_4310 Lnet/minecraft/class_1011;method_4310(Lnet/minecraft/class_1011$class_1012;Ljava/io/InputStream;)Lnet/minecraft/class_1011;
      official a Lfaj;a(Lfaj$a;Ljava/io/InputStream;)Lfaj;
    • read Link icon

      public static NativeImage read(ByteBuffer buffer) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/client/texture/NativeImage;read(Ljava/nio/ByteBuffer;)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_4324 Lnet/minecraft/class_1011;method_4324(Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;
      official a Lfaj;a(Ljava/nio/ByteBuffer;)Lfaj;
    • read Link icon

      public static NativeImage read(byte[] bytes) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/client/texture/NativeImage;read([B)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_49277 Lnet/minecraft/class_1011;method_49277([B)Lnet/minecraft/class_1011;
      official a Lfaj;a([B)Lfaj;
    • read Link icon

      public static NativeImage read(@Nullable @Nullable NativeImage.Format format, ByteBuffer buffer) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named read Lnet/minecraft/client/texture/NativeImage;read(Lnet/minecraft/client/texture/NativeImage$Format;Ljava/nio/ByteBuffer;)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_4303 Lnet/minecraft/class_1011;method_4303(Lnet/minecraft/class_1011$class_1012;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;
      official a Lfaj;a(Lfaj$a;Ljava/nio/ByteBuffer;)Lfaj;
    • setTextureFilter Link icon

      private static void setTextureFilter(boolean blur, boolean mipmap)
      Mappings:
      Namespace Name Mixin selector
      named setTextureFilter Lnet/minecraft/client/texture/NativeImage;setTextureFilter(ZZ)V
      intermediary method_4308 Lnet/minecraft/class_1011;method_4308(ZZ)V
      official a Lfaj;a(ZZ)V
    • checkAllocated Link icon

      private void checkAllocated()
      Mappings:
      Namespace Name Mixin selector
      named checkAllocated Lnet/minecraft/client/texture/NativeImage;checkAllocated()V
      intermediary method_4320 Lnet/minecraft/class_1011;method_4320()V
      official j Lfaj;j()V
    • close Link icon

      public void close()
      Specified by:
      close in interface AutoCloseable
    • getWidth Link icon

      public int getWidth()
      Mappings:
      Namespace Name Mixin selector
      named getWidth Lnet/minecraft/client/texture/NativeImage;getWidth()I
      intermediary method_4307 Lnet/minecraft/class_1011;method_4307()I
      official a Lfaj;a()I
    • getHeight Link icon

      public int getHeight()
      Mappings:
      Namespace Name Mixin selector
      named getHeight Lnet/minecraft/client/texture/NativeImage;getHeight()I
      intermediary method_4323 Lnet/minecraft/class_1011;method_4323()I
      official b Lfaj;b()I
    • getFormat Link icon

      public NativeImage.Format getFormat()
      Mappings:
      Namespace Name Mixin selector
      named getFormat Lnet/minecraft/client/texture/NativeImage;getFormat()Lnet/minecraft/client/texture/NativeImage$Format;
      intermediary method_4318 Lnet/minecraft/class_1011;method_4318()Lnet/minecraft/class_1011$class_1012;
      official c Lfaj;c()Lfaj$a;
    • getColor Link icon

      public int getColor(int x, int y)
      Gets the color of a pixel on this native image. The color returned by this method will be in a big-endian (from biggest to smallest bits) ABGR format, or little-endian RGBA.
      Returns:
      the color, with red at smallest and alpha at biggest bits
      Throws:
      IllegalArgumentException - when this native image's format is not little-endian RGBA, or the coordinate is out-of-bounds
      Mappings:
      Namespace Name Mixin selector
      named getColor Lnet/minecraft/client/texture/NativeImage;getColor(II)I
      intermediary method_4315 Lnet/minecraft/class_1011;method_4315(II)I
      official a Lfaj;a(II)I
    • setColor Link icon

      public void setColor(int x, int y, int color)
      Sets the color of a pixel on this native image. The color to be set by this method will be in a big-endian (from biggest to smallest bits) ABGR format, or little-endian RGBA.
      Parameters:
      color - the color, with red at smallest and alpha at biggest bits
      Throws:
      IllegalArgumentException - when this native image's format is not little-endian RGBA, or the coordinate is out-of-bounds
      Mappings:
      Namespace Name Mixin selector
      named setColor Lnet/minecraft/client/texture/NativeImage;setColor(III)V
      intermediary method_4305 Lnet/minecraft/class_1011;method_4305(III)V
      official a Lfaj;a(III)V
    • applyToCopy Link icon

      public NativeImage applyToCopy(IntUnaryOperator operator)
      Mappings:
      Namespace Name Mixin selector
      named applyToCopy Lnet/minecraft/client/texture/NativeImage;applyToCopy(Ljava/util/function/IntUnaryOperator;)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_48462 Lnet/minecraft/class_1011;method_48462(Ljava/util/function/IntUnaryOperator;)Lnet/minecraft/class_1011;
      official a Lfaj;a(Ljava/util/function/IntUnaryOperator;)Lfaj;
    • apply Link icon

      public void apply(IntUnaryOperator operator)
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/client/texture/NativeImage;apply(Ljava/util/function/IntUnaryOperator;)V
      intermediary method_51596 Lnet/minecraft/class_1011;method_51596(Ljava/util/function/IntUnaryOperator;)V
      official b Lfaj;b(Ljava/util/function/IntUnaryOperator;)V
    • copyPixelsRgba Link icon

      public int[] copyPixelsRgba()
      Mappings:
      Namespace Name Mixin selector
      named copyPixelsRgba Lnet/minecraft/client/texture/NativeImage;copyPixelsRgba()[I
      intermediary method_48463 Lnet/minecraft/class_1011;method_48463()[I
      official d Lfaj;d()[I
    • setLuminance Link icon

      public void setLuminance(int x, int y, byte luminance)
      Mappings:
      Namespace Name Mixin selector
      named setLuminance Lnet/minecraft/client/texture/NativeImage;setLuminance(IIB)V
      intermediary method_35621 Lnet/minecraft/class_1011;method_35621(IIB)V
      official a Lfaj;a(IIB)V
    • getRed Link icon

      public byte getRed(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      named getRed Lnet/minecraft/client/texture/NativeImage;getRed(II)B
      intermediary method_35623 Lnet/minecraft/class_1011;method_35623(II)B
      official b Lfaj;b(II)B
    • getGreen Link icon

      public byte getGreen(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      named getGreen Lnet/minecraft/client/texture/NativeImage;getGreen(II)B
      intermediary method_35625 Lnet/minecraft/class_1011;method_35625(II)B
      official c Lfaj;c(II)B
    • getBlue Link icon

      public byte getBlue(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      named getBlue Lnet/minecraft/client/texture/NativeImage;getBlue(II)B
      intermediary method_35626 Lnet/minecraft/class_1011;method_35626(II)B
      official d Lfaj;d(II)B
    • getOpacity Link icon

      public byte getOpacity(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      named getOpacity Lnet/minecraft/client/texture/NativeImage;getOpacity(II)B
      intermediary method_4311 Lnet/minecraft/class_1011;method_4311(II)B
      official e Lfaj;e(II)B
    • blend Link icon

      public void blend(int x, int y, int color)
      Mappings:
      Namespace Name Mixin selector
      named blend Lnet/minecraft/client/texture/NativeImage;blend(III)V
      intermediary method_35624 Lnet/minecraft/class_1011;method_35624(III)V
      official b Lfaj;b(III)V
    • makePixelArray Link icon

      @Deprecated public int[] makePixelArray()
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      named makePixelArray Lnet/minecraft/client/texture/NativeImage;makePixelArray()[I
      intermediary method_4322 Lnet/minecraft/class_1011;method_4322()[I
      official e Lfaj;e()[I
    • upload Link icon

      public void upload(int level, int offsetX, int offsetY, boolean close)
      Mappings:
      Namespace Name Mixin selector
      named upload Lnet/minecraft/client/texture/NativeImage;upload(IIIZ)V
      intermediary method_4301 Lnet/minecraft/class_1011;method_4301(IIIZ)V
      official a Lfaj;a(IIIZ)V
    • upload Link icon

      public void upload(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean mipmap, boolean close)
      Mappings:
      Namespace Name Mixin selector
      named upload Lnet/minecraft/client/texture/NativeImage;upload(IIIIIIIZZ)V
      intermediary method_4312 Lnet/minecraft/class_1011;method_4312(IIIIIIIZZ)V
      official a Lfaj;a(IIIIIIIZZ)V
    • upload Link icon

      public void upload(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean blur, boolean clamp, boolean mipmap, boolean close)
      Mappings:
      Namespace Name Mixin selector
      named upload Lnet/minecraft/client/texture/NativeImage;upload(IIIIIIIZZZZ)V
      intermediary method_22619 Lnet/minecraft/class_1011;method_22619(IIIIIIIZZZZ)V
      official a Lfaj;a(IIIIIIIZZZZ)V
    • uploadInternal Link icon

      private void uploadInternal(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean blur, boolean clamp, boolean mipmap, boolean close)
      Mappings:
      Namespace Name Mixin selector
      named uploadInternal Lnet/minecraft/client/texture/NativeImage;uploadInternal(IIIIIIIZZZZ)V
      intermediary method_4321 Lnet/minecraft/class_1011;method_4321(IIIIIIIZZZZ)V
      official b Lfaj;b(IIIIIIIZZZZ)V
    • loadFromTextureImage Link icon

      public void loadFromTextureImage(int level, boolean removeAlpha)
      Mappings:
      Namespace Name Mixin selector
      named loadFromTextureImage Lnet/minecraft/client/texture/NativeImage;loadFromTextureImage(IZ)V
      intermediary method_4327 Lnet/minecraft/class_1011;method_4327(IZ)V
      official a Lfaj;a(IZ)V
    • readDepthComponent Link icon

      public void readDepthComponent(float unused)
      Mappings:
      Namespace Name Mixin selector
      named readDepthComponent Lnet/minecraft/client/texture/NativeImage;readDepthComponent(F)V
      intermediary method_35620 Lnet/minecraft/class_1011;method_35620(F)V
      official a Lfaj;a(F)V
    • drawPixels Link icon

      public void drawPixels()
      Use upload to upload this image to GL so it can be used later. This method is not used in vanilla, and its side effects are not yet known.
      Mappings:
      Namespace Name Mixin selector
      named drawPixels Lnet/minecraft/client/texture/NativeImage;drawPixels()V
      intermediary method_35627 Lnet/minecraft/class_1011;method_35627()V
      official f Lfaj;f()V
    • writeTo Link icon

      public void writeTo(File path) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named writeTo Lnet/minecraft/client/texture/NativeImage;writeTo(Ljava/io/File;)V
      intermediary method_4325 Lnet/minecraft/class_1011;method_4325(Ljava/io/File;)V
      official a Lfaj;a(Ljava/io/File;)V
    • makeGlyphBitmapSubpixel Link icon

      public boolean makeGlyphBitmapSubpixel(FT_Face face, int glyphIndex)
      Mappings:
      Namespace Name Mixin selector
      named makeGlyphBitmapSubpixel Lnet/minecraft/client/texture/NativeImage;makeGlyphBitmapSubpixel(Lorg/lwjgl/util/freetype/FT_Face;I)Z
      intermediary method_4316 Lnet/minecraft/class_1011;method_4316(Lorg/lwjgl/util/freetype/FT_Face;I)Z
      official a Lfaj;a(Lorg/lwjgl/util/freetype/FT_Face;I)Z
    • writeTo Link icon

      public void writeTo(Path path) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named writeTo Lnet/minecraft/client/texture/NativeImage;writeTo(Ljava/nio/file/Path;)V
      intermediary method_4314 Lnet/minecraft/class_1011;method_4314(Ljava/nio/file/Path;)V
      official a Lfaj;a(Ljava/nio/file/Path;)V
    • getBytes Link icon

      public byte[] getBytes() throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named getBytes Lnet/minecraft/client/texture/NativeImage;getBytes()[B
      intermediary method_24036 Lnet/minecraft/class_1011;method_24036()[B
      official g Lfaj;g()[B
    • write Link icon

      private boolean write(WritableByteChannel channel) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named write Lnet/minecraft/client/texture/NativeImage;write(Ljava/nio/channels/WritableByteChannel;)Z
      intermediary method_24032 Lnet/minecraft/class_1011;method_24032(Ljava/nio/channels/WritableByteChannel;)Z
      official a Lfaj;a(Ljava/nio/channels/WritableByteChannel;)Z
    • copyFrom Link icon

      public void copyFrom(NativeImage image)
      Mappings:
      Namespace Name Mixin selector
      named copyFrom Lnet/minecraft/client/texture/NativeImage;copyFrom(Lnet/minecraft/client/texture/NativeImage;)V
      intermediary method_4317 Lnet/minecraft/class_1011;method_4317(Lnet/minecraft/class_1011;)V
      official a Lfaj;a(Lfaj;)V
    • fillRect Link icon

      public void fillRect(int x, int y, int width, int height, int color)
      Mappings:
      Namespace Name Mixin selector
      named fillRect Lnet/minecraft/client/texture/NativeImage;fillRect(IIIII)V
      intermediary method_4326 Lnet/minecraft/class_1011;method_4326(IIIII)V
      official a Lfaj;a(IIIII)V
    • copyRect Link icon

      public void copyRect(int x, int y, int translateX, int translateY, int width, int height, boolean flipX, boolean flipY)
      Mappings:
      Namespace Name Mixin selector
      named copyRect Lnet/minecraft/client/texture/NativeImage;copyRect(IIIIIIZZ)V
      intermediary method_4304 Lnet/minecraft/class_1011;method_4304(IIIIIIZZ)V
      official a Lfaj;a(IIIIIIZZ)V
    • copyRect Link icon

      public void copyRect(NativeImage image, int x, int y, int destX, int destY, int width, int height, boolean flipX, boolean flipY)
      Mappings:
      Namespace Name Mixin selector
      named copyRect Lnet/minecraft/client/texture/NativeImage;copyRect(Lnet/minecraft/client/texture/NativeImage;IIIIIIZZ)V
      intermediary method_47594 Lnet/minecraft/class_1011;method_47594(Lnet/minecraft/class_1011;IIIIIIZZ)V
      official a Lfaj;a(Lfaj;IIIIIIZZ)V
    • mirrorVertically Link icon

      public void mirrorVertically()
      Mappings:
      Namespace Name Mixin selector
      named mirrorVertically Lnet/minecraft/client/texture/NativeImage;mirrorVertically()V
      intermediary method_4319 Lnet/minecraft/class_1011;method_4319()V
      official h Lfaj;h()V
    • resizeSubRectTo Link icon

      public void resizeSubRectTo(int x, int y, int width, int height, NativeImage targetImage)
      Mappings:
      Namespace Name Mixin selector
      named resizeSubRectTo Lnet/minecraft/client/texture/NativeImage;resizeSubRectTo(IIIILnet/minecraft/client/texture/NativeImage;)V
      intermediary method_4300 Lnet/minecraft/class_1011;method_4300(IIIILnet/minecraft/class_1011;)V
      official a Lfaj;a(IIIILfaj;)V
    • untrack Link icon

      public void untrack()
      Mappings:
      Namespace Name Mixin selector
      named untrack Lnet/minecraft/client/texture/NativeImage;untrack()V
      intermediary method_4302 Lnet/minecraft/class_1011;method_4302()V
      official i Lfaj;i()V