/**
* Load up
*/
@Override
public void load() {
ModLoader.setInGameHook(this, true, false);
ModLoader.setInGUIHook(this, true, false);
}
/**
* Handle ingame ticks
* @return
*/
int create = 0;
int i, j, k;
public boolean onTickInGame(float time, Minecraft minecraftInstance)
{
if(mc.theWorld != null) {
i = (int) mc.thePlayer.posX;
j = (int) mc.thePlayer.posY;
k = (int) mc.thePlayer.posZ;
}
create++;
System.out.println(create);
if(mc.theWorld != null && create == 50 && mc.thePlayer != null) {
Do Stuff Here
}
return true;
}
/**
* Handle GUI ticks
*/
public boolean onTickInGUI(float tick, Minecraft game, GuiScreen gui)
{
boolean mainmenu = mc.currentScreen instanceof GuiMainMenu;
if(mainmenu) {
create = 0;
}
return true;
}
Hope that helps, that is how I do it.