This commit is contained in:
parent
af2ca8e250
commit
460a2189d6
2 changed files with 11 additions and 2 deletions
|
@ -202,7 +202,12 @@ public class ConfigManager
|
|||
|
||||
public static Class<?>[] getModConfigClasses(String modid)
|
||||
{
|
||||
return MOD_CONFIG_CLASSES.get(modid).toArray(new Class<?>[0]);
|
||||
return (MOD_CONFIG_CLASSES.containsKey(modid) ? MOD_CONFIG_CLASSES.get(modid).toArray(new Class<?>[0]) : new Class<?>[0]);
|
||||
}
|
||||
|
||||
public static boolean hasConfigForMod(String modid)
|
||||
{
|
||||
return asm_data.containsKey(modid);
|
||||
}
|
||||
|
||||
// =======================================================
|
||||
|
|
|
@ -83,6 +83,7 @@ import net.minecraft.world.storage.SaveFormatOld;
|
|||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.ConfigManager;
|
||||
import net.minecraftforge.common.util.CompoundDataFixer;
|
||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraftforge.fml.common.DummyModContainer;
|
||||
|
@ -377,7 +378,10 @@ public class FMLClientHandler implements IFMLSidedHandler
|
|||
String className = mc.getGuiClassName();
|
||||
if (Strings.isNullOrEmpty(className))
|
||||
{
|
||||
guiFactories.put(mc, DefaultGuiFactory.forMod(mc));
|
||||
if (ConfigManager.hasConfigForMod(mc.getModId()))
|
||||
{
|
||||
guiFactories.put(mc, DefaultGuiFactory.forMod(mc));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
try
|
||||
|
|
Loading…
Reference in a new issue