Skip to content

Commit 6e6f21c

Browse files
committed
Fix cached cape texture logic
1 parent 5ca82a1 commit 6e6f21c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/org/polyfrost/polyplus/client/cosmetics/CachedCosmetic.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ sealed interface CachedCosmetic {
1414

1515
override fun asResource(): ResourceLocation? {
1616
if (texture == null) {
17-
texture = OmniTextures.load(OmniImages.from(image))
17+
val newTexture = OmniTextures.load(OmniImages.from(image))
18+
texture = newTexture
19+
return OmniTextures.register(newTexture.location, newTexture)
1820
}
1921

2022
return texture?.location

0 commit comments

Comments
 (0)