package invtweaks.forge;

import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
import invtweaks.InvTweaks;
import net.minecraft.client.Minecraft;

public class ForgeClientTick {
    private InvTweaks instance;

    public ForgeClientTick(InvTweaks inst) {
        instance = inst;
    }

    @SubscribeEvent
    public void onTick(TickEvent.ClientTickEvent tick) {
        if(tick.phase == TickEvent.Phase.END) {
            Minecraft mc = FMLClientHandler.instance().getClient();
            if(mc.theWorld != null) {
                if(mc.currentScreen != null) {
                    instance.onTickInGUI(mc.currentScreen);
                } else {
                    instance.onTickInGame();
                }
            }
        }
    }
}

@@ -499,11 +499,13 @@
 ase.
-END
+START
 ) %7B%0A

Use start of tick so that all processing happens before MC.