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
official dpl
intermediary net/minecraft/class_1011
named net/minecraft/client/texture/NativeImage
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a:Lorg/apache/logging/log4j/Logger;
      intermediary field_21684 Lnet/minecraft/class_1011;field_21684:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/client/texture/NativeImage;LOGGER:Lorg/apache/logging/log4j/Logger;
    • field_32031

      private static final int field_32031
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official b Ldpl;b:I
      intermediary field_32031 Lnet/minecraft/class_1011;field_32031:I
      named field_32031 Lnet/minecraft/client/texture/NativeImage;field_32031:I
    • field_32032

      private static final int field_32032
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official c Ldpl;c:I
      intermediary field_32032 Lnet/minecraft/class_1011;field_32032:I
      named field_32032 Lnet/minecraft/client/texture/NativeImage;field_32032:I
    • field_32033

      private static final int field_32033
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official d Ldpl;d:I
      intermediary field_32033 Lnet/minecraft/class_1011;field_32033:I
      named field_32033 Lnet/minecraft/client/texture/NativeImage;field_32033:I
    • field_32034

      private static final int field_32034
      See Also:
      Constant Field Values
      Mappings:
      Namespace Name Mixin selector
      official e Ldpl;e:I
      intermediary field_32034 Lnet/minecraft/class_1011;field_32034:I
      named field_32034 Lnet/minecraft/client/texture/NativeImage;field_32034:I
    • WRITE_TO_FILE_OPEN_OPTIONS

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

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

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

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

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

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

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

    • NativeImage

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

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

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

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • method_36559

      private boolean method_36559(int int2, int int3)
      Mappings:
      Namespace Name Mixin selector
      official f Ldpl;f(II)Z
      intermediary method_36559 Lnet/minecraft/class_1011;method_36559(II)Z
      named method_36559 Lnet/minecraft/client/texture/NativeImage;method_36559(II)Z
    • read

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

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

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

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

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

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

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

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

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

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

      public int getPixelColor(int x, int y)
      Gets the color of a pixel on this native image. The color returned by this method will be in a ABGR format.

      This is only supported when this native image's format is ABGR.

      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(II)I
      intermediary method_4315 Lnet/minecraft/class_1011;method_4315(II)I
      named getPixelColor Lnet/minecraft/client/texture/NativeImage;getPixelColor(II)I
    • setPixelColor

      public void setPixelColor(int x, int y, int color)
      Sets the color of a pixel on this native image. The color to be set using this method should be in a ABGR format.

      This is only supported when this native image's format is ABGR

      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(III)V
      intermediary method_4305 Lnet/minecraft/class_1011;method_4305(III)V
      named setPixelColor Lnet/minecraft/client/texture/NativeImage;setPixelColor(III)V
    • method_35621

      public void method_35621(int int2, int int3, byte byte2)
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(IIB)V
      intermediary method_35621 Lnet/minecraft/class_1011;method_35621(IIB)V
      named method_35621 Lnet/minecraft/client/texture/NativeImage;method_35621(IIB)V
    • method_35623

      public byte method_35623(int int2, int int3)
      Mappings:
      Namespace Name Mixin selector
      official b Ldpl;b(II)B
      intermediary method_35623 Lnet/minecraft/class_1011;method_35623(II)B
      named method_35623 Lnet/minecraft/client/texture/NativeImage;method_35623(II)B
    • method_35625

      public byte method_35625(int int2, int int3)
      Mappings:
      Namespace Name Mixin selector
      official c Ldpl;c(II)B
      intermediary method_35625 Lnet/minecraft/class_1011;method_35625(II)B
      named method_35625 Lnet/minecraft/client/texture/NativeImage;method_35625(II)B
    • method_35626

      public byte method_35626(int int2, int int3)
      Mappings:
      Namespace Name Mixin selector
      official d Ldpl;d(II)B
      intermediary method_35626 Lnet/minecraft/class_1011;method_35626(II)B
      named method_35626 Lnet/minecraft/client/texture/NativeImage;method_35626(II)B
    • getPixelOpacity

      public byte getPixelOpacity(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      official e Ldpl;e(II)B
      intermediary method_4311 Lnet/minecraft/class_1011;method_4311(II)B
      named getPixelOpacity Lnet/minecraft/client/texture/NativeImage;getPixelOpacity(II)B
    • method_35624

      public void method_35624(int int2, int int3, int int4)
      Mappings:
      Namespace Name Mixin selector
      official b Ldpl;b(III)V
      intermediary method_35624 Lnet/minecraft/class_1011;method_35624(III)V
      named method_35624 Lnet/minecraft/client/texture/NativeImage;method_35624(III)V
    • makePixelArray

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

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

      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
      official a Ldpl;a(IIIIIIIZZ)V
      intermediary method_4312 Lnet/minecraft/class_1011;method_4312(IIIIIIIZZ)V
      named upload Lnet/minecraft/client/texture/NativeImage;upload(IIIIIIIZZ)V
    • upload

      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
      official a Ldpl;a(IIIIIIIZZZZ)V
      intermediary method_22619 Lnet/minecraft/class_1011;method_22619(IIIIIIIZZZZ)V
      named upload Lnet/minecraft/client/texture/NativeImage;upload(IIIIIIIZZZZ)V
    • uploadInternal

      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
      official b Ldpl;b(IIIIIIIZZZZ)V
      intermediary method_4321 Lnet/minecraft/class_1011;method_4321(IIIIIIIZZZZ)V
      named uploadInternal Lnet/minecraft/client/texture/NativeImage;uploadInternal(IIIIIIIZZZZ)V
    • loadFromTextureImage

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

      public void method_35620(float float2)
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(F)V
      intermediary method_35620 Lnet/minecraft/class_1011;method_35620(F)V
      named method_35620 Lnet/minecraft/client/texture/NativeImage;method_35620(F)V
    • method_35627

      public void method_35627()
      Mappings:
      Namespace Name Mixin selector
      official e Ldpl;e()V
      intermediary method_35627 Lnet/minecraft/class_1011;method_35627()V
      named method_35627 Lnet/minecraft/client/texture/NativeImage;method_35627()V
    • method_35622

      public void method_35622(String string) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(Ljava/lang/String;)V
      intermediary method_35622 Lnet/minecraft/class_1011;method_35622(Ljava/lang/String;)V
      named method_35622 Lnet/minecraft/client/texture/NativeImage;method_35622(Ljava/lang/String;)V
    • writeFile

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

      public void makeGlyphBitmapSubpixel(STBTTFontinfo fontInfo, int glyphIndex, int width, int height, float scaleX, float scaleY, float shiftX, float shiftY, int startX, int startY)
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
      intermediary method_4316 Lnet/minecraft/class_1011;method_4316(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
      named makeGlyphBitmapSubpixel Lnet/minecraft/client/texture/NativeImage;makeGlyphBitmapSubpixel(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
    • writeFile

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

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

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

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

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

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

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

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

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

      public static NativeImage read(String dataUri) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official b Ldpl;b(Ljava/lang/String;)Ldpl;
      intermediary method_15990 Lnet/minecraft/class_1011;method_15990(Ljava/lang/String;)Lnet/minecraft/class_1011;
      named read Lnet/minecraft/client/texture/NativeImage;read(Ljava/lang/String;)Lnet/minecraft/client/texture/NativeImage;
    • getAlpha

      public static int getAlpha(int color)
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(I)I
      intermediary method_24030 Lnet/minecraft/class_1011;method_24030(I)I
      named getAlpha Lnet/minecraft/client/texture/NativeImage;getAlpha(I)I
    • getRed

      public static int getRed(int color)
      Mappings:
      Namespace Name Mixin selector
      official b Ldpl;b(I)I
      intermediary method_24033 Lnet/minecraft/class_1011;method_24033(I)I
      named getRed Lnet/minecraft/client/texture/NativeImage;getRed(I)I
    • getGreen

      public static int getGreen(int color)
      Mappings:
      Namespace Name Mixin selector
      official c Ldpl;c(I)I
      intermediary method_24034 Lnet/minecraft/class_1011;method_24034(I)I
      named getGreen Lnet/minecraft/client/texture/NativeImage;getGreen(I)I
    • getBlue

      public static int getBlue(int color)
      Mappings:
      Namespace Name Mixin selector
      official d Ldpl;d(I)I
      intermediary method_24035 Lnet/minecraft/class_1011;method_24035(I)I
      named getBlue Lnet/minecraft/client/texture/NativeImage;getBlue(I)I
    • getAbgrColor

      public static int getAbgrColor(int alpha, int blue, int green, int red)
      The resulting color of this operation is stored as least to most significant bits.
      Mappings:
      Namespace Name Mixin selector
      official a Ldpl;a(IIII)I
      intermediary method_24031 Lnet/minecraft/class_1011;method_24031(IIII)I
      named getAbgrColor Lnet/minecraft/client/texture/NativeImage;getAbgrColor(IIII)I