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()) }