Class NativeImage

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

public final class NativeImage extends Object implements AutoCloseable
  • Field Details

    • LOGGER

      private static final org.apache.logging.log4j.Logger LOGGER
    • OPEN_OPTIONS

      private static final Set<StandardOpenOption> OPEN_OPTIONS
    • format

      private final NativeImage.PixelFormat format
    • width

      private final int width
    • height

      private final int height
    • useStbFree

      private final boolean useStbFree
    • pixels

      private long pixels
    • size

      private final long size
  • Constructor Details

    • NativeImage

      public NativeImage(int p_i48122_1_, int p_i48122_2_, boolean p_i48122_3_)
    • NativeImage

      public NativeImage(NativeImage.PixelFormat p_i49763_1_, int p_i49763_2_, int p_i49763_3_, boolean p_i49763_4_)
    • NativeImage

      private NativeImage(NativeImage.PixelFormat p_i49764_1_, int p_i49764_2_, int p_i49764_3_, boolean p_i49764_4_, long p_i49764_5_)
  • Method Details

    • toString

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

      public static NativeImage read(InputStream p_195713_0_) throws IOException
      Throws:
      IOException
    • read

      public static NativeImage read(@Nullable NativeImage.PixelFormat p_211679_0_, InputStream p_211679_1_) throws IOException
      Throws:
      IOException
    • read

      public static NativeImage read(ByteBuffer p_195704_0_) throws IOException
      Throws:
      IOException
    • read

      public static NativeImage read(@Nullable NativeImage.PixelFormat p_211677_0_, ByteBuffer p_211677_1_) throws IOException
      Throws:
      IOException
    • setClamp

      private static void setClamp(boolean p_195707_0_)
    • setFilter

      private static void setFilter(boolean p_195705_0_, boolean p_195705_1_)
    • checkAllocated

      private void checkAllocated()
    • close

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

      public int getWidth()
    • getHeight

      public int getHeight()
    • format

      public NativeImage.PixelFormat format()
    • getPixelRGBA

      public int getPixelRGBA(int p_195709_1_, int p_195709_2_)
    • setPixelRGBA

      public void setPixelRGBA(int p_195700_1_, int p_195700_2_, int p_195700_3_)
    • getLuminanceOrAlpha

      public byte getLuminanceOrAlpha(int p_211675_1_, int p_211675_2_)
    • makePixelArray

      @Deprecated public int[] makePixelArray()
      Deprecated.
    • upload

      public void upload(int p_195697_1_, int p_195697_2_, int p_195697_3_, boolean p_195697_4_)
    • upload

      public void upload(int p_227788_1_, int p_227788_2_, int p_227788_3_, int p_227788_4_, int p_227788_5_, int p_227788_6_, int p_227788_7_, boolean p_227788_8_, boolean p_227788_9_)
    • upload

      public void upload(int p_227789_1_, int p_227789_2_, int p_227789_3_, int p_227789_4_, int p_227789_5_, int p_227789_6_, int p_227789_7_, boolean p_227789_8_, boolean p_227789_9_, boolean p_227789_10_, boolean p_227789_11_)
    • _upload

      private void _upload(int p_227792_1_, int p_227792_2_, int p_227792_3_, int p_227792_4_, int p_227792_5_, int p_227792_6_, int p_227792_7_, boolean p_227792_8_, boolean p_227792_9_, boolean p_227792_10_, boolean p_227792_11_)
    • downloadTexture

      public void downloadTexture(int p_195717_1_, boolean p_195717_2_)
    • writeToFile

      public void writeToFile(File p_209271_1_) throws IOException
      Throws:
      IOException
    • copyFromFont

      public void copyFromFont(org.lwjgl.stb.STBTTFontinfo p_211676_1_, int p_211676_2_, int p_211676_3_, int p_211676_4_, float p_211676_5_, float p_211676_6_, float p_211676_7_, float p_211676_8_, int p_211676_9_, int p_211676_10_)
    • writeToFile

      public void writeToFile(Path p_209270_1_) throws IOException
      Throws:
      IOException
    • asByteArray

      public byte[] asByteArray() throws IOException
      Throws:
      IOException
    • writeToChannel

      private boolean writeToChannel(WritableByteChannel p_227790_1_) throws IOException
      Throws:
      IOException
    • copyFrom

      public void copyFrom(NativeImage p_195703_1_)
    • fillRect

      public void fillRect(int p_195715_1_, int p_195715_2_, int p_195715_3_, int p_195715_4_, int p_195715_5_)
    • copyRect

      public void copyRect(int p_195699_1_, int p_195699_2_, int p_195699_3_, int p_195699_4_, int p_195699_5_, int p_195699_6_, boolean p_195699_7_, boolean p_195699_8_)
    • flipY

      public void flipY()
    • resizeSubRectTo

      public void resizeSubRectTo(int p_195708_1_, int p_195708_2_, int p_195708_3_, int p_195708_4_, NativeImage p_195708_5_)
    • untrack

      public void untrack()
    • fromBase64

      public static NativeImage fromBase64(String p_216511_0_) throws IOException
      Throws:
      IOException
    • getA

      public static int getA(int p_227786_0_)
    • getR

      public static int getR(int p_227791_0_)
    • getG

      public static int getG(int p_227793_0_)
    • getB

      public static int getB(int p_227795_0_)
    • combine

      public static int combine(int p_227787_0_, int p_227787_1_, int p_227787_2_, int p_227787_3_)