Fix crash with mods calling loadTextureMap in postInit

This commit is contained in:
Chicken-Bones committed 2014-05-02 12:37:23 +10:00
1 parent adf391b358
commit 129558bd98
2 files changed
+3 -2

No files matched your search

@@ -174,7 +174,8 @@ object MicroMaterialRegistry
}
private[microblock] def loadIcons() {
MicroMaterialRegistry.getIdMap.foreach(e => e._2.loadIcons())
if(idMap != null)
idMap.foreach(e => e._2.loadIcons())
}
def getMaxCuttingStrength = maxCuttingStrength
@@ -19,7 +19,7 @@ object MicroblockEventHandler
@SideOnly(Side.CLIENT)
def postTextureStitch(event:TextureStitchEvent.Post)
{
if(event.map.getTextureType == 0 && Loader.instance.hasReachedState(LoaderState.POSTINITIALIZATION))
if(event.map.getTextureType == 0)
MicroMaterialRegistry.loadIcons()
}