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 fne
  • Field Details

    • LOGGER

      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 Lfne;a:Lorg/slf4j/Logger;
    • MEMORY_POOL

      private static final com.mojang.jtracy.MemoryPool MEMORY_POOL
      Mappings:
      Namespace Name Mixin selector
      named MEMORY_POOL Lnet/minecraft/client/texture/NativeImage;MEMORY_POOL:Lcom/mojang/jtracy/MemoryPool;
      intermediary field_54265 Lnet/minecraft/class_1011;field_54265:Lcom/mojang/jtracy/MemoryPool;
      official b Lfne;b:Lcom/mojang/jtracy/MemoryPool;
    • WRITE_TO_FILE_OPEN_OPTIONS

      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 c Lfne;c:Ljava/util/Set;
    • format

      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 d Lfne;d:Lfne$a;
    • width

      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 e Lfne;e:I
    • height

      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 f Lfne;f:I
    • isStbImage

      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 g Lfne;g:Z
    • pointer

      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 h Lfne;h:J
    • sizeBytes

      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 i Lfne;i:J
  • Constructor Details

    • NativeImage

      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> Lfne;<init>(IIZ)V
    • NativeImage

      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> Lfne;<init>(Lfne$a;IIZ)V
    • NativeImage

      public 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> Lfne;<init>(Lfne$a;IIZJ)V
  • Method Details

    • toString

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

      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 c Lfne;c(II)Z
    • read

      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 Lfne;a(Ljava/io/InputStream;)Lfne;
    • read

      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 Lfne;a(Lfne$a;Ljava/io/InputStream;)Lfne;
    • read

      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 Lfne;a(Ljava/nio/ByteBuffer;)Lfne;
    • read

      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 Lfne;a([B)Lfne;
    • putAndRead

      private static NativeImage putAndRead(ByteBuffer buffer, byte[] bytes) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      named putAndRead Lnet/minecraft/client/texture/NativeImage;putAndRead(Ljava/nio/ByteBuffer;[B)Lnet/minecraft/client/texture/NativeImage;
      intermediary method_65806 Lnet/minecraft/class_1011;method_65806(Ljava/nio/ByteBuffer;[B)Lnet/minecraft/class_1011;
      official a Lfne;a(Ljava/nio/ByteBuffer;[B)Lfne;
    • read

      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 Lfne;a(Lfne$a;Ljava/nio/ByteBuffer;)Lfne;
    • checkAllocated

      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 i Lfne;i()V
    • close

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

      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 Lfne;a()I
    • getHeight

      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 Lfne;b()I
    • getFormat

      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 Lfne;c()Lfne$a;
    • getColor

      private 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 d Lfne;d(II)I
    • getColorArgb

      public int getColorArgb(int x, int y)
      Mappings:
      Namespace Name Mixin selector
      named getColorArgb Lnet/minecraft/client/texture/NativeImage;getColorArgb(II)I
      intermediary method_61940 Lnet/minecraft/class_1011;method_61940(II)I
      official a Lfne;a(II)I
    • setColor

      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 Lfne;a(III)V
    • setColorArgb

      public void setColorArgb(int x, int y, int color)
      Mappings:
      Namespace Name Mixin selector
      named setColorArgb Lnet/minecraft/client/texture/NativeImage;setColorArgb(III)V
      intermediary method_61941 Lnet/minecraft/class_1011;method_61941(III)V
      official b Lfne;b(III)V
    • applyToCopy

      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 Lfne;a(Ljava/util/function/IntUnaryOperator;)Lfne;
    • copyPixelsAbgr

      public int[] copyPixelsAbgr()
      Mappings:
      Namespace Name Mixin selector
      named copyPixelsAbgr Lnet/minecraft/client/texture/NativeImage;copyPixelsAbgr()[I
      intermediary method_48463 Lnet/minecraft/class_1011;method_48463()[I
      official d Lfne;d()[I
    • copyPixelsArgb

      public int[] copyPixelsArgb()
      Mappings:
      Namespace Name Mixin selector
      named copyPixelsArgb Lnet/minecraft/client/texture/NativeImage;copyPixelsArgb()[I
      intermediary method_61942 Lnet/minecraft/class_1011;method_61942()[I
      official e Lfne;e()[I
    • getOpacity

      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 b Lfne;b(II)B
    • makePixelArray

      @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 f Lfne;f()[I
    • writeTo

      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 Lfne;a(Ljava/io/File;)V
    • makeGlyphBitmapSubpixel

      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 Lfne;a(Lorg/lwjgl/util/freetype/FT_Face;I)Z
    • writeTo

      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 Lfne;a(Ljava/nio/file/Path;)V
    • write

      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 Lfne;a(Ljava/nio/channels/WritableByteChannel;)Z
    • copyFrom

      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 Lfne;a(Lfne;)V
    • fillRect

      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 Lfne;a(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
      named copyRect Lnet/minecraft/client/texture/NativeImage;copyRect(IIIIIIZZ)V
      intermediary method_4304 Lnet/minecraft/class_1011;method_4304(IIIIIIZZ)V
      official a Lfne;a(IIIIIIZZ)V
    • copyRect

      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 Lfne;a(Lfne;IIIIIIZZ)V
    • resizeSubRectTo

      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 Lfne;a(IIIILfne;)V
    • untrack

      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 g Lfne;g()V
    • imageId

      public long imageId()
      Mappings:
      Namespace Name Mixin selector
      named imageId Lnet/minecraft/client/texture/NativeImage;imageId()J
      intermediary method_67769 Lnet/minecraft/class_1011;method_67769()J
      official h Lfne;h()J