mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 00:07:45 +00:00
Change item model loading priority to fix model conflicts (#4898)
This commit is contained in:
1 parent
1db28d072a
commit
a749861cb2
5 files changed
+79
-7
No files matched your search
@@ -301,22 +301,20 @@ public final class ModelLoader extends ModelBakery
|
||||
Exception exception = null;
|
||||
try
|
||||
{
|
||||
model = ModelLoaderRegistry.getModel(file);
|
||||
model = ModelLoaderRegistry.getModel(memory);
|
||||
}
|
||||
catch(Exception normalException)
|
||||
catch (Exception blockstateException)
|
||||
{
|
||||
// try blockstate json if the item model is missing
|
||||
FMLLog.log.debug("Item json isn't found for '{}', trying to load the variant from the blockstate json", memory);
|
||||
try
|
||||
{
|
||||
model = ModelLoaderRegistry.getModel(memory);
|
||||
model = ModelLoaderRegistry.getModel(file);
|
||||
}
|
||||
catch (Exception blockstateException)
|
||||
catch (Exception normalException)
|
||||
{
|
||||
exception = new ItemLoadingException("Could not load item model either from the normal location " + file + " or from the blockstate", normalException, blockstateException);
|
||||
}
|
||||
}
|
||||
if(exception != null)
|
||||
if (exception != null)
|
||||
{
|
||||
storeException(memory, exception);
|
||||
model = ModelLoaderRegistry.getMissingModel(memory, exception);
|
||||
|
||||
Reference in new issue
Block a user