From 7e4c71a085d04fed8c84f840511ce0eb67fe86de Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Fri, 7 Oct 2022 13:04:06 +0700 Subject: [PATCH] merge --- .../mc/otm/client/render/AtlasSkinElement.kt | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AtlasSkinElement.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AtlasSkinElement.kt index 7fc35f2c1..988603ac7 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AtlasSkinElement.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/AtlasSkinElement.kt @@ -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()) }