Package net.minecraft.client.texture
Class NativeImage
java.lang.Object
net.minecraft.client.texture.NativeImage
- All Implemented Interfaces:
AutoCloseable
- Mappings:
Namespace Name official ekq
intermediary net/minecraft/class_1011
named net/minecraft/client/texture/NativeImage
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static enum
Represents the internal formats sent toglTexImage2D
, representing the number of color channels present in an image to prepare.private static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final NativeImage.Format
private final int
private final boolean
private static final Logger
private long
private final long
private final int
private static final Set<StandardOpenOption>
-
Constructor Summary
ModifierConstructorDescriptionNativeImage
(int width, int height, boolean useStb) NativeImage
(NativeImage.Format format, int width, int height, boolean useStb) private
NativeImage
(NativeImage.Format format, int width, int height, boolean useStb, long pointer) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(IntUnaryOperator operator) applyToCopy
(IntUnaryOperator operator) void
blend
(int x, int y, int color) private void
void
close()
void
copyFrom
(NativeImage image) int[]
void
copyRect
(int x, int y, int translateX, int translateY, int width, int height, boolean flipX, boolean flipY) void
copyRect
(NativeImage image, int x, int y, int destX, int destY, int width, int height, boolean flipX, boolean flipY) void
Useupload
to upload this image to GL so it can be used later.void
fillRect
(int x, int y, int width, int height, int color) byte
getBlue
(int x, int y) byte[]
getBytes()
int
getColor
(int x, int y) Gets the color of a pixel on this native image.byte
getGreen
(int x, int y) int
byte
getOpacity
(int x, int y) byte
getRed
(int x, int y) int
getWidth()
private boolean
isOutOfBounds
(int x, int y) void
loadFromTextureImage
(int level, boolean removeAlpha) void
makeGlyphBitmapSubpixel
(STBTTFontinfo fontInfo, int glyphIndex, int width, int height, float scaleX, float scaleY, float shiftX, float shiftY, int startX, int startY) int[]
Deprecated.void
static NativeImage
read
(byte[] bytes) static NativeImage
read
(InputStream stream) static NativeImage
read
(ByteBuffer buffer) static NativeImage
read
(@Nullable NativeImage.Format format, InputStream stream) static NativeImage
read
(@Nullable NativeImage.Format format, ByteBuffer buffer) void
readDepthComponent
(float unused) void
resizeSubRectTo
(int x, int y, int width, int height, NativeImage targetImage) void
setColor
(int x, int y, int color) Sets the color of a pixel on this native image.void
setLuminance
(int x, int y, byte luminance) private static void
setTextureFilter
(boolean blur, boolean mipmap) toString()
void
untrack()
void
upload
(int level, int offsetX, int offsetY, boolean close) void
upload
(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean mipmap, boolean close) void
upload
(int level, int offsetX, int offsetY, int unpackSkipPixels, int unpackSkipRows, int width, int height, boolean blur, boolean clamp, boolean mipmap, boolean close) 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) private boolean
write
(WritableByteChannel channel) void
void
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official a
Lekq;a:Lorg/slf4j/Logger;
intermediary field_21684
Lnet/minecraft/class_1011;field_21684:Lorg/slf4j/Logger;
named LOGGER
Lnet/minecraft/client/texture/NativeImage;LOGGER:Lorg/slf4j/Logger;
-
WRITE_TO_FILE_OPEN_OPTIONS
- Mappings:
Namespace Name Mixin selector official b
Lekq;b:Ljava/util/Set;
intermediary field_4992
Lnet/minecraft/class_1011;field_4992:Ljava/util/Set;
named WRITE_TO_FILE_OPEN_OPTIONS
Lnet/minecraft/client/texture/NativeImage;WRITE_TO_FILE_OPEN_OPTIONS:Ljava/util/Set;
-
format
- Mappings:
Namespace Name Mixin selector official c
Lekq;c:Lekq$a;
intermediary field_4986
Lnet/minecraft/class_1011;field_4986:Lnet/minecraft/class_1011$class_1012;
named format
Lnet/minecraft/client/texture/NativeImage;format:Lnet/minecraft/client/texture/NativeImage$Format;
-
width
private final int width- Mappings:
Namespace Name Mixin selector official d
Lekq;d:I
intermediary field_4991
Lnet/minecraft/class_1011;field_4991:I
named width
Lnet/minecraft/client/texture/NativeImage;width:I
-
height
private final int height- Mappings:
Namespace Name Mixin selector official e
Lekq;e:I
intermediary field_4989
Lnet/minecraft/class_1011;field_4989:I
named height
Lnet/minecraft/client/texture/NativeImage;height:I
-
isStbImage
private final boolean isStbImage- Mappings:
Namespace Name Mixin selector official f
Lekq;f:Z
intermediary field_4990
Lnet/minecraft/class_1011;field_4990:Z
named isStbImage
Lnet/minecraft/client/texture/NativeImage;isStbImage:Z
-
pointer
private long pointer- Mappings:
Namespace Name Mixin selector official g
Lekq;g:J
intermediary field_4988
Lnet/minecraft/class_1011;field_4988:J
named pointer
Lnet/minecraft/client/texture/NativeImage;pointer:J
-
sizeBytes
private final long sizeBytes- Mappings:
Namespace Name Mixin selector official h
Lekq;h:J
intermediary field_4987
Lnet/minecraft/class_1011;field_4987:J
named sizeBytes
Lnet/minecraft/client/texture/NativeImage;sizeBytes:J
-
-
Constructor Details
-
NativeImage
public NativeImage(int width, int height, boolean useStb) - Mappings:
Namespace Name Mixin selector official <init>
Lekq;<init>(IIZ)V
intermediary <init>
Lnet/minecraft/class_1011;<init>(IIZ)V
named <init>
Lnet/minecraft/client/texture/NativeImage;<init>(IIZ)V
-
NativeImage
- Mappings:
Namespace Name Mixin selector official <init>
Lekq;<init>(Lekq$a;IIZ)V
intermediary <init>
Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZ)V
named <init>
Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZ)V
-
NativeImage
- Mappings:
Namespace Name Mixin selector official <init>
Lekq;<init>(Lekq$a;IIZJ)V
intermediary <init>
Lnet/minecraft/class_1011;<init>(Lnet/minecraft/class_1011$class_1012;IIZJ)V
named <init>
Lnet/minecraft/client/texture/NativeImage;<init>(Lnet/minecraft/client/texture/NativeImage$Format;IIZJ)V
-
-
Method Details
-
toString
-
isOutOfBounds
private boolean isOutOfBounds(int x, int y) - Mappings:
Namespace Name Mixin selector official f
Lekq;f(II)Z
intermediary method_36559
Lnet/minecraft/class_1011;method_36559(II)Z
named isOutOfBounds
Lnet/minecraft/client/texture/NativeImage;isOutOfBounds(II)Z
-
read
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Ljava/io/InputStream;)Lekq;
intermediary method_4309
Lnet/minecraft/class_1011;method_4309(Ljava/io/InputStream;)Lnet/minecraft/class_1011;
named read
Lnet/minecraft/client/texture/NativeImage;read(Ljava/io/InputStream;)Lnet/minecraft/client/texture/NativeImage;
-
read
public static NativeImage read(@Nullable @Nullable NativeImage.Format format, InputStream stream) throws IOException - Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Lekq$a;Ljava/io/InputStream;)Lekq;
intermediary method_4310
Lnet/minecraft/class_1011;method_4310(Lnet/minecraft/class_1011$class_1012;Ljava/io/InputStream;)Lnet/minecraft/class_1011;
named read
Lnet/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 a
Lekq;a(Ljava/nio/ByteBuffer;)Lekq;
intermediary method_4324
Lnet/minecraft/class_1011;method_4324(Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;
named read
Lnet/minecraft/client/texture/NativeImage;read(Ljava/nio/ByteBuffer;)Lnet/minecraft/client/texture/NativeImage;
-
read
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a([B)Lekq;
intermediary method_49277
Lnet/minecraft/class_1011;method_49277([B)Lnet/minecraft/class_1011;
named read
Lnet/minecraft/client/texture/NativeImage;read([B)Lnet/minecraft/client/texture/NativeImage;
-
read
public static NativeImage read(@Nullable @Nullable NativeImage.Format format, ByteBuffer buffer) throws IOException - Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Lekq$a;Ljava/nio/ByteBuffer;)Lekq;
intermediary method_4303
Lnet/minecraft/class_1011;method_4303(Lnet/minecraft/class_1011$class_1012;Ljava/nio/ByteBuffer;)Lnet/minecraft/class_1011;
named read
Lnet/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 a
Lekq;a(ZZ)V
intermediary method_4308
Lnet/minecraft/class_1011;method_4308(ZZ)V
named setTextureFilter
Lnet/minecraft/client/texture/NativeImage;setTextureFilter(ZZ)V
-
checkAllocated
private void checkAllocated()- Mappings:
Namespace Name Mixin selector official j
Lekq;j()V
intermediary method_4320
Lnet/minecraft/class_1011;method_4320()V
named checkAllocated
Lnet/minecraft/client/texture/NativeImage;checkAllocated()V
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
getWidth
public int getWidth()- Mappings:
Namespace Name Mixin selector official a
Lekq;a()I
intermediary method_4307
Lnet/minecraft/class_1011;method_4307()I
named getWidth
Lnet/minecraft/client/texture/NativeImage;getWidth()I
-
getHeight
public int getHeight()- Mappings:
Namespace Name Mixin selector official b
Lekq;b()I
intermediary method_4323
Lnet/minecraft/class_1011;method_4323()I
named getHeight
Lnet/minecraft/client/texture/NativeImage;getHeight()I
-
getFormat
- Mappings:
Namespace Name Mixin selector official c
Lekq;c()Lekq$a;
intermediary method_4318
Lnet/minecraft/class_1011;method_4318()Lnet/minecraft/class_1011$class_1012;
named getFormat
Lnet/minecraft/client/texture/NativeImage;getFormat()Lnet/minecraft/client/texture/NativeImage$Format;
-
getColor
public 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 official a
Lekq;a(II)I
intermediary method_4315
Lnet/minecraft/class_1011;method_4315(II)I
named getColor
Lnet/minecraft/client/texture/NativeImage;getColor(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 official a
Lekq;a(III)V
intermediary method_4305
Lnet/minecraft/class_1011;method_4305(III)V
named setColor
Lnet/minecraft/client/texture/NativeImage;setColor(III)V
-
applyToCopy
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Ljava/util/function/IntUnaryOperator;)Lekq;
intermediary method_48462
Lnet/minecraft/class_1011;method_48462(Ljava/util/function/IntUnaryOperator;)Lnet/minecraft/class_1011;
named applyToCopy
Lnet/minecraft/client/texture/NativeImage;applyToCopy(Ljava/util/function/IntUnaryOperator;)Lnet/minecraft/client/texture/NativeImage;
-
apply
- Mappings:
Namespace Name Mixin selector official b
Lekq;b(Ljava/util/function/IntUnaryOperator;)V
intermediary method_51596
Lnet/minecraft/class_1011;method_51596(Ljava/util/function/IntUnaryOperator;)V
named apply
Lnet/minecraft/client/texture/NativeImage;apply(Ljava/util/function/IntUnaryOperator;)V
-
copyPixelsRgba
public int[] copyPixelsRgba()- Mappings:
Namespace Name Mixin selector official d
Lekq;d()[I
intermediary method_48463
Lnet/minecraft/class_1011;method_48463()[I
named copyPixelsRgba
Lnet/minecraft/client/texture/NativeImage;copyPixelsRgba()[I
-
setLuminance
public void setLuminance(int x, int y, byte luminance) - Mappings:
Namespace Name Mixin selector official a
Lekq;a(IIB)V
intermediary method_35621
Lnet/minecraft/class_1011;method_35621(IIB)V
named setLuminance
Lnet/minecraft/client/texture/NativeImage;setLuminance(IIB)V
-
getRed
public byte getRed(int x, int y) - Mappings:
Namespace Name Mixin selector official b
Lekq;b(II)B
intermediary method_35623
Lnet/minecraft/class_1011;method_35623(II)B
named getRed
Lnet/minecraft/client/texture/NativeImage;getRed(II)B
-
getGreen
public byte getGreen(int x, int y) - Mappings:
Namespace Name Mixin selector official c
Lekq;c(II)B
intermediary method_35625
Lnet/minecraft/class_1011;method_35625(II)B
named getGreen
Lnet/minecraft/client/texture/NativeImage;getGreen(II)B
-
getBlue
public byte getBlue(int x, int y) - Mappings:
Namespace Name Mixin selector official d
Lekq;d(II)B
intermediary method_35626
Lnet/minecraft/class_1011;method_35626(II)B
named getBlue
Lnet/minecraft/client/texture/NativeImage;getBlue(II)B
-
getOpacity
public byte getOpacity(int x, int y) - Mappings:
Namespace Name Mixin selector official e
Lekq;e(II)B
intermediary method_4311
Lnet/minecraft/class_1011;method_4311(II)B
named getOpacity
Lnet/minecraft/client/texture/NativeImage;getOpacity(II)B
-
blend
public void blend(int x, int y, int color) - Mappings:
Namespace Name Mixin selector official b
Lekq;b(III)V
intermediary method_35624
Lnet/minecraft/class_1011;method_35624(III)V
named blend
Lnet/minecraft/client/texture/NativeImage;blend(III)V
-
makePixelArray
Deprecated.- Mappings:
Namespace Name Mixin selector official e
Lekq;e()[I
intermediary method_4322
Lnet/minecraft/class_1011;method_4322()[I
named makePixelArray
Lnet/minecraft/client/texture/NativeImage;makePixelArray()[I
-
upload
public void upload(int level, int offsetX, int offsetY, boolean close) - Mappings:
Namespace Name Mixin selector official a
Lekq;a(IIIZ)V
intermediary method_4301
Lnet/minecraft/class_1011;method_4301(IIIZ)V
named upload
Lnet/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 a
Lekq;a(IIIIIIIZZ)V
intermediary method_4312
Lnet/minecraft/class_1011;method_4312(IIIIIIIZZ)V
named upload
Lnet/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 a
Lekq;a(IIIIIIIZZZZ)V
intermediary method_22619
Lnet/minecraft/class_1011;method_22619(IIIIIIIZZZZ)V
named upload
Lnet/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 b
Lekq;b(IIIIIIIZZZZ)V
intermediary method_4321
Lnet/minecraft/class_1011;method_4321(IIIIIIIZZZZ)V
named uploadInternal
Lnet/minecraft/client/texture/NativeImage;uploadInternal(IIIIIIIZZZZ)V
-
loadFromTextureImage
public void loadFromTextureImage(int level, boolean removeAlpha) - Mappings:
Namespace Name Mixin selector official a
Lekq;a(IZ)V
intermediary method_4327
Lnet/minecraft/class_1011;method_4327(IZ)V
named loadFromTextureImage
Lnet/minecraft/client/texture/NativeImage;loadFromTextureImage(IZ)V
-
readDepthComponent
public void readDepthComponent(float unused) - Mappings:
Namespace Name Mixin selector official a
Lekq;a(F)V
intermediary method_35620
Lnet/minecraft/class_1011;method_35620(F)V
named readDepthComponent
Lnet/minecraft/client/texture/NativeImage;readDepthComponent(F)V
-
drawPixels
public void drawPixels()Useupload
to upload this image to GL so it can be used later. This method is not used in vanilla, and its side effects are not yet known.- Mappings:
Namespace Name Mixin selector official f
Lekq;f()V
intermediary method_35627
Lnet/minecraft/class_1011;method_35627()V
named drawPixels
Lnet/minecraft/client/texture/NativeImage;drawPixels()V
-
writeTo
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Ljava/io/File;)V
intermediary method_4325
Lnet/minecraft/class_1011;method_4325(Ljava/io/File;)V
named writeTo
Lnet/minecraft/client/texture/NativeImage;writeTo(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 a
Lekq;a(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
intermediary method_4316
Lnet/minecraft/class_1011;method_4316(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
named makeGlyphBitmapSubpixel
Lnet/minecraft/client/texture/NativeImage;makeGlyphBitmapSubpixel(Lorg/lwjgl/stb/STBTTFontinfo;IIIFFFFII)V
-
writeTo
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Ljava/nio/file/Path;)V
intermediary method_4314
Lnet/minecraft/class_1011;method_4314(Ljava/nio/file/Path;)V
named writeTo
Lnet/minecraft/client/texture/NativeImage;writeTo(Ljava/nio/file/Path;)V
-
getBytes
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official g
Lekq;g()[B
intermediary method_24036
Lnet/minecraft/class_1011;method_24036()[B
named getBytes
Lnet/minecraft/client/texture/NativeImage;getBytes()[B
-
write
- Throws:
IOException
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Ljava/nio/channels/WritableByteChannel;)Z
intermediary method_24032
Lnet/minecraft/class_1011;method_24032(Ljava/nio/channels/WritableByteChannel;)Z
named write
Lnet/minecraft/client/texture/NativeImage;write(Ljava/nio/channels/WritableByteChannel;)Z
-
copyFrom
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(Lekq;)V
intermediary method_4317
Lnet/minecraft/class_1011;method_4317(Lnet/minecraft/class_1011;)V
named copyFrom
Lnet/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 a
Lekq;a(IIIII)V
intermediary method_4326
Lnet/minecraft/class_1011;method_4326(IIIII)V
named fillRect
Lnet/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 a
Lekq;a(IIIIIIZZ)V
intermediary method_4304
Lnet/minecraft/class_1011;method_4304(IIIIIIZZ)V
named copyRect
Lnet/minecraft/client/texture/NativeImage;copyRect(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 official a
Lekq;a(Lekq;IIIIIIZZ)V
intermediary method_47594
Lnet/minecraft/class_1011;method_47594(Lnet/minecraft/class_1011;IIIIIIZZ)V
named copyRect
Lnet/minecraft/client/texture/NativeImage;copyRect(Lnet/minecraft/client/texture/NativeImage;IIIIIIZZ)V
-
mirrorVertically
public void mirrorVertically()- Mappings:
Namespace Name Mixin selector official h
Lekq;h()V
intermediary method_4319
Lnet/minecraft/class_1011;method_4319()V
named mirrorVertically
Lnet/minecraft/client/texture/NativeImage;mirrorVertically()V
-
resizeSubRectTo
- Mappings:
Namespace Name Mixin selector official a
Lekq;a(IIIILekq;)V
intermediary method_4300
Lnet/minecraft/class_1011;method_4300(IIIILnet/minecraft/class_1011;)V
named resizeSubRectTo
Lnet/minecraft/client/texture/NativeImage;resizeSubRectTo(IIIILnet/minecraft/client/texture/NativeImage;)V
-
untrack
public void untrack()- Mappings:
Namespace Name Mixin selector official i
Lekq;i()V
intermediary method_4302
Lnet/minecraft/class_1011;method_4302()V
named untrack
Lnet/minecraft/client/texture/NativeImage;untrack()V
-