mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add an extra error check for OBJ model materials (#4402)
This commit is contained in:
1 parent
9717882563
commit
ce49596014
1 file changed
+8
-1
@@ -252,7 +252,14 @@ public class OBJModel implements IModel
|
||||
}
|
||||
else if (key.equalsIgnoreCase("usemtl"))
|
||||
{
|
||||
material = this.materialLibrary.materials.get(data);
|
||||
if (this.materialLibrary.materials.containsKey(data))
|
||||
{
|
||||
material = this.materialLibrary.materials.get(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.log.error("OBJModel.Parser: (Model: '{}', Line: {}) material '{}' referenced but was not found", objFrom, lineNum, data);
|
||||
}
|
||||
usemtlCounter++;
|
||||
}
|
||||
else if (key.equalsIgnoreCase("v")) // Vertices: x y z [w] - w Defaults to 1.0
|
||||
|
||||
Reference in new issue
Block a user