public void run()
    {
        while(BlockyMainServer.instance.running)
        {
            frame++;
            if(frame <= 60)
            {
                world.tick();
                if(frame % 20 == 0)
                {
                    ArrayList<Entity> ents = new ArrayList<Entity>();
                    for(Entity e : world.entities)
                    {
                        if(e.needUpdate)
                        {
                            ents.add(e);
                            e.needUpdate = false;
                        }
                    }
                    NetworkCommons.sendPacketTo(new PacketEntitiesState(ents, new Class<?>[]{EntityPlayer.class}), false, BlockyMainServer.instance.getNetwork().getIngameConnectionsFromClients());
                }
            }
            if(System.currentTimeMillis()-lastTime >= 1000)
            {
                lastTime = System.currentTimeMillis();
                fps = frame;
                System.out.println(fps);
                frame = 0;
            }
        }
    }