@@ -84,13 +84,13 @@ public static AbstractTexture assertLoadedDefaultManagers(final ResourceLocation
84
84
*/
85
85
public static AbstractTexture assertLoaded (final ResourceLocation resLoc , final TextureManager textureManager , final ResourceManager resourceManager )
86
86
{
87
- final AbstractTexture current = textureManager .getTexture (resLoc );
88
87
if (!(resLoc instanceof final OutOfJarResourceLocation outOfJarResLoc ))
89
88
{
90
89
// if not out-of-jar use normal vanilla systems
91
- return current ;
90
+ return textureManager . getTexture ( resLoc ) ;
92
91
}
93
92
93
+ final AbstractTexture current = textureManager .getTexture (resLoc , null );
94
94
if (IsOurTexture .isOur (current ))
95
95
{
96
96
return current ;
@@ -109,15 +109,12 @@ public static AbstractTexture assertLoaded(final ResourceLocation resLoc, final
109
109
final OutOfJarTexture outOfJarTexture = new OutOfJarTexture (outOfJarResLoc );
110
110
textureManager .register (outOfJarResLoc , outOfJarTexture ); // this causes texture to load
111
111
112
- if (! outOfJarTexture .redirectToSprite )
112
+ if (outOfJarTexture .redirectToSprite )
113
113
{
114
- return outOfJarTexture ;
115
- }
116
- else
117
- {
118
- final SpriteTexture spriteTexture = new SpriteTexture (outOfJarResLoc );
119
- textureManager .register (outOfJarResLoc , spriteTexture );
120
- return spriteTexture ;
114
+ textureManager .register (outOfJarResLoc , new SpriteTexture (outOfJarResLoc ));
121
115
}
116
+
117
+ // do recursive resolution - cant overflow because manager is aware of path now
118
+ return assertLoaded (outOfJarResLoc , textureManager , resourceManager );
122
119
}
123
120
}
0 commit comments