Package net.minecraft.client.texture
Class NativeImage
java.lang.Object
net.minecraft.client.texture.NativeImage
- All Implemented Interfaces:
AutoCloseable
- Mappings:
Namespace Name official dplintermediary net/minecraft/class_1011named net/minecraft/client/texture/NativeImage
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static intprivate static intprivate static intprivate static intprivate NativeImage.Formatprivate intprivate booleanprivate static Loggerprivate longprivate longprivate intprivate static Set<StandardOpenOption> -
Constructor Summary
ConstructorsModifierConstructorDescriptionNativeImage(int width, int height, boolean useStb)NativeImage(NativeImage.Format format, int width, int height, boolean useStb)privateNativeImage(NativeImage.Format format, int width, int height, boolean useStb, long pointer) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidclose()voidcopyFrom(NativeImage image)voidcopyRect(int x, int y, int translateX, int translateY, int width, int height, boolean flipX, boolean flipY)voidfillRect(int x, int y, int width, int height, int color)static intgetAbgrColor(int alpha, int blue, int green, int red)The resulting color of this operation is stored as least to most significant bits.static intgetAlpha(int color)static intgetBlue(int color)byte[]getBytes()static intgetGreen(int color)intintgetPixelColor(int x, int y)Gets the color of a pixel on this native image.bytegetPixelOpacity(int x, int y)static intgetRed(int color)intgetWidth()voidloadFromTextureImage(int level, boolean removeAlpha)voidmakeGlyphBitmapSubpixel(STBTTFontinfo fontInfo, int glyphIndex, int width, int height, float scaleX, float scaleY, float shiftX, float shiftY, int startX, int startY)int[]Deprecated.voidmethod_35620(float float2)voidmethod_35621(int int2, int int3, byte byte2)voidmethod_35622(String string)bytemethod_35623(int int2, int int3)voidmethod_35624(int int2, int int3, int int4)bytemethod_35625(int int2, int int3)bytemethod_35626(int int2, int int3)voidprivate booleanmethod_36559(int int2, int int3)voidstatic NativeImageread(@Nullable NativeImage.Format format, InputStream inputStream)static NativeImageread(@Nullable NativeImage.Format format, ByteBuffer byteBuffer)static NativeImageread(InputStream inputStream)static NativeImagestatic NativeImageread(ByteBuffer byteBuffer)voidresizeSubRectTo(int x, int y, int width, int height, NativeImage targetImage)voidsetPixelColor(int x, int y, int color)Sets the color of a pixel on this native image.private static voidsetTextureFilter(boolean blur, boolean mipmap)toString()voiduntrack()voidupload(int level, int offsetX, int offsetY, boolean close)voidupload(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean mipmap, boolean close)voidupload(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean blur, boolean clamp, boolean mipmap, boolean close)private voiduploadInternal(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean blur, boolean clamp, boolean mipmap, boolean close)private booleanwrite(WritableByteChannel writableByteChannel)voidvoid
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official aLdpl;a:Lorg/apache/logging/log4j/Logger;intermediary field_21684Lnet/minecraft/class_1011;field_21684:Lorg/apache/logging/log4j/Logger;named LOGGERLnet/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 bLdpl;b:Iintermediary field_32031Lnet/minecraft/class_1011;field_32031:Inamed field_32031Lnet/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 cLdpl;c:Iintermediary field_32032Lnet/minecraft/class_1011;field_32032:Inamed field_32032Lnet/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 dLdpl;d:Iintermediary field_32033Lnet/minecraft/class_1011;field_32033:Inamed field_32033Lnet/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 eLdpl;e:Iintermediary field_32034Lnet/minecraft/class_1011;field_32034:Inamed field_32034Lnet/minecraft/client/texture/NativeImage;field_32034:I
-
WRITE_TO_FILE_OPEN_OPTIONS
- Mappings:
Namespace Name Mixin selector official fLdpl;f:Ljava/util/Set;intermediary field_4992Lnet/minecraft/class_1011;field_4992:Ljava/util/Set;named WRITE_TO_FILE_OPEN_OPTIONSLnet/minecraft/client/texture/NativeImage;WRITE_TO_FILE_OPEN_OPTIONS:Ljava/util/Set;
-
format
- Mappings:
Namespace Name Mixin selector official gLdpl;g:Ldpl$a;intermediary field_4986Lnet/minecraft/class_1011;field_4986:Lnet/minecraft/class_1011$class_1012;named formatLnet/minecraft/client/texture/NativeImage;format:Lnet/minecraft/client/texture/NativeImage$Format;
-
width
private final int width- Mappings:
Namespace Name Mixin selector official hLdpl;h:Iintermediary field_4991Lnet/minecraft/class_1011;field_4991:Inamed widthLnet/minecraft/client/texture/NativeImage;width:I
-
height
private final int height- Mappings:
Namespace Name Mixin selector official iLdpl;i:Iintermediary field_4989Lnet/minecraft/class_1011;field_4989:Inamed heightLnet/minecraft/client/texture/NativeImage;height:I
-
isStbImage
private final boolean isStbImage- Mappings:
Namespace Name Mixin selector official jLdpl;j:Zintermediary field_4990Lnet/minecraft/class_1011;field_4990:Znamed isStbImageLnet/minecraft/client/texture/NativeImage;isStbImage:Z
-
pointer
private long pointer- Mappings:
Namespace Name Mixin selector official kLdpl;k:Jintermediary field_4988Lnet/minecraft/class_1011;field_4988:Jnamed pointerLnet/minecraft/client/texture/NativeImage;pointer:J
-
sizeBytes
private final long sizeBytes- Mappings:
Namespace Name Mixin selector official lLdpl;l:Jintermediary field_4987Lnet/minecraft/class_1011;field_4987:Jnamed sizeBytesLnet/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)Vintermediary <init>Lnet/minecraft/class_1011;<init>(IIZ)Vnamed <init>Lnet/minecraft/client/texture/NativeImage;<init>(IIZ)V
-
NativeImage
- Mappings:
Namespace Name Mixin selector official <init>Ldpl;<init>(Ldpl$a;IIZ)Vintermediary <init>Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZ)Vnamed <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)Vintermediary <init>Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZJ)Vnamed <init>Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZJ)V
-
-
Method Details
-
toString
-
method_36559
private boolean method_36559(int int2, int int3)- Mappings:
Namespace Name Mixin selector official fLdpl;f(II)Zintermediary method_36559Lnet/minecraft/class_1011;method_36559(II)Znamed method_36559Lnet/minecraft/client/texture/NativeImage;method_36559(II)Z
-
read
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ljava/io/InputStream;)Ldpl;intermediary method_4309Lnet/minecraft/class_1011;method_4309(Ljava/io/InputStream;)Lnet/minecraft/class_1011;named readLnet/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 aLdpl;a(Ldpl$a;Ljava/io/InputStream;)Ldpl;intermediary method_4310Lnet/minecraft/class_1011;method_4310(Lnet/minecraft/class_1011$class_1012;Ljava/io/InputStream;)Lnet/minecraft/class_1011;named readLnet/minecraft/client/texture/NativeImage;read(Lnet/minecraft/client/texture/NativeImage$Format;Ljava/io/InputStream;)Lnet/minecraft/client/texture/NativeImage;
-
read
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ljava/nio/ByteBuffer;)Ldpl;intermediary method_4324Lnet/minecraft/class_1011;method_4324(Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;named readLnet/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 aLdpl;a(Ldpl$a;Ljava/nio/ByteBuffer;)Ldpl;intermediary method_4303Lnet/minecraft/class_1011;method_4303(Lnet/minecraft/class_1011$class_1012;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;named readLnet/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 aLdpl;a(ZZ)Vintermediary method_4308Lnet/minecraft/class_1011;method_4308(ZZ)Vnamed setTextureFilterLnet/minecraft/client/texture/NativeImage;setTextureFilter(ZZ)V
-
checkAllocated
private void checkAllocated()- Mappings:
Namespace Name Mixin selector official iLdpl;i()Vintermediary method_4320Lnet/minecraft/class_1011;method_4320()Vnamed checkAllocatedLnet/minecraft/client/texture/NativeImage;checkAllocated()V
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getWidth
public int getWidth()- Mappings:
Namespace Name Mixin selector official aLdpl;a()Iintermediary method_4307Lnet/minecraft/class_1011;method_4307()Inamed getWidthLnet/minecraft/client/texture/NativeImage;getWidth()I
-
getHeight
public int getHeight()- Mappings:
Namespace Name Mixin selector official bLdpl;b()Iintermediary method_4323Lnet/minecraft/class_1011;method_4323()Inamed getHeightLnet/minecraft/client/texture/NativeImage;getHeight()I
-
getFormat
- Mappings:
Namespace Name Mixin selector official cLdpl;c()Ldpl$a;intermediary method_4318Lnet/minecraft/class_1011;method_4318()Lnet/minecraft/class_1011$class_1012;named getFormatLnet/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 aLdpl;a(II)Iintermediary method_4315Lnet/minecraft/class_1011;method_4315(II)Inamed getPixelColorLnet/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 aLdpl;a(III)Vintermediary method_4305Lnet/minecraft/class_1011;method_4305(III)Vnamed setPixelColorLnet/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 aLdpl;a(IIB)Vintermediary method_35621Lnet/minecraft/class_1011;method_35621(IIB)Vnamed method_35621Lnet/minecraft/client/texture/NativeImage;method_35621(IIB)V
-
method_35623
public byte method_35623(int int2, int int3)- Mappings:
Namespace Name Mixin selector official bLdpl;b(II)Bintermediary method_35623Lnet/minecraft/class_1011;method_35623(II)Bnamed method_35623Lnet/minecraft/client/texture/NativeImage;method_35623(II)B
-
method_35625
public byte method_35625(int int2, int int3)- Mappings:
Namespace Name Mixin selector official cLdpl;c(II)Bintermediary method_35625Lnet/minecraft/class_1011;method_35625(II)Bnamed method_35625Lnet/minecraft/client/texture/NativeImage;method_35625(II)B
-
method_35626
public byte method_35626(int int2, int int3)- Mappings:
Namespace Name Mixin selector official dLdpl;d(II)Bintermediary method_35626Lnet/minecraft/class_1011;method_35626(II)Bnamed method_35626Lnet/minecraft/client/texture/NativeImage;method_35626(II)B
-
getPixelOpacity
public byte getPixelOpacity(int x, int y)- Mappings:
Namespace Name Mixin selector official eLdpl;e(II)Bintermediary method_4311Lnet/minecraft/class_1011;method_4311(II)Bnamed getPixelOpacityLnet/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 bLdpl;b(III)Vintermediary method_35624Lnet/minecraft/class_1011;method_35624(III)Vnamed method_35624Lnet/minecraft/client/texture/NativeImage;method_35624(III)V
-
makePixelArray
Deprecated.- Mappings:
Namespace Name Mixin selector official dLdpl;d()[Iintermediary method_4322Lnet/minecraft/class_1011;method_4322()[Inamed makePixelArrayLnet/minecraft/client/texture/NativeImage;makePixelArray()[I
-
upload
public void upload(int level, int offsetX, int offsetY, boolean close)- Mappings:
Namespace Name Mixin selector official aLdpl;a(IIIZ)Vintermediary method_4301Lnet/minecraft/class_1011;method_4301(IIIZ)Vnamed uploadLnet/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 aLdpl;a(IIIIIIIZZ)Vintermediary method_4312Lnet/minecraft/class_1011;method_4312(IIIIIIIZZ)Vnamed uploadLnet/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 aLdpl;a(IIIIIIIZZZZ)Vintermediary method_22619Lnet/minecraft/class_1011;method_22619(IIIIIIIZZZZ)Vnamed uploadLnet/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 bLdpl;b(IIIIIIIZZZZ)Vintermediary method_4321Lnet/minecraft/class_1011;method_4321(IIIIIIIZZZZ)Vnamed uploadInternalLnet/minecraft/client/texture/NativeImage;uploadInternal(IIIIIIIZZZZ)V
-
loadFromTextureImage
public void loadFromTextureImage(int level, boolean removeAlpha)- Mappings:
Namespace Name Mixin selector official aLdpl;a(IZ)Vintermediary method_4327Lnet/minecraft/class_1011;method_4327(IZ)Vnamed loadFromTextureImageLnet/minecraft/client/texture/NativeImage;loadFromTextureImage(IZ)V
-
method_35620
public void method_35620(float float2)- Mappings:
Namespace Name Mixin selector official aLdpl;a(F)Vintermediary method_35620Lnet/minecraft/class_1011;method_35620(F)Vnamed method_35620Lnet/minecraft/client/texture/NativeImage;method_35620(F)V
-
method_35627
public void method_35627()- Mappings:
Namespace Name Mixin selector official eLdpl;e()Vintermediary method_35627Lnet/minecraft/class_1011;method_35627()Vnamed method_35627Lnet/minecraft/client/texture/NativeImage;method_35627()V
-
method_35622
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ljava/lang/String;)Vintermediary method_35622Lnet/minecraft/class_1011;method_35622(Ljava/lang/String;)Vnamed method_35622Lnet/minecraft/client/texture/NativeImage;method_35622(Ljava/lang/String;)V
-
writeFile
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ljava/io/File;)Vintermediary method_4325Lnet/minecraft/class_1011;method_4325(Ljava/io/File;)Vnamed writeFileLnet/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 aLdpl;a(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)Vintermediary method_4316Lnet/minecraft/class_1011;method_4316(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)Vnamed makeGlyphBitmapSubpixelLnet/minecraft/client/texture/NativeImage;makeGlyphBitmapSubpixel(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
-
writeFile
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ljava/nio/file/Path;)Vintermediary method_4314Lnet/minecraft/class_1011;method_4314(Ljava/nio/file/Path;)Vnamed writeFileLnet/minecraft/client/texture/NativeImage;writeFile(Ljava/nio/file/Path;)V
-
getBytes
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official fLdpl;f()[Bintermediary method_24036Lnet/minecraft/class_1011;method_24036()[Bnamed getBytesLnet/minecraft/client/texture/NativeImage;getBytes()[B
-
write
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ljava/nio/channels/WritableByteChannel;)Zintermediary method_24032Lnet/minecraft/class_1011;method_24032(Ljava/nio/channels/WritableByteChannel;)Znamed writeLnet/minecraft/client/texture/NativeImage;write(Ljava/nio/channels/WritableByteChannel;)Z
-
copyFrom
- Mappings:
Namespace Name Mixin selector official aLdpl;a(Ldpl;)Vintermediary method_4317Lnet/minecraft/class_1011;method_4317(Lnet/minecraft/class_1011;)Vnamed copyFromLnet/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 aLdpl;a(IIIII)Vintermediary method_4326Lnet/minecraft/class_1011;method_4326(IIIII)Vnamed fillRectLnet/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 aLdpl;a(IIIIIIZZ)Vintermediary method_4304Lnet/minecraft/class_1011;method_4304(IIIIIIZZ)Vnamed copyRectLnet/minecraft/client/texture/NativeImage;copyRect(IIIIIIZZ)V
-
mirrorVertically
public void mirrorVertically()- Mappings:
Namespace Name Mixin selector official gLdpl;g()Vintermediary method_4319Lnet/minecraft/class_1011;method_4319()Vnamed mirrorVerticallyLnet/minecraft/client/texture/NativeImage;mirrorVertically()V
-
resizeSubRectTo
- Mappings:
Namespace Name Mixin selector official aLdpl;a(IIIILdpl;)Vintermediary method_4300Lnet/minecraft/class_1011;method_4300(IIIILnet/minecraft/class_1011;)Vnamed resizeSubRectToLnet/minecraft/client/texture/NativeImage;resizeSubRectTo(IIIILnet/minecraft/client/texture/NativeImage;)V
-
untrack
public void untrack()- Mappings:
Namespace Name Mixin selector official hLdpl;h()Vintermediary method_4302Lnet/minecraft/class_1011;method_4302()Vnamed untrackLnet/minecraft/client/texture/NativeImage;untrack()V
-
read
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official bLdpl;b(Ljava/lang/String;)Ldpl;intermediary method_15990Lnet/minecraft/class_1011;method_15990(Ljava/lang/String;)Lnet/minecraft/class_1011;named readLnet/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 aLdpl;a(I)Iintermediary method_24030Lnet/minecraft/class_1011;method_24030(I)Inamed getAlphaLnet/minecraft/client/texture/NativeImage;getAlpha(I)I
-
getRed
public static int getRed(int color)- Mappings:
Namespace Name Mixin selector official bLdpl;b(I)Iintermediary method_24033Lnet/minecraft/class_1011;method_24033(I)Inamed getRedLnet/minecraft/client/texture/NativeImage;getRed(I)I
-
getGreen
public static int getGreen(int color)- Mappings:
Namespace Name Mixin selector official cLdpl;c(I)Iintermediary method_24034Lnet/minecraft/class_1011;method_24034(I)Inamed getGreenLnet/minecraft/client/texture/NativeImage;getGreen(I)I
-
getBlue
public static int getBlue(int color)- Mappings:
Namespace Name Mixin selector official dLdpl;d(I)Iintermediary method_24035Lnet/minecraft/class_1011;method_24035(I)Inamed getBlueLnet/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 aLdpl;a(IIII)Iintermediary method_24031Lnet/minecraft/class_1011;method_24031(IIII)Inamed getAbgrColorLnet/minecraft/client/texture/NativeImage;getAbgrColor(IIII)I
-