Tick only when there's a world

This commit is contained in:
Christian Weeks 2012-05-12 01:03:36 -04:00
parent caa5384552
commit fdd80dad80

View file

@ -194,9 +194,11 @@ public class FMLClientHandler implements IFMLSidedHandler
*/
public void onPreWorldTick()
{
FMLCommonHandler.instance().worldTickStart();
if (client.field_6313_p!=null && client.field_6324_e!=null) {
FMLCommonHandler.instance().tickStart(TickType.WORLDGUI, 0.0f, client.field_6313_p);
if (client.field_6324_e != null) {
FMLCommonHandler.instance().worldTickStart();
if (client.field_6313_p !=null) {
FMLCommonHandler.instance().tickStart(TickType.WORLDGUI, 0.0f, client.field_6313_p);
}
}
}
@ -205,25 +207,30 @@ public class FMLClientHandler implements IFMLSidedHandler
*/
public void onPostWorldTick()
{
FMLCommonHandler.instance().worldTickEnd();
if (client.field_6313_p!=null && client.field_6324_e!=null) {
FMLCommonHandler.instance().tickEnd(TickType.WORLDGUI, 0.0f, client.field_6313_p);
if (client.field_6324_e != null) {
FMLCommonHandler.instance().worldTickEnd();
if (client.field_6313_p!=null) {
FMLCommonHandler.instance().tickEnd(TickType.WORLDGUI, 0.0f, client.field_6313_p);
}
}
public void onRenderTickStart(float partialTickTime)
{
if (client.field_6324_e != null) {
FMLCommonHandler.instance().tickStart(TickType.RENDER, partialTickTime);
if (client.field_6313_p!=null && client.field_6324_e!=null) {
FMLCommonHandler.instance().tickStart(TickType.GUI, partialTickTime, client.field_6313_p);
if (client.field_6324_e!=null) {
FMLCommonHandler.instance().tickStart(TickType.GUI, partialTickTime, client.field_6313_p);
}
}
}
public void onRenderTickEnd(float partialTickTime)
{
FMLCommonHandler.instance().tickEnd(TickType.RENDER, partialTickTime);
if (client.field_6313_p!=null && client.field_6324_e!=null) {
FMLCommonHandler.instance().tickEnd(TickType.GUI, partialTickTime, client.field_6313_p);
if (client.field_6324_e != null) {
FMLCommonHandler.instance().tickEnd(TickType.RENDER, partialTickTime);
if (client.field_6324_e!=null) {
FMLCommonHandler.instance().tickEnd(TickType.GUI, partialTickTime, client.field_6313_p);
}
}
}
/**