Class NativeImage
java.lang.Object
net.minecraft.client.renderer.texture.NativeImage
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final NativeImage.PixelFormat
private final int
private static final org.apache.logging.log4j.Logger
private static final Set<StandardOpenOption>
private long
private final long
private final boolean
private final int
-
Constructor Summary
ModifierConstructorDescriptionNativeImage
(int p_i48122_1_, int p_i48122_2_, boolean p_i48122_3_) NativeImage
(NativeImage.PixelFormat p_i49763_1_, int p_i49763_2_, int p_i49763_3_, boolean p_i49763_4_) private
NativeImage
(NativeImage.PixelFormat p_i49764_1_, int p_i49764_2_, int p_i49764_3_, boolean p_i49764_4_, long p_i49764_5_) -
Method Summary
Modifier and TypeMethodDescriptionprivate 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_) byte[]
private void
void
close()
static int
combine
(int p_227787_0_, int p_227787_1_, int p_227787_2_, int p_227787_3_) void
copyFrom
(NativeImage p_195703_1_) 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_) 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_) void
downloadTexture
(int p_195717_1_, boolean p_195717_2_) void
fillRect
(int p_195715_1_, int p_195715_2_, int p_195715_3_, int p_195715_4_, int p_195715_5_) void
flipY()
format()
static NativeImage
fromBase64
(String p_216511_0_) static int
getA
(int p_227786_0_) static int
getB
(int p_227795_0_) static int
getG
(int p_227793_0_) int
byte
getLuminanceOrAlpha
(int p_211675_1_, int p_211675_2_) int
getPixelRGBA
(int p_195709_1_, int p_195709_2_) static int
getR
(int p_227791_0_) int
getWidth()
int[]
Deprecated.static NativeImage
read
(InputStream p_195713_0_) static NativeImage
read
(ByteBuffer p_195704_0_) static NativeImage
read
(NativeImage.PixelFormat p_211679_0_, InputStream p_211679_1_) static NativeImage
read
(NativeImage.PixelFormat p_211677_0_, ByteBuffer p_211677_1_) void
resizeSubRectTo
(int p_195708_1_, int p_195708_2_, int p_195708_3_, int p_195708_4_, NativeImage p_195708_5_) private static void
setClamp
(boolean p_195707_0_) private static void
setFilter
(boolean p_195705_0_, boolean p_195705_1_) void
setPixelRGBA
(int p_195700_1_, int p_195700_2_, int p_195700_3_) toString()
void
untrack()
void
upload
(int p_195697_1_, int p_195697_2_, int p_195697_3_, boolean p_195697_4_) 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_) 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_) private boolean
writeToChannel
(WritableByteChannel p_227790_1_) void
writeToFile
(File p_209271_1_) void
writeToFile
(Path p_209270_1_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
OPEN_OPTIONS
-
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
-
read
- Throws:
IOException
-
read
public static NativeImage read(@Nullable NativeImage.PixelFormat p_211679_0_, InputStream p_211679_1_) throws IOException - Throws:
IOException
-
read
- 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 interfaceAutoCloseable
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
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. -
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
- 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
- Throws:
IOException
-
asByteArray
- Throws:
IOException
-
writeToChannel
- Throws:
IOException
-
copyFrom
-
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
- 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_)
-