mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-18 03:44:54 -04:00
fix fallback texture reading
This commit is contained in:
parent
a218082a37
commit
bd5094c609
@ -102,7 +102,6 @@ object OpenGLTextureUtil {
|
||||
}
|
||||
|
||||
private fun InputStream.readFallbackTexture(): Pair<Vec2i, ByteBuffer> {
|
||||
// ToDo: This somehow crashes with some resource packs
|
||||
val image: BufferedImage = ImageIO.read(this)
|
||||
val rgb = image.getRGB(0, 0, image.width, image.height, null, 0, image.width)
|
||||
|
||||
@ -126,6 +125,7 @@ object OpenGLTextureUtil {
|
||||
|
||||
Pair(Vec2i(decoder.width, decoder.height), data)
|
||||
} catch (exception: Throwable) {
|
||||
this.reset()
|
||||
readFallbackTexture()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user