merge
This commit is contained in:
parent
a40b9f6435
commit
7e4c71a085
@ -97,7 +97,8 @@ class AtlasSkinElement private constructor(
|
||||
WidgetAtlasHolder.INSTANCE.queueRebuild()
|
||||
}
|
||||
|
||||
private fun createImpl(location: ResourceLocation): AtlasSkinElement {
|
||||
@JvmStatic
|
||||
fun create(location: ResourceLocation): AtlasSkinElement {
|
||||
var element = skinElementCache[location]
|
||||
|
||||
if (element == null) {
|
||||
@ -112,22 +113,6 @@ class AtlasSkinElement private constructor(
|
||||
return element
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun create(location: ResourceLocation): AtlasSkinElement {
|
||||
if (!isWidgetAtlasAvailable) {
|
||||
var element = skinElementCache[location]
|
||||
|
||||
if (element == null) {
|
||||
element = AtlasSkinElement(location, null)
|
||||
skinElementCache[location] = element
|
||||
}
|
||||
|
||||
return element
|
||||
}
|
||||
|
||||
return createImpl(location)
|
||||
}
|
||||
|
||||
fun fromNetwork(buff: FriendlyByteBuf): AtlasSkinElement {
|
||||
return create(buff.readResourceLocation())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user