private void doBlockCollisions()
    {
	    for(int x1 = -1;x1<=w;x1++)
        {
            for(int y1 = -1;y1<=h;y1++)
            {
                int gridX = (int) ((x1+x)/Block.BLOCK_WIDTH);
                if(gridX < -1)
                    gridX -= 1;
                int gridY = (int) ((y1+y)/Block.BLOCK_HEIGHT);
                if(!blocksDone.contains(new Point(gridX,gridY)))
                {
                    Block t = Block.getBlock(world.getBlockAt(gridX, gridY));
                    t.onEntityCollide(world, gridX, gridY, this, x1 > -1 && y1 > -1 && x1 != w && y1!= h);
                    blocksDone.add(new Point(gridX, gridY));
                }
            }
        }
	    blocksDone.clear();
    }