mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-12 00:47:26 -04:00
static texture array: don't lock when already loaded
its faster
This commit is contained in:
parent
6032ed0bdc
commit
e95eed923c
@ -43,9 +43,14 @@ abstract class StaticTextureArray(
|
||||
|
||||
|
||||
operator fun get(resourceLocation: ResourceLocation): Texture? {
|
||||
val state = state
|
||||
if (state != TextureArrayStates.UPLOADED) {
|
||||
lock.acquire()
|
||||
}
|
||||
val texture = this.named[resourceLocation]
|
||||
if (state != TextureArrayStates.UPLOADED) {
|
||||
lock.release()
|
||||
}
|
||||
return texture
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user