Always cache skin elements
This commit is contained in:
parent
b8923ba31d
commit
a40b9f6435
@ -115,7 +115,14 @@ class AtlasSkinElement private constructor(
|
||||
@JvmStatic
|
||||
fun create(location: ResourceLocation): AtlasSkinElement {
|
||||
if (!isWidgetAtlasAvailable) {
|
||||
return AtlasSkinElement(location, null)
|
||||
var element = skinElementCache[location]
|
||||
|
||||
if (element == null) {
|
||||
element = AtlasSkinElement(location, null)
|
||||
skinElementCache[location] = element
|
||||
}
|
||||
|
||||
return element
|
||||
}
|
||||
|
||||
return createImpl(location)
|
||||
|
Loading…
Reference in New Issue
Block a user