Fix keybindings not loading properly from gamesettings file after restart

This commit is contained in:
Christian committed 2012-08-28 22:15:18 -04:00
1 parent acb0b21d6d
commit 9dd9b6eb71
2 files changed
+30

No files matched your search

@@ -106,6 +106,8 @@ public class FMLClientHandler implements IFMLSidedHandler
private MissingModsException modsMissing;
private boolean loading;
public void beginMinecraftLoading(Minecraft minecraft)
{
if (minecraft.func_71355_q())
@@ -115,6 +117,7 @@ public class FMLClientHandler implements IFMLSidedHandler
return;
}
loading = true;
client = minecraft;
ObfuscationReflectionHelper.detectObfuscation(World.class);
TextureFXManager.instance().setClient(client);
@@ -178,6 +181,7 @@ public class FMLClientHandler implements IFMLSidedHandler
LanguageRegistry.reloadLanguageTable();
RenderingRegistry.instance().loadEntityRenderers((Map<Class<? extends Entity>, Render>)RenderManager.field_78727_a.field_78729_o);
loading = false;
KeyBindingRegistry.instance().uploadKeyBindingsToGame(client.field_71474_y);
}
@@ -380,4 +384,13 @@ public class FMLClientHandler implements IFMLSidedHandler
{
client.func_71373_a(new GuiModsMissingForServer(modMissingPacket));
}
/**
* If the client is in the midst of loading, we disable saving so that custom settings aren't wiped out
* @return
*/
public boolean isLoading()
{
return loading;
}
}