Package net.minecraft.client.texture
Class NativeImage
java.lang.Object
net.minecraft.client.texture.NativeImage
- All Implemented Interfaces:
AutoCloseable
- Mappings:
Namespace Name named net/minecraft/client/texture/NativeImageintermediary net/minecraft/class_1011official fwp
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final NativeImage.Formatprivate final intprivate final booleanprivate static final Loggerprivate static final com.mojang.jtracy.MemoryPoolprivate longprivate final longprivate final intprivate static final Set<StandardOpenOption> -
Constructor Summary
ConstructorsConstructorDescriptionNativeImage(int width, int height, boolean useStb) NativeImage(NativeImage.Format format, int width, int height, boolean useStb) NativeImage(NativeImage.Format format, int width, int height, boolean useStb, long pointer) -
Method Summary
Modifier and TypeMethodDescriptionapplyToCopy(IntUnaryOperator operator) private voidvoidclose()voidcopyFrom(NativeImage image) int[]int[]voidcopyRect(int x, int y, int translateX, int translateY, int width, int height, boolean flipX, boolean flipY) voidcopyRect(NativeImage image, int x, int y, int destX, int destY, int width, int height, boolean flipX, boolean flipY) voidfillRect(int x, int y, int width, int height, int color) private intgetColor(int x, int y) Gets the color of a pixel on this native image.intgetColorArgb(int x, int y) intbytegetOpacity(int x, int y) intgetWidth()longimageId()private booleanisOutOfBounds(int x, int y) booleanmakeGlyphBitmapSubpixel(FT_Face face, int glyphIndex) int[]Deprecated.private static NativeImageputAndRead(ByteBuffer buffer, byte[] bytes) static NativeImageread(byte[] bytes) static NativeImageread(InputStream stream) static NativeImageread(ByteBuffer buffer) static NativeImageread(@Nullable NativeImage.Format format, InputStream stream) static NativeImageread(@Nullable NativeImage.Format format, ByteBuffer buffer) voidresizeSubRectTo(int x, int y, int width, int height, NativeImage targetImage) voidsetColor(int x, int y, int color) Sets the color of a pixel on this native image.voidsetColorArgb(int x, int y, int color) toString()voiduntrack()private booleanwrite(WritableByteChannel channel) voidvoid
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/texture/NativeImage;LOGGER:Lorg/slf4j/Logger;intermediary field_21684Lnet/minecraft/class_1011;field_21684:Lorg/slf4j/Logger;official aLfwp;a:Lorg/slf4j/Logger;
-
MEMORY_POOL
private static final com.mojang.jtracy.MemoryPool MEMORY_POOL- Mappings:
Namespace Name Mixin selector named MEMORY_POOLLnet/minecraft/client/texture/NativeImage;MEMORY_POOL:Lcom/mojang/jtracy/MemoryPool;intermediary field_54265Lnet/minecraft/class_1011;field_54265:Lcom/mojang/jtracy/MemoryPool;official bLfwp;b:Lcom/mojang/jtracy/MemoryPool;
-
WRITE_TO_FILE_OPEN_OPTIONS
- Mappings:
Namespace Name Mixin selector named WRITE_TO_FILE_OPEN_OPTIONSLnet/minecraft/client/texture/NativeImage;WRITE_TO_FILE_OPEN_OPTIONS:Ljava/util/Set;intermediary field_4992Lnet/minecraft/class_1011;field_4992:Ljava/util/Set;official cLfwp;c:Ljava/util/Set;
-
format
- Mappings:
Namespace Name Mixin selector named formatLnet/minecraft/client/texture/NativeImage;format:Lnet/minecraft/client/texture/NativeImage$Format;intermediary field_4986Lnet/minecraft/class_1011;field_4986:Lnet/minecraft/class_1011$class_1012;official dLfwp;d:Lfwp$a;
-
width
private final int width- Mappings:
Namespace Name Mixin selector named widthLnet/minecraft/client/texture/NativeImage;width:Iintermediary field_4991Lnet/minecraft/class_1011;field_4991:Iofficial eLfwp;e:I
-
height
private final int height- Mappings:
Namespace Name Mixin selector named heightLnet/minecraft/client/texture/NativeImage;height:Iintermediary field_4989Lnet/minecraft/class_1011;field_4989:Iofficial fLfwp;f:I
-
isStbImage
private final boolean isStbImage- Mappings:
Namespace Name Mixin selector named isStbImageLnet/minecraft/client/texture/NativeImage;isStbImage:Zintermediary field_4990Lnet/minecraft/class_1011;field_4990:Zofficial gLfwp;g:Z
-
pointer
private long pointer- Mappings:
Namespace Name Mixin selector named pointerLnet/minecraft/client/texture/NativeImage;pointer:Jintermediary field_4988Lnet/minecraft/class_1011;field_4988:Jofficial hLfwp;h:J
-
sizeBytes
private final long sizeBytes- Mappings:
Namespace Name Mixin selector named sizeBytesLnet/minecraft/client/texture/NativeImage;sizeBytes:Jintermediary field_4987Lnet/minecraft/class_1011;field_4987:Jofficial iLfwp;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)Vintermediary <init>Lnet/minecraft/class_1011;<init>(IIZ)Vofficial <init>Lfwp;<init>(IIZ)V
-
NativeImage
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZ)Vintermediary <init>Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZ)Vofficial <init>Lfwp;<init>(Lfwp$a;IIZ)V
-
NativeImage
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZJ)Vintermediary <init>Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZJ)Vofficial <init>Lfwp;<init>(Lfwp$a;IIZJ)V
-
-
Method Details
-
toString
-
isOutOfBounds
private boolean isOutOfBounds(int x, int y) - Mappings:
Namespace Name Mixin selector named isOutOfBoundsLnet/minecraft/client/texture/NativeImage;isOutOfBounds(II)Zintermediary method_36559Lnet/minecraft/class_1011;method_36559(II)Zofficial cLfwp;c(II)Z
-
read
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/client/texture/NativeImage;read(Ljava/io/InputStream;)Lnet/minecraft/client/texture/NativeImage;intermediary method_4309Lnet/minecraft/class_1011;method_4309(Ljava/io/InputStream;)Lnet/minecraft/class_1011;official aLfwp;a(Ljava/io/InputStream;)Lfwp;
-
read
public static NativeImage read(@Nullable NativeImage.Format format, InputStream stream) throws IOException - Throws:
IOException- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/client/texture/NativeImage;read(Lnet/minecraft/client/texture/NativeImage$Format;Ljava/io/InputStream;)Lnet/minecraft/client/texture/NativeImage;intermediary method_4310Lnet/minecraft/class_1011;method_4310(Lnet/minecraft/class_1011$class_1012;Ljava/io/InputStream;)Lnet/minecraft/class_1011;official aLfwp;a(Lfwp$a;Ljava/io/InputStream;)Lfwp;
-
read
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/client/texture/NativeImage;read(Ljava/nio/ByteBuffer;)Lnet/minecraft/client/texture/NativeImage;intermediary method_4324Lnet/minecraft/class_1011;method_4324(Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;official aLfwp;a(Ljava/nio/ByteBuffer;)Lfwp;
-
read
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/client/texture/NativeImage;read([B)Lnet/minecraft/client/texture/NativeImage;intermediary method_49277Lnet/minecraft/class_1011;method_49277([B)Lnet/minecraft/class_1011;official aLfwp;a([B)Lfwp;
-
putAndRead
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named putAndReadLnet/minecraft/client/texture/NativeImage;putAndRead(Ljava/nio/ByteBuffer;[B)Lnet/minecraft/client/texture/NativeImage;intermediary method_65806Lnet/minecraft/class_1011;method_65806(Ljava/nio/ByteBuffer;[B)Lnet/minecraft/class_1011;official aLfwp;a(Ljava/nio/ByteBuffer;[B)Lfwp;
-
read
public static NativeImage read(@Nullable NativeImage.Format format, ByteBuffer buffer) throws IOException - Throws:
IOException- Mappings:
Namespace Name Mixin selector named readLnet/minecraft/client/texture/NativeImage;read(Lnet/minecraft/client/texture/NativeImage$Format;Ljava/nio/ByteBuffer;)Lnet/minecraft/client/texture/NativeImage;intermediary method_4303Lnet/minecraft/class_1011;method_4303(Lnet/minecraft/class_1011$class_1012;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;official aLfwp;a(Lfwp$a;Ljava/nio/ByteBuffer;)Lfwp;
-
checkAllocated
private void checkAllocated()- Mappings:
Namespace Name Mixin selector named checkAllocatedLnet/minecraft/client/texture/NativeImage;checkAllocated()Vintermediary method_4320Lnet/minecraft/class_1011;method_4320()Vofficial iLfwp;i()V
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getWidth
public int getWidth()- Mappings:
Namespace Name Mixin selector named getWidthLnet/minecraft/client/texture/NativeImage;getWidth()Iintermediary method_4307Lnet/minecraft/class_1011;method_4307()Iofficial aLfwp;a()I
-
getHeight
public int getHeight()- Mappings:
Namespace Name Mixin selector named getHeightLnet/minecraft/client/texture/NativeImage;getHeight()Iintermediary method_4323Lnet/minecraft/class_1011;method_4323()Iofficial bLfwp;b()I
-
getFormat
- Mappings:
Namespace Name Mixin selector named getFormatLnet/minecraft/client/texture/NativeImage;getFormat()Lnet/minecraft/client/texture/NativeImage$Format;intermediary method_4318Lnet/minecraft/class_1011;method_4318()Lnet/minecraft/class_1011$class_1012;official cLfwp;c()Lfwp$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 getColorLnet/minecraft/client/texture/NativeImage;getColor(II)Iintermediary method_4315Lnet/minecraft/class_1011;method_4315(II)Iofficial dLfwp;d(II)I
-
getColorArgb
public int getColorArgb(int x, int y) - Mappings:
Namespace Name Mixin selector named getColorArgbLnet/minecraft/client/texture/NativeImage;getColorArgb(II)Iintermediary method_61940Lnet/minecraft/class_1011;method_61940(II)Iofficial aLfwp;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 setColorLnet/minecraft/client/texture/NativeImage;setColor(III)Vintermediary method_4305Lnet/minecraft/class_1011;method_4305(III)Vofficial aLfwp;a(III)V
-
setColorArgb
public void setColorArgb(int x, int y, int color) - Mappings:
Namespace Name Mixin selector named setColorArgbLnet/minecraft/client/texture/NativeImage;setColorArgb(III)Vintermediary method_61941Lnet/minecraft/class_1011;method_61941(III)Vofficial bLfwp;b(III)V
-
applyToCopy
- Mappings:
Namespace Name Mixin selector named applyToCopyLnet/minecraft/client/texture/NativeImage;applyToCopy(Ljava/util/function/IntUnaryOperator;)Lnet/minecraft/client/texture/NativeImage;intermediary method_48462Lnet/minecraft/class_1011;method_48462(Ljava/util/function/IntUnaryOperator;)Lnet/minecraft/class_1011;official aLfwp;a(Ljava/util/function/IntUnaryOperator;)Lfwp;
-
copyPixelsAbgr
public int[] copyPixelsAbgr()- Mappings:
Namespace Name Mixin selector named copyPixelsAbgrLnet/minecraft/client/texture/NativeImage;copyPixelsAbgr()[Iintermediary method_48463Lnet/minecraft/class_1011;method_48463()[Iofficial dLfwp;d()[I
-
copyPixelsArgb
public int[] copyPixelsArgb()- Mappings:
Namespace Name Mixin selector named copyPixelsArgbLnet/minecraft/client/texture/NativeImage;copyPixelsArgb()[Iintermediary method_61942Lnet/minecraft/class_1011;method_61942()[Iofficial eLfwp;e()[I
-
getOpacity
public byte getOpacity(int x, int y) - Mappings:
Namespace Name Mixin selector named getOpacityLnet/minecraft/client/texture/NativeImage;getOpacity(II)Bintermediary method_4311Lnet/minecraft/class_1011;method_4311(II)Bofficial bLfwp;b(II)B
-
makePixelArray
Deprecated.- Mappings:
Namespace Name Mixin selector named makePixelArrayLnet/minecraft/client/texture/NativeImage;makePixelArray()[Iintermediary method_4322Lnet/minecraft/class_1011;method_4322()[Iofficial fLfwp;f()[I
-
writeTo
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named writeToLnet/minecraft/client/texture/NativeImage;writeTo(Ljava/io/File;)Vintermediary method_4325Lnet/minecraft/class_1011;method_4325(Ljava/io/File;)Vofficial aLfwp;a(Ljava/io/File;)V
-
makeGlyphBitmapSubpixel
- Mappings:
Namespace Name Mixin selector named makeGlyphBitmapSubpixelLnet/minecraft/client/texture/NativeImage;makeGlyphBitmapSubpixel(Lorg/lwjgl/util/freetype/FT_Face;I)Zintermediary method_4316Lnet/minecraft/class_1011;method_4316(Lorg/lwjgl/util/freetype/FT_Face;I)Zofficial aLfwp;a(Lorg/lwjgl/util/freetype/FT_Face;I)Z
-
writeTo
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named writeToLnet/minecraft/client/texture/NativeImage;writeTo(Ljava/nio/file/Path;)Vintermediary method_4314Lnet/minecraft/class_1011;method_4314(Ljava/nio/file/Path;)Vofficial aLfwp;a(Ljava/nio/file/Path;)V
-
write
- Throws:
IOException- Mappings:
Namespace Name Mixin selector named writeLnet/minecraft/client/texture/NativeImage;write(Ljava/nio/channels/WritableByteChannel;)Zintermediary method_24032Lnet/minecraft/class_1011;method_24032(Ljava/nio/channels/WritableByteChannel;)Zofficial aLfwp;a(Ljava/nio/channels/WritableByteChannel;)Z
-
copyFrom
- Mappings:
Namespace Name Mixin selector named copyFromLnet/minecraft/client/texture/NativeImage;copyFrom(Lnet/minecraft/client/texture/NativeImage;)Vintermediary method_4317Lnet/minecraft/class_1011;method_4317(Lnet/minecraft/class_1011;)Vofficial aLfwp;a(Lfwp;)V
-
fillRect
public void fillRect(int x, int y, int width, int height, int color) - Mappings:
Namespace Name Mixin selector named fillRectLnet/minecraft/client/texture/NativeImage;fillRect(IIIII)Vintermediary method_4326Lnet/minecraft/class_1011;method_4326(IIIII)Vofficial aLfwp;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 copyRectLnet/minecraft/client/texture/NativeImage;copyRect(IIIIIIZZ)Vintermediary method_4304Lnet/minecraft/class_1011;method_4304(IIIIIIZZ)Vofficial aLfwp;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 copyRectLnet/minecraft/client/texture/NativeImage;copyRect(Lnet/minecraft/client/texture/NativeImage;IIIIIIZZ)Vintermediary method_47594Lnet/minecraft/class_1011;method_47594(Lnet/minecraft/class_1011;IIIIIIZZ)Vofficial aLfwp;a(Lfwp;IIIIIIZZ)V
-
resizeSubRectTo
- Mappings:
Namespace Name Mixin selector named resizeSubRectToLnet/minecraft/client/texture/NativeImage;resizeSubRectTo(IIIILnet/minecraft/client/texture/NativeImage;)Vintermediary method_4300Lnet/minecraft/class_1011;method_4300(IIIILnet/minecraft/class_1011;)Vofficial aLfwp;a(IIIILfwp;)V
-
untrack
public void untrack()- Mappings:
Namespace Name Mixin selector named untrackLnet/minecraft/client/texture/NativeImage;untrack()Vintermediary method_4302Lnet/minecraft/class_1011;method_4302()Vofficial gLfwp;g()V
-
imageId
public long imageId()- Mappings:
Namespace Name Mixin selector named imageIdLnet/minecraft/client/texture/NativeImage;imageId()Jintermediary method_67769Lnet/minecraft/class_1011;method_67769()Jofficial hLfwp;h()J
-